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