Theme Class

A WPF theme.

Namespace: DevExpress.Xpf.Core

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

Declaration

public class Theme
Public Class Theme

Related API Members

The following members accept/return Theme objects:

Library Related API Members
WPF Controls Theme.CreateTheme(ThemePaletteBase, Theme, String, String, String, Uri, Uri, Uri)
Theme.FindTheme(String)
ThemeManager.GetTheme(DependencyObject)
Silverlight Controls ThemeManager.GetTheme(DependencyObject)

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