You are viewing help content for pre-release software. This document and the features it describes are subject to change. Switch to the current version.

Theme Class

A WPF theme.

Namespace: DevExpress.Xpf.Core

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

Declaration

public class Theme
Public Class Theme

Remarks

You need to create a Theme class instance when you load and register a custom theme that you wish to use in a WPF application.

To do this, follow the steps below.

  1. Add a reference to an assembly that contains a custom theme.
  2. Create a Theme instance using the Theme constructor overload that takes two arguments: theme name (the one you have specified when creating the theme) and full name (includes namespace and version number) as shown below.

    Theme theme = new Theme("NewTheme");
    
  3. Specify the assembly name (matches the theme full name by default) using the Theme.AssemblyName property.
  4. Use the static Theme.RegisterTheme method to register the new theme in ThemeManager.
  5. Finally, apply the theme using the ThemeManager.SetTheme method.

All predefined themes shipped with DXperience subscriptions are already registered in the ThemeManager, so you do not need to create a Theme instance and register it manually.

To learn more, see List of DevExpress WPF Themes.

Inheritance

Object
Theme
See Also