Articles :: View

Change WPF App Theme while running

Uri dictUri = new Uri(@"/Resources/Themes/MyTheme.xaml", UriKind.Relative); ResourceDictionary resourceDict = Application.LoadComponent(dictUri) as ResourceDictionary; Application.Current.Resources.MergedDictionaries.Clear(); Application.Current.Resources.MergedDictionaries.Add(resourceDict);


Comments

Be the first to add a comment!