public HelpView() { InitializeComponent(); if (!DesignMode.DesignModeEnabled) { HelpTextControl.Style = VisualTreeExtensions.LoadFromAppResource <Style>("HelpText_{culture}") ?? VisualTreeExtensions.LoadFromAppResource <Style>("HelpText_en-US"); } }
private static void ApplyThemeColors() { var themeDarkBrush = VisualTreeExtensions.LoadFromAppResource <SolidColorBrush>("ThemeDarkBrush"); var themeLightBrush = VisualTreeExtensions.LoadFromAppResource <SolidColorBrush>("ThemeLightBrush"); var titleBar = ApplicationView.GetForCurrentView().TitleBar; titleBar.BackgroundColor = themeDarkBrush.Color; titleBar.ForegroundColor = Colors.White; titleBar.InactiveBackgroundColor = themeDarkBrush.Color; titleBar.InactiveForegroundColor = Colors.White; titleBar.ButtonBackgroundColor = themeDarkBrush.Color; titleBar.ButtonForegroundColor = Colors.White; titleBar.ButtonInactiveBackgroundColor = themeDarkBrush.Color; titleBar.ButtonInactiveForegroundColor = Colors.White; titleBar.ButtonHoverBackgroundColor = themeLightBrush.Color; titleBar.ButtonHoverForegroundColor = Colors.Black; titleBar.ButtonPressedBackgroundColor = themeLightBrush.Color; titleBar.ButtonPressedForegroundColor = Colors.Black; }