Ejemplo n.º 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));
 }
Ejemplo n.º 2
0
 public static void ThemeManagerOnIsThemeChanged(object sender, OnThemeChangedEventArgs onThemeChangedEventArgs) {
     ReplaceTheme(GetInverseThemeName(onThemeChangedEventArgs.AppTheme.Name),
         onThemeChangedEventArgs.AppTheme.Name);
     ReplaceTheme("BaseOverrides", "BaseOverrides");
 }
Ejemplo n.º 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);
 }