I need to apply theme file in windows form but I can't. When I use the code below I get error because there is no System.Windows.Application
StreamResourceInfo sri = System.Windows.Application.GetResourceStream( new Uri("App.xaml", UriKind.Relative));
var resources = (System.Windows.ResourceDictionary)Load(sri.Stream);
var app = new System.Windows.Application(); app.Resources.MergedDictionaries.Add(resources);
Thank you
Loading
Vahid BakhtiaryPosted Dec 9, 2014, 9:10 AM
after that you must add a elementhost control in your windows form and after that in code behind use below code :
UserControl1 us = new UserControl1();
elementHost1.Child = us;
Selva GanapathyPosted Dec 9, 2014, 7:55 AM
Hi Onur,
To which control you are trying to do this?
Regards,
Selva Ganapathy K