问题描述
嗨.
我有一个wpf应用程序.
我为键入的样式的按钮,标签,组合框等制作了一个资源文件.
现在,我在一个窗口中使用一个第三方控件,该窗口将从应用程序中弹出.
现在,当我使用以下代码加载弹出窗口时删除资源文件时,
ResourceDictionary皮肤= new ResourceDictionary(); skin.Source =新的Uri(@"Skins \ Skin.xaml",UriKind.Relative); Application.Current.Resources.MergedDictionaries.Remove(皮肤);
这样,它也不会在我的应用程序中应用样式.
我在做什么????/
Hi.
I have a wpf application.
I made one resource file for buttons, labels, comboboxes, etc. which are typed styles.
Now i am using one third party control in one window which i will popup from my application.
Now when i remove resource file when the popup window loaded using following code,
ResourceDictionary skin = new ResourceDictionary(); skin.Source = new Uri(@"Skins\Skin.xaml", UriKind.Relative); Application.Current.Resources.MergedDictionaries.Remove(skin);
By doing this, it also not apply styles in my application.
Is there anything wrong i m doing???/
推荐答案
这篇关于WPF-删除resourcedictionary会产生问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!