예제 #1
0
 void ThemeManager_IsThemeChanged(object sender, OnThemeChangedEventArgs e)
 {
     if (myThemeChangeEvent)
     {
         myThemeChangeEvent = false;
         return;
     }
     myThemeChangeEvent = true;
     ThemeManager.ChangeAppStyle(this,e.Accent, ThemeManager.GetInverseAppTheme(e.AppTheme));
 }
예제 #2
0
 public static void ThemeManagerOnIsThemeChanged(object sender, OnThemeChangedEventArgs onThemeChangedEventArgs) {
     ReplaceTheme(GetInverseThemeName(onThemeChangedEventArgs.AppTheme.Name),
         onThemeChangedEventArgs.AppTheme.Name);
     ReplaceTheme("BaseOverrides", "BaseOverrides");
 }
예제 #3
0
 private static void OnThemeChanged(Accent newAccent, Theme newTheme)
 {
     var onThemeChangedEventArgs = new OnThemeChangedEventArgs() { Theme = newTheme, Accent = newAccent };
     onThemeChangedEventArgs.AppTheme = new AppTheme(
         newTheme == Theme.Light ? "BaseLight" : "BaseDark",
         newTheme == Theme.Light ? ThemeManager.LightResource.Source : ThemeManager.DarkResource.Source);
     SafeRaise.Raise(IsThemeChanged, Application.Current, onThemeChangedEventArgs);
 }