private void Watcher_OnThemeChanged(object sender, ThemeWatcher.ThemeChangeEventArgs e) { CurrentTheme = e.CurrentTheme; PrimaryColor = CurrentTheme == ThemeWatcher.WindowsTheme.Dark ? Colors.White : Colors.Black; PrimarySolidColorBrush = new SolidColorBrush(PrimaryColor); SecondaryColor = CurrentTheme == ThemeWatcher.WindowsTheme.Dark ? Colors.Black : Colors.White; SecondarySolidColorBrush = new SolidColorBrush(SecondaryColor); AccentSolidColorBrush = new SolidColorBrush(e.AccentColor); AccentSolidColorBrush.Freeze(); AccentColor = e.AccentColor; Debug.WriteLine("ThemeChange: ***********"); Debug.WriteLine("Primary: " + PrimaryColor); Debug.WriteLine("Secondary: " + SecondaryColor); Debug.WriteLine("Accent: " + AccentColor); RaiseChanges(); }
private static void ThemeWatcher_OnThemeChanged(object sender, ThemeWatcher.ThemeChangeEventArgs e) { WindowsTheme = e.CurrentTheme; Accent = e.AccentColor; }