Back to Devexpress

Theme.Win10Dark Field

wpf-devexpress-dot-xpf-dot-core-dot-theme-dot-win10dark.md

latest2.9 KB
Original Source

Theme.Win10Dark Field

The Win10Dark theme.

Namespace : DevExpress.Xpf.Core

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public static Theme Win10Dark
vb
Public Shared Win10Dark As Theme

Field Value

TypeDescription
Theme

The Win10Dark theme (part of the Win10Category).

|

Remarks

Apply Windows Colors to a Win10Dark/Light Theme

Pass a Win10Palette object as a parameter to a Theme.CreateTheme method to generate a theme based on a Win10Dark or Win10Light DevExpress theme. The palette allows you to get the following Windows theme settings, listen to their changes, and apply them to your application:

  • Accent color
  • App Mode (Dark/Light)

Refer to the following Microsoft help topic for more information: Change colors in Windows

The Win10Palette works with Windows 10 and higher. If the palette cannot find a Windows accent color or an app mode, the application accent color and app mode are set to #FF0078D7 and Light, respectively.

The following code sample generates a new theme (based on the Win10Dark theme) with the Windows accent color and applies the theme on application startup:

csharp
protected override void OnStartup(StartupEventArgs e) {
    var palette = new Win10Palette();
    var theme = Theme.CreateTheme(palette, Theme.Win10Dark);
    Theme.RegisterTheme(theme);
    ApplicationThemeHelper.ApplicationThemeName = theme.Name;
    base.OnStartup(e);
}
vb
Protected Overrides Sub OnStartup(ByVal e As StartupEventArgs)
    Dim palette = New Win10Palette()
    Dim theme = Theme.CreateTheme(palette, Theme.Win10Dark)
    Theme.RegisterTheme(theme)
    ApplicationThemeHelper.ApplicationThemeName = theme.Name
    MyBase.OnStartup(e)
End Sub

See Also

Theme Class

Theme Members

DevExpress.Xpf.Core Namespace