wpf-devexpress-dot-xpf-dot-core-dot-theme-a1673b9a.md
Gets or sets whether to cache the current palette theme assembly. This is a dependency property.
Namespace : DevExpress.Xpf.Core
Assembly : DevExpress.Xpf.Core.v25.2.dll
NuGet Package : DevExpress.Wpf.Core
public static bool CachePaletteThemes { get; set; }
Public Shared Property CachePaletteThemes As Boolean
| Type | Description |
|---|---|
| Boolean |
true, to cache the current palette theme assembly; otherwise, false.
|
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.
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";
Theme.PaletteThemeCacheDirectory = "C:\DevExpress\PaletteThemeCache"
To remove the directory with the cached assemblies, use the Theme.ClearPaletteThemeCache method:
Theme.ClearPaletteThemeCache();
Theme.ClearPaletteThemeCache()
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";
Theme.CachePaletteThemes = True
Theme.RegisterPredefinedPaletteThemes()
ApplicationThemeHelper.ApplicationThemeName = "RedWineOffice2019Colorful"
See Also