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.v24.2.dll
NuGet Package: DevExpress.Wpf.Core
Declaration
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:
Clear the Cache
To remove the directory with the cached assemblies, use the Theme.ClearPaletteThemeCache method:
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";