Onur Akgün

Onur Akgün

  • NA
  • 1
  • 1.3k

How to apply .xaml file in windows form

Dec 7 2014 10:41 AM
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

Answers (2)