New to Telerik UI for WPF? Download free 30-day trial

VisualStudio2019 Theme

With the R3 2019 release of the UI for WPF suite we have introduced the brand new VisualStudio2019 theme. Inspired by the new refreshed Visual Studio 2019 IDE, the VisualStudio2019 theme delivers a lot cleaner and smoother look and feel to your WPF apps. The team at Microsoft are well known for their eagerness to deliver the best possible user experience that we encounter every day and with the VisualStudio2019 theme you will be able to easily bring it to your own apps.

With the R2 2021 release of the UI for WPF suite, we have designed and delivered a brand new color variation of the VisualStudio2019 theme - the Dark one. In addition to it, the theme palette expanded its brushes collection with the AccentForegroundBrush and the DockingBackgroundBrush, which are available for both color variations.

The following topic explains the specifics of the theme's palette and features.

Default Theme Colors

The VisualStudio2019 Theme is designed to be easily modified via the exposed colors in the theme palette. The default values of the brushes in the theme are listed below.

Brush name Light Dark
AccentBrush #F5CC84
#007ACC
AccentDarkBrush #5F6FA4
#006EB8
AccentFocusedBrush #D2A85E
#33BBFF
AccentForegroundBrush #5F6FA4
#98C5E3
AccentMainBrush #AAC0FF
#3399FF
AccentMouseOverBrush #C4D5FF
#40AFFF
AccentSecondaryDarkBrush #40508D
#005791
AlternativeBrush #F7F9FE
#1B1B1C
BasicBrush #94A6CA
#555555
ComplementaryBrush #D9E0F8
#434346
DockingBackgroundBrush #5F6FA4
#111112
HeaderBrush #40568D
#2B71A0
IconBrush #414141
#F1F1F1
MainBrush #FCFCFC
#252526
MarkerBrush #1E1E1E
#F1F1F1
MarkerInvertedBrush #FFFFFF
#FFFFFF
MouseOverBrush #FFF8DF
#3E3E40
PrimaryBrush #F2F5FC
#2D2D30
ReadOnlyBackgroundBrush #FCFCFC
#252526
ReadOnlyBorderBrush #94A6CA
#555555
SecondaryBrush #FFFFFF
#3F3F46
SemiBasicBrush #C0CAE9
#656565
ValidationBrush #FF3333
#E51400

Figure 1: Theme colors represented in RadOutlookBar

VisualStudio2019 theme colors represented in RadOutlookBar

VisualStudio2019Palette Properties

Primary Brushes

  • PrimaryBrush: Used for background of inputs.
  • MainBrush: Used for background of buttons.
  • AlternativeBrush: Used for background of popups, windows, list boxes etc.
  • BasicBrush: Used in the majority of the normal state borders and for the borders of windows as well.
  • ComplementaryBrush: Slightly darker than the alternative in case of collisions.
  • MarkerBrush: Used for the majority of foregrounds which are black.
  • MarkerInvertedBrush: Used for interaction states - mainly where change of the foreground to white is required.
  • IconBrush: Used for glyph and path icons.

Interaction State Brushes

  • AccentBrush: Used for borders of the hovered states of the elements as well as for backgrounds of toggled/checked buttons.
  • AccentDarkBrush: Used in backgrounds for the pressed states of the elements.
  • AccentFocusedBrush: Variation of the AccentBrush that is used for the focused states of the elements.
  • AccentForegroundBrush: Variation of the AccentBrush that is used for the foreground of some elements that need to stand out - e.g., the headers of the Spreadsheet control's dialogs.
  • AccentMainBrush: Used for the selected states of selected elements (e.g. menu items, dropdown items, list box items).
  • AccentMouseOverBrush: Variation of AccentMainBrush that is used for the hovered states of the above mentioned selected elements.
  • AccentSecondaryDarkBrush: Variation of AccentDarkBrush that is used for the foreground of the picker control buttons - DatePicker, DateTimePicker, CalculatorPicker, etc., as well as for the points in the data visualization controls - BulletGraph, Sparkline, etc.
  • MouseOverBrush: Used for background of the hovered states of non-accent elements.

Special Brushes

  • DockingBackgroundBrush: A special brush used for the background of the Docking control - one of the most specific UI controls for the look and feel of the VisualStudio2019 theme.
  • HeaderBrush: A dark blue brush that is used for the background of the header elements.
  • ReadOnlyBackgroundBrush: A white brush that is used for the background of the read only state of the elements.
  • ReadOnlyBorderBrush: A polo blue brush that is used for the border of the read only state of the elements.
  • ValidationBrush:  A bright red brush that is used for indicating validation errors - for the underline of the invalid control and as a border for the error tooltip, border for invalid rows and cells.

The AccentFocusedBrush and the DockingBackgroundBrush are not available with versions prior to the R2 2021 release of the UI for WPF suite.

Other Properties

  • DisabledOpacity: Used for controls when they are in a disabled state. Backgrounds usually use the ComplementaryBrush when disabled.
  • ReadOnlyOpacity: Used for controls when they are in a read-only state.

Theme Variation Changing

Since the R2 2021 release of the UI for WPF suite the VisualStudio2019 theme offers two color variations. The Blue variation corresponds to the Visual Studio 2019 IDE's Blue theme, and the Dark - to the Dark theme. The following example demonstrates the ability to switch between the supported Blue and Dark color palettes by calling the LoadPreset() method as shown below:

Example 1: Changing the color variation of the theme

//default color variation  
VisualStudio2019Palette.LoadPreset(VisualStudio2019Palette.ColorVariation.Blue);    
 
//Dark color variation  
VisualStudio2019Palette.LoadPreset(VisualStudio2019Palette.ColorVariation.Dark);  

Figure 2: VisualStudio2019 theme color variations

VisualStudio2019 theme colors represented in RadTaskBoard

Font Family and Font Size

When using the VisualStudio2019 theme you can dynamically change the FontSize and FontFamily properties of all components in the application the same way as you do in Windows8, Windows8Touch, Office2013, VisualStudio2013, Office2016, Green, Material, Fluent and Crystal themes.

The FontSize and FontFamily properties are public so you can easily modify the theme resources at a single point. The most commonly used font size in the theme is with value 12 and can be modified through the VisualStudio2019Palette.Palette.FontSize property in the same manner as in the other themes that support a theme palette.

The default font used in the theme is Segoe UI.

For complex scenarios we strongly recommend setting the FontSize properties only before the application is initialized.

Example 2 shows the default font sizes and families.

Example 2: Default FontSize

VisualStudio2019Palette.Palette.FontSizeXS = 10; 
VisualStudio2019Palette.Palette.FontSizeS = 11; 
VisualStudio2019Palette.Palette.FontSize = 12; 
VisualStudio2019Palette.Palette.FontSizeL = 13; 
VisualStudio2019Palette.Palette.FontSizeXL = 20; 
Example 3 shows how to change the default FontFamily from "Segoe UI" to "Calibri Italic" and the FontSize from 12 to 16.

Example 3: Changing the theme's FontSize and FontFamily

private void OnButtonChangeFontSizeClick(object sender, RoutedEventArgs e) 
{ 
    VisualStudio2019Palette.Palette.FontSize = 16; 
    VisualStudio2019Palette.Palette.FontFamily = new FontFamily("Calibri Italic"); 
} 

Figure 3: Setting FontSize and FontFamily

RadCalendar with modified FontSize and FontFamiliy

Glyphs

The VisualStudio2019 Theme also uses the Telerik Web UI font glyphs by default. The RadGlyph provides a lightweight, flexible and design-time-friendly implementation of our glyph font.

You can read more about the RadGlyph in the RadGlyph Overview article and about the range of the font glyphs in the Font Glyphs Overview article.

Theme Helper

The ThemeHelper class that comes with the R3 2019 release is used in the VisualStudio2019 theme. It exposes a set of attached properties and can be used to directly modify the appearance of a specific basic control without the need to alter its control template.

Example 4 shows a RadToggleButton control with modified brushes for its different states through the ThemeHelper class:

Example 4: Set RadToggleButton's visual appearance through the ThemeHelper class

<telerik:RadToggleButton Content="RadButton"  
                         Margin="10" 
                         xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls" 
                         helpers:ThemeHelper.MouseOverBrush="{telerik:VisualStudio2019Resource ResourceKey=AccentMouseOverBrush}" 
                         helpers:ThemeHelper.PressedBrush="{telerik:VisualStudio2019Resource ResourceKey=ValidationBrush}" 
                         helpers:ThemeHelper.CheckedBrush="{telerik:VisualStudio2019Resource ResourceKey=AccentMainBrush}"/> 

Figure 4: Appearance of the RadToggleButton in the different states

RadToggleButton States

Changing Opacity

If you need to change the opacity of the disabled and read-only elements, you can easily do so by using the DisabledOpacity and ReadOnlyOpacity properties of the VisualStudio2019Palette. The default values are 0.3 and 0.6 respectively.

Example 5: Changing the opacity

VisualStudio2019Palette.Palette.DisabledOpacity = 0.5; 
VisualStudio2019Palette.Palette.ReadOnlyOpacity = 0.5; 
VisualStudio2019Palette.Palette.DisabledOpacity = 0.5 
VisualStudio2019Palette.Palette.ReadOnlyOpacity = 0.5 

See Also

In this article
Not finding the help you need? Improve this article