Back to Devexpress

WPF Application Themes

wpf-7406-common-concepts-themes.md

latest25.4 KB
Original Source

WPF Application Themes

  • Jan 16, 2026
  • 9 minutes to read

The DevExpress WPF Subscription ships with over 30 custom-designed application themes. You can use each of these themes without modification or customize them in our free WPF Theme Designer application.

Refer to the Theme List topic to get the available theme list. You can apply each theme to the DevExpress WPF Controls and the supported Standard WPF Controls.

The Lightweight Themes topic contains a list of available lightweight themes. These themes visually replicate regular themes, but offer quicker startup times and consume less memory.

Run Demo: Outlook Inspired Demo

Note

When you reference a DevExpress WPF library in an application, the application applies the Office2019Colorful theme. This theme affects all the DevExpress WPF Controls and the supported Standard WPF Controls. You can reset the DevExpress Theme applied to Standard WPF Controls.

List of Supported Standard Controls

The following Standard WPF Controls are supported only in the Office2016SE, VS2017, Office2019, VS2019, Win10, and Win11 DevExpress WPF Themes:

Show supported Standard WPF Controls

Apply a DevExpress Theme

To apply a theme, it is necessary to reference the theme assembly or the theme NuGet package in your project.

View Example: Use DevExpress Themes in a WPF Application

Apply a DevExpress Theme to an Application

Approach 1

Open the Window’s or the User Control’s Quick Action or Smart Tag, expand the ApplicationTheme drop-down list, and select a theme. The list only shows the themes that are referenced in your project.

The resulting App.config file appears as follows:

  • .NET

  • .NET Framework

Approach 2

This approach overrides changes to the App.config file made with Approach 1.

  1. Reference the DevExpress.Data.Desktop.v25.2 assembly.
  2. Set the ApplicationThemeHelper.ApplicationThemeName property to a theme name at application startup.
csharp
public partial class App : Application {
    protected override void OnStartup(StartupEventArgs e) {
        ApplicationThemeHelper.ApplicationThemeName = Theme.MetropolisLightName;
        base.OnStartup(e);
    }
}
vb
Class Application
    Protected Overrides Sub OnStartup(e As StartupEventArgs)
        ApplicationThemeHelper.ApplicationThemeName = Theme.MetropolisLightName
        MyBase.OnStartup(e)
    End Sub 
End Class

Tip

You can add the Ribbon Gallery Theme Selector to your application.

Apply a DevExpress Theme to a Container

Specify the attached ThemeManager.ThemeName property. You can apply the property to the DevExpress WPF Controls and the Supported WPF Standard Controls. The following code sample applies the Office2016SEWhite theme to the ThemedWindow and the Office2019Black theme to the GridControl:

xaml
<ThemedWindow ...
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" 
    xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
    dx:ThemeManager.ThemeName="Office2016SEWhite"
    x:Name="mainWindow">
    <dxg:GridControl dx:ThemeManager.ThemeName="Office2019Black">
        ...
    </dxg:GridControl>
</ThemedWindow>

In code, you can call the ThemeManager.SetThemeName method to apply a theme to a container:

csharp
using DevExpress.Xpf.Core;
//...
        public MainWindow() {
            //...
            ThemeManager.SetThemeName(mainWindow, "Office2019Black");
        }
vb
Imports DevExpress.Xpf.Core
'...
        Public Sub New()
            '...
            ThemeManager.SetThemeName(mainWindow, "Office2019Black")
        End Sub

Reset the Applied DevExpress Theme

When you reset a theme, DevExpress WPF Themes no longer affect Standard WPF Controls. DevExpress WPF Controls get their appearance from the DeepBlue theme built into control assemblies.

Reset the Applied DevExpress Theme to an application

Approach 1

Click the “X” button ( ) in the Window’s Smart Tag:

The resulting App.config file appears as follows:

xaml
...
<DXThemeManager>
    <setting name="ApplicationThemeName" serializeAs="String">
        <value>None</value>
    </setting>
</DXThemeManager>
...

If you use Quick Actions, you need to edit the App.config file manually.

Approach 2

Set the ApplicationThemeHelper.ApplicationThemeName property to Theme.NoneName at application startup. This approach overrides changes to the App.config file made with Approach 1.

csharp
using DevExpress.Xpf.Core;
...
    public partial class App : Application {
        protected override void OnStartup(StartupEventArgs e) {
            ApplicationThemeHelper.ApplicationThemeName = Theme.NoneName;
            base.OnStartup(e);
        }
    }
vb
Imports DevExpress.Xpf.Core
...
Public Partial Class App
    Inherits Application
    Protected Overrides Sub OnStartup(ByVal e As StartupEventArgs)
        ApplicationThemeHelper.ApplicationThemeName = Theme.NoneName
        MyBase.OnStartup(e)
    End Sub
End Class

Reset a DevExpress Theme Applied to a Container

Set the attached ThemeManager.ThemeName property to None :

xaml
<ThemedWindow ...
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" 
    xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid">
    <dxg:GridControl dx:ThemeManager.ThemeName="None">
        ...
    </dxg:GridControl>
</ThemedWindow>

Reset a DevExpress Theme Only For the Standard WPF Controls

To reset a DevExpress Theme only for a container with Standard WPF Controls:

  1. Reset the application theme
  2. Apply a theme only to containers that contain DevExpress WPF Controls.
xaml
...
<DXThemeManager>
    <setting name="ApplicationThemeName" serializeAs="String">
        <value>None</value>
    </setting>
</DXThemeManager>
...
xaml
<ThemedWindow ...
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" 
    xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid">
    <dxg:GridControl dx:ThemeManager.ThemeName="Office2019White">
        ...
    </dxg:GridControl>
    <ComboBox>
    ...
    </ComboBox>
</ThemedWindow>

Save the Theme Applied at Runtime

The application applies a theme specified in the application’s configuration file at startup. Call the ApplicationThemeHelper.SaveApplicationThemeName method to save the current theme to the application’s configuration file:

csharp
ApplicationThemeHelper.ApplicationThemeName = Theme.MetropolisLightName;
ApplicationThemeHelper.SaveApplicationThemeName();
vb
ApplicationThemeHelper.ApplicationThemeName = Theme.MetropolisLightName
ApplicationThemeHelper.SaveApplicationThemeName()

Add a Theme Selector to your App

DevExpress WPF Controls include the following MVVM behaviors that allow you to implement theme selectors in your application:

SelectorGitHub Example
BarSubItemThemeSelectorBehaviorExample
BarSplitItemThemeSelectorBehaviorExample
GalleryThemeSelectorBehaviorExample
RibbonGalleryItemThemeSelectorBehaviorExample
HamburgerSubMenuThemeSelectorBehaviorExample

Use Legacy Default Themes

You can use the CompatibilitySettings.LegacyDefaultTheme property to specify the legacy default theme that the application should use:

csharp
using DevExpress.Xpf.Core;
...
    public partial class App : Application {
        protected override void OnStartup(StartupEventArgs e) {
            CompatibilitySettings.LegacyDefaultTheme = LegacyDefaultTheme.Office2016White;
            base.OnStartup(e);
        }
    }
vb
Imports DevExpress.Xpf.Core
...
Public Partial Class App
    Inherits Application
    Protected Overrides Sub OnStartup(ByVal e As StartupEventArgs)
        CompatibilitySettings.LegacyDefaultTheme = LegacyDefaultTheme.Office2016White
        MyBase.OnStartup(e)
    End Sub
End Class

Use Windows App Mode

Latest DevExpress WPF Theme families include the *System theme. This theme does not introduce its own new look and feel options. Instead, it reads Windows settings and applies one of the existing themes to match the current OS appearance. Your application then looks consistent with other software that a user runs on their machine.

The following table lists *System theme names and the corresponding themes that take effect in dark or light OS modes:

Theme FamilySystem Theme NameLight Theme[1]Dark Theme[2]
Office 2016 SE ThemesOffice2016SystemSEOffice2016ColorfulSEOffice2016BlackSE
Office 2019 ThemesOffice2019SystemOffice2019ColorfulOffice2019Black
Visual Studio 2017 ThemesVS2017SystemVS2017LightVS2017Dark
Visual Studio 2019 ThemesVS2019SystemVS2019LightVS2019Dark
Windows 10 Themes[3]Win10SystemWin10LightWin10Dark
Windows 11 ThemesWin11SystemWin11LightWin11Dark

You should reference assemblies/NuGet packages of both (Dark and Light) theme versions. For example, to allow the Win11System theme to switch between Win11Light and Win11Dark themes, you should choose any of the following options:

  • Reference the DevExpress.Xpf.Themes.Win11Dark.v22.2.dll and DevExpress.Xpf.Themes.Win11Light.v22.2.dll assemblies.
  • Reference the DevExpress.Wpf.Themes.Win11Dark and DevExpress.Wpf.Themes.Win11Light NuGet packages.
  • Reference the DevExpress.Wpf.Themes.All NuGet package.

The following code sample applies the VS2019System theme to the application:

csharp
public partial class App : Application {
    protected override void OnStartup(StartupEventArgs e) {
        ApplicationThemeHelper.ApplicationThemeName = Theme.VS2019SystemName;
        base.OnStartup(e);
    }
}
vb
Class Application
    Protected Overrides Sub OnStartup(e As StartupEventArgs)
        ApplicationThemeHelper.ApplicationThemeName = Theme.VS2019SystemName
        MyBase.OnStartup(e)
    End Sub 
End Class

*System themes are available in the theme selector.

Note

Palettes cannot be applied to *System themes.

Apply a Touch Theme

DevExpress WPF Touch Themes affect only element appearance (size, paddings, margins, etc.). Refer to the following topic for more information on DevExpress WPF Controls Touch Support: Touch Support.

Append ;Touch to a theme name to apply the touch-friendly theme version:

Note

The TouchlineDark theme is touch-friendly (the default setting). You do not need to append ;Touch to its theme name.

xaml
<ThemedWindow ...
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
    dx:ThemeManager.ThemeName="Office2013;Touch">
    ...
</ThemedWindow>

Show touch-friendly theme list

NameThemeManager.ThemeName
Office 2019 BlackOffice2019Black;Touch
Office 2019 ColorfulOffice2019Colorful;Touch
Office 2019 DarkGrayOffice2019DarkGray;Touch
Office 2019 HighContrastOffice2019HighContrast;Touch
Office 2019 WhiteOffice2019White;Touch
Office 2016 Black SEOffice2016BlackSE;Touch
Office 2016 Colorful SEOffice2016ColorfulSE;Touch
Office 2016 DarkGray SEOffice2016DarkGraySE;Touch
Office 2016 White SEOffice2016WhiteSE;Touch
Office 2016 BlackOffice2016Black;Touch
Office 2016 ColorfulOffice2016Colorful;Touch
Office 2016 WhiteOffice2016White;Touch
Office 2013Office2013;Touch
Office 2013 DarkGrayOffice2013DarkGray;Touch
Office 2013 LightGrayOffice2013LightGray;Touch
TouchlineDarkTouchlineDark

Preload Themes

Controls load theme resources when you run the application. Use the PreloadThemeResourceAsync method to load and cache all the theme resources asynchronously at application startup. The method reduces application freezes. You can set the runTypeInitializers method parameter to true to invoke static constructors and speed up control initialization.

See the following help topic for additional information: Preload Theme Resources.

Lightweight Templates

Lightweight Templates contain fewer visual elements and reduce the time it takes to load DevExpress WPF Controls. The following themes support Lightweight Templates:

Theme FamilyThemes
Windows 11Dark, Light
Windows 10Dark, Light
Office 2019Black, Colorful, Dark Gray, White, HighContrast
Visual Studio 2019Blue, Dark, Light
Office 2016 SEBlack, Colorful, Dark Gray, White
Visual Studio 2017Blue, Dark, Light

The following table lists DevExpress WPF Controls that support Lightweight Templates and the properties you should use to enable/disable Lightweight Templates:

ControlProperty
BarItemCompatibilitySettings.UseLightweightBarItems
GridControlTableView.UseLightweightTemplates
PivotGridControlPivotGridControl.UseLightweightTemplates
RibbonControlCompatibilitySettings.UseLightweightBarItems

Tip

Refer to the following topics for more information on Lightweight Templates: GridControl Optimized Mode, Ribbon Lightweight Templates.

Standard WPF Control Properties

You can specify the Background , BorderBrush , and BorderThickness property values to change the appearance of Standard WPF Controls when an application uses one of the following DevExpress WPF Themes :

Theme FamilyThemes
Windows 11Dark, Light
Windows 10Dark, Light
Office 2019Black, Colorful, Dark Gray, White, HighContrast
Visual Studio 2019Blue, Dark, Light
Office 2016 SEBlack, Colorful, Dark Gray, White
Visual Studio 2017Blue, Dark, Light

The following code sample sets the Standard WPF Button‘s Background property to Red when the Office2016WhiteSE theme is applied:

xaml
<dx:ThemedWindow 
    ...
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
    dx:ThemeManager.Theme="Office2016WhiteSE">
    <Grid>
        <Button Content="Button" Background="Red" />
    </Grid>
</dx:ThemedWindow>

Footnotes

  1. The theme that is applied when the Windows app mode is set to Light.

  2. The theme that is applied when the Windows app mode is set to Dark.

  3. These themes can adjust their colors based on the Windows accent color setting. Refer to the following link for more information: Windows Accent Color and App Mode Support.

See Also

Theme List

Customize Themes

Lightweight Themes