예제 #1
0
 private void Initialize()
 {
     try
     {
         Themes = new ObservableCollection <ThemeM>(themesSeeker.GetThemes(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ThemeFolder)));
         if (Themes.Any())
         {
             SelectedTheme      = Themes.First();
             ColorSchemes       = new ObservableCollection <ColorSchemeM>(Themes.First().ColorSchemeModels);
             SelecteColorScheme = ColorSchemes.FirstOrDefault();
             ThemeManager.ChangeApplicationTheme(Application.Current, SelectedTheme.ControlStyleModels, SelectedTheme.NumericValuesModels, SelecteColorScheme);
         }
     }
     catch (Exception e)
     {
         MessageBox.Show(e.Message, "", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
예제 #2
0
 private void ChangeSelectedTheme()
 {
     ThemeManager.ChangeApplicationTheme(Application.Current, selectedTheme.ControlStyleModels, selecteColorScheme);
 }