3
我有代码看起来像下面:WPF读样式在C#代码控制
ResourceDictionary res = (ResourceDictionary)Application.LoadComponent(new Uri("Style.xaml", UriKind.Relative));
Style style = new Style();
style.Resources = (Style)res["ComboBoxTextBox"];
VS2008 retuns一个错误:
style.Resources =(样式)RES [“ComboBoxTextBox “];
Cannot implicitly convert type 'System.Windows.Style' to 'System.Windows.ResourceDictionary'
如何正确指定从ResourceDictionary
的样式来控制?
是啊,我只是做了简单的错误:)悠着点今天:d THX求助 – Kamilos 2009-12-15 12:43:52