WPF - Application Themes (v20.2)

WPF Team Blog
23 November 2020

As you may already know, v20.2 ships with new Visual Studio 2019 theme palettes, a Windows 10 inspired theme, and a palette that can apply Windows 10 accent colors to your DevExpress-powered WPF applications.

New Windows 10 Light Theme

Windows 10 allows you to specify custom accent colors. This color changes the overall appearance of an application. You can now use v20.2 to apply a Windows 10 accent color to your WPF application.

(if you are new to our WPF product line, be sure to check out our complete collection of WPF Themes).

Win10Light theme

Our WPF Windows 10 Light Theme leverages the best visual attributes of Windows 10. We patterned this theme after Windows Explorer, added a few appearance elements from WinUI, and extended it to the entire set of DevExpress WPF UI controls and tools.

Follow this link to explore this new Windows 10 Light Theme (demo link requires that you first install DXperience v20.2 with associated demos).

New Windows 10 Palette

When used with the Windows 10 Light Theme, our WPF Win10Palette allows you to replicate the visual appearance of Windows 10 within your WPF application.

Win10Palette

As you might expect, our WPF Win10Palette can obtain Windows 10 accent colors and update a theme each time users change accent color:

protected override void OnStartup(StartupEventArgs e)
   {
      var accentpalette = new Win10Palette();
      var customtheme = Theme.CreateTheme(accentpalette, Theme.Win10Light);
      Theme.RegisterTheme(customtheme);
      ApplicationThemeHelper.ApplicationThemeName = customtheme.Name;
      base.OnStartup(e);
   }

You can also specify a custom accent color and disable theme updates when users modify Windows 10 accent colors. To do so, simply create a new theme, pass an accent color to the ActualAccentColor constructor parameter, and set listenAccentColorChanges to false. This will produce a Windows 10 Light Theme with your custom accent color:

protected override void OnStartup(StartupEventArgs e)
   {
      var accentpalette = new Win10Palette((Color)ColorConverter.ConvertFromString("#ffffb900"), false);
      var customtheme = Theme.CreateTheme(accentpalette, Theme.Win10Light);
      Theme.RegisterTheme(customtheme);
      ApplicationThemeHelper.ApplicationThemeName = customtheme.Name;
      base.OnStartup(e);
   }

New Visual Studio 2019 Predefined Palettes

In our v20.1 release, we added the three new Visual Studio 2019-inspired themes. With v20.2, you can apply the following predefined themes to our Visual Studio 2019-inspired themes:

Blue: Latte, BlueNavy.

Dark: BlueberryCake, DeepSea, Dimmed, Sand, Storm.

Light: Berberis, Cornflower, EmeraldSea, LightLilac, Loft.

VS2019Palettes

Refer to the following help topic for more information: Palettes.

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.