public static void LoadTheme(ColorTheme theme) { if (CurrentTheme != theme) { Application.Current.Resources["ThemeBackgroundBrush"] = theme.Background; Application.Current.Resources["ThemeControlBackgroundBrush"] = theme.ControlBackground; Application.Current.Resources["ThemeControlHighBrush"] = theme.ControlHigh; Application.Current.Resources["ThemeControlMidBrush"] = theme.ControlMid; Application.Current.Resources["ThemeControlLowBrush"] = theme.ControlLow; Application.Current.Resources["ThemeForegroundBrush"] = theme.Foreground; Application.Current.Resources["ThemeBorderHighBrush"] = theme.BorderHigh; Application.Current.Resources["ThemeBorderMidBrush"] = theme.BorderMid; Application.Current.Resources["ThemeBorderLowBrush"] = theme.BorderLow; Application.Current.Resources["ThemeEditorBackground"] = theme.EditorBackground; Application.Current.Resources["ApplicationAccentBrushLow"] = theme.AccentLow; Application.Current.Resources["ApplicationAccentBrushMed"] = theme.AccentMid; Application.Current.Resources["ApplicationAccentBrushHigh"] = theme.AccentHigh; Application.Current.Resources["ApplicationAccentForegroundBrush"] = theme.AccentForeground; Application.Current.Resources["ErrorListError"] = theme.ErrorListError; Application.Current.Resources["ErrorListWarning"] = theme.ErrorListWarning; Application.Current.Resources["ErrorListInfo"] = theme.ErrorListInfo; CurrentTheme = theme; } }
public static void LoadTheme(ColorTheme theme) { Application.Current.Resources["ThemeBackgroundBrush"] = theme.Background; Application.Current.Resources["ThemeControlBackgroundBrush"] = theme.ControlBackground; Application.Current.Resources["ThemeControlDarkBrush"] = theme.ControlDark; Application.Current.Resources["ThemeControlMidBrush"] = theme.ControlMid; Application.Current.Resources["ThemeControlLightBrush"] = theme.ControlLight; Application.Current.Resources["ThemeForegroundBrush"] = theme.Foreground; Application.Current.Resources["ThemeBorderDarkBrush"] = theme.BorderDark; Application.Current.Resources["ThemeEditorBackground"] = theme.EditorBackground; Application.Current.Resources["ApplicationAccentBrush"] = theme.Accent; Application.Current.Resources["ApplicationAccentBrushLight"] = theme.AccentLight; Application.Current.Resources["ApplicationAccentForegroundBrush"] = theme.AccentForeground; CurrentTheme = theme; }
public static void Register(ColorTheme theme) { s_themes.Add(theme); s_themeIds.Add(theme.Name, theme); }
public void BeforeActivation() { ColorTheme.Register(ColorTheme.VisualStudioDark); ColorTheme.Register(ColorTheme.VisualStudioLight); }