I have code looks like below:
ResourceDictionary res = (ResourceDictionary)Application.LoadComponent(new Uri("Style.xaml", UriKind.Relative));
Style style = new Style();
style.Resources = (Style)res["ComboBoxTextBox"];
VS2008 retuns error:
style.Resources = (Style)res["ComboBoxTextBox"];
Cannot implicitly convert type 'System.Windows.Style' to 'System.Windows.ResourceDictionary'
How i can properly assign a style from ResourceDictionary to control?