private void ViewModelThemeChanged(object sender, ThemeChangedEventArgs e) { //switch(e.ThemeName) //{ // case "Dark": // AppearanceManager.Current.ThemeSource = AppearanceManager.DarkThemeSource; // break; // case "Light": // AppearanceManager.Current.ThemeSource = AppearanceManager.LightThemeSource; // break; //} }
void shellWindowViewModel_OnThemeChanged(object sender, ThemeChangedEventArgs e) { var dark = new Uri("/Resources/SafeAndSoundResourceDarkDictionary.xaml", UriKind.Relative); var light = new Uri("/Resources/SafeAndSoundResourceDictionary.xaml", UriKind.Relative); switch (e.ThemeName) { case "Dark": AppearanceManager.Current.ThemeSource = dark; break; case "Light": AppearanceManager.Current.ThemeSource = light; break; } }