Skip to main content

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

PredefinedThemePalettes Class

Lists the predefined theme palettes.

Namespace: DevExpress.Xpf.Core

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

NuGet Package: DevExpress.Wpf.Core

#Declaration

public static class PredefinedThemePalettes

#Remarks

You can use predefined palettes with the following themes:

Theme Family Themes
Windows 10 Dark, Light
Office 2019 Black, Colorful, Dark Gray, White, HighContrast
Visual Studio 2019 Blue, Dark, Light
Office 2016 SE Black, Colorful, Dark Gray, White
Visual Studio 2017 Blue, Dark, Light

#Apply a Palette in Code

  1. Reference the Mono.cecil NuGet package in your project.
  2. Call the Theme.RegisterPredefinedPaletteThemes method to enable predefined palettes.
  3. Set the ApplicationThemeHelper.ApplicationThemeName property to the predefined palette name and base theme name combination.

    Theme.RegisterPredefinedPaletteThemes();
    ApplicationThemeHelper.ApplicationThemeName = PredefinedThemePalettes.RedWine.Name + Theme.Office2019White.Name;
    

Tip

You can use the Theme.CachePaletteThemes property to cache the current palette theme assembly. The cache reduces load times in future application runs.

#Inheritance

Object
PredefinedThemePalettes
See Also