Пример #1
0
        private void InitializeThemeAndAccent()
        {
            if (WindowsThemeHelper.GetWindowsBaseColor() == ThemeManager.BaseColorDark)
            {
                SetTheme(dark: true);
            }

            ((PuzzleViewModel)DataContext).AccentTitleBar = WindowsThemeHelper.ShowAccentColorOnTitleBarsAndWindowBorders();
        }
Пример #2
0
 private void ResetTheme()
 {
     if (SystemParameters.HighContrast)
     {
         Theme highContrastBaseType = GetHighContrastBaseType();
         ChangeTheme(highContrastBaseType);
     }
     else
     {
         string baseColor = WindowsThemeHelper.GetWindowsBaseColor();
         ChangeTheme((Theme)Enum.Parse(typeof(Theme), baseColor));
     }
 }
Пример #3
0
 private void ResetTheme()
 {
     if (WindowsThemeHelper.IsHighContrastEnabled())
     {
         Theme highContrastBaseType = GetHighContrastBaseType();
         ChangeTheme(highContrastBaseType);
     }
     else
     {
         string baseColor = WindowsThemeHelper.GetWindowsBaseColor();
         ChangeTheme((Theme)Enum.Parse(typeof(Theme), baseColor));
     }
 }