void ThemeManager_IsThemeChanged(object sender, OnThemeChangedEventArgs e) { if (myThemeChangeEvent) { myThemeChangeEvent = false; return; } myThemeChangeEvent = true; ThemeManager.ChangeAppStyle(this,e.Accent, ThemeManager.GetInverseAppTheme(e.AppTheme)); }
public static void ThemeManagerOnIsThemeChanged(object sender, OnThemeChangedEventArgs onThemeChangedEventArgs) { ReplaceTheme(GetInverseThemeName(onThemeChangedEventArgs.AppTheme.Name), onThemeChangedEventArgs.AppTheme.Name); ReplaceTheme("BaseOverrides", "BaseOverrides"); }
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); }