Beispiel #1
0
        private void ApplyWindowsTheme(ThemeWatcher.WindowsTheme windowsTheme)
        {
            var paletteHelper = new PaletteHelper();
            var theme         = paletteHelper.GetTheme();

            theme.SetBaseTheme(windowsTheme == ThemeWatcher.WindowsTheme.Dark ? Theme.Dark : Theme.Light);
            paletteHelper.SetTheme(theme);

            var extensionsPaletteHelper = new MaterialDesignExtensions.Themes.PaletteHelper();

            // That's nice, then don't use it in your own examples and provide a working alternative
#pragma warning disable 612
            extensionsPaletteHelper.SetLightDark(windowsTheme == ThemeWatcher.WindowsTheme.Dark);
#pragma warning restore 612
        }
 public WindowsThemeEventArgs(ThemeWatcher.WindowsTheme theme)
 {
     Theme = theme;
 }
Beispiel #3
0
 private static void ThemeWatcher_OnThemeChanged(object sender, ThemeWatcher.ThemeChangeEventArgs e)
 {
     WindowsTheme = e.CurrentTheme;
     Accent       = e.AccentColor;
 }
Beispiel #4
0
 static InternalSolids()
 {
     WindowsTheme = ThemeWatcher.GetWindowsTheme();
     themeWatcher.WatchTheme();
     themeWatcher.OnThemeChanged += ThemeWatcher_OnThemeChanged;
 }