All docs
V20.2
20.2 (EAP/Beta)
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
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.CachePaletteThemes Property

Gets or sets whether to cache the current palette theme assembly. This is a dependency property.

Namespace: DevExpress.Xpf.Core

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

Declaration

public static bool CachePaletteThemes { get; set; }
Public Shared Property CachePaletteThemes As Boolean

Property Value

Type Description
Boolean

true, to cache the current palette theme assembly; otherwise, false.

Remarks

You can cache the current palette theme's assembly to reduce the theme loading time. The application uses the cached assemblies at the current and the following application runs.

Specify the Cache Location

Use the Theme.PaletteThemeCacheDirectory property to specify the cache directory. The default cache directory is %LocalAppData%\DevExpress\PaletteThemeCache. The following code sample changes the default cache directory:

Theme.PaletteThemeCacheDirectory = "C:\\DevExpress\\PaletteThemeCache";

Clear the Cache

To remove the directory with the cached assemblies, use the Theme.ClearPaletteThemeCache method:

Theme.ClearPaletteThemeCache();

Example

The following code sample enables the palette theme assemblies caching to a default directory and applies the Office2019Colorful theme with the RedWine predefined palette to the application:

Theme.CachePaletteThemes = true;
Theme.RegisterPredefinedPaletteThemes();
ApplicationThemeHelper.ApplicationThemeName = "RedWineOffice2019Colorful";
See Also