Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Theme.CreateTheme(Win10Palette) Method

Creates a new Theme with a Win10Palette.

Namespace: DevExpress.Xpf.Core

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

NuGet Package: DevExpress.Wpf.Core

#Declaration

public static Theme CreateTheme(
    Win10Palette palette
)

#Parameters

Name Type Description
palette Win10Palette

A Win10Palette instance.

#Returns

Type Description
Theme

The new theme.

#Example

The code sample below performs the following actions:

  1. Creates a theme based on Win10Dark/Win10Light theme depending on the Windows app mode.
  2. Applies the Windows accent color to the palette.
  3. Applies the theme on application startup.
protected override void OnStartup(StartupEventArgs e) {
    var palette = new Win10Palette(true);
    var theme = Theme.CreateTheme(palette);
    Theme.RegisterTheme(theme);
    ApplicationThemeHelper.ApplicationThemeName = theme.Name;
    base.OnStartup(e);
}
See Also