0

I need to implement Skinning in a WPF application. User have the option to select a particular skin and I'm saving that skin as local(as an XML). On the application startup(App class constructor), I'm reading that user selected skin from xml and adding corresponding resource dictionary using Application.Current.Resources.MergedDictionaries.Add() method. On the initial window load the skinning is not working and after the startup window load if we try to change the theme, it works as expected. So I moved the code block from App.xaml constructor to Startup window constructor, and it works fine.

I just override the OnLoadCompleted and OnStartup event and moved the code that I written in constructor to events, but no use.

So is there any way to do it from App.xaml?

Dennis Jose
  • 1,589
  • 15
  • 35

0 Answers0