wpf-devexpress-dot-xpf-dot-core-dot-theme-dot-createtheme-x28-devexpress-dot-xpf-dot-core-dot-themepalettebase-devexpress-dot-xpf-dot-core-dot-theme-system-dot-string-system-dot-string-system-dot-string-system-dot-uri-system-dot-uri-system-dot-uri-x29.md
Creates a new Theme with the specified settings.
Namespace : DevExpress.Xpf.Core
Assembly : DevExpress.Xpf.Core.v25.2.dll
NuGet Package : DevExpress.Wpf.Core
public static Theme CreateTheme(
ThemePaletteBase palette,
Theme baseTheme,
string themeName = null,
string fullThemeName = null,
string category = null,
Uri smallGlyph = null,
Uri largeGlyph = null,
Uri svgGlyph = null
)
Public Shared Function CreateTheme(
palette As ThemePaletteBase,
baseTheme As Theme,
themeName As String = Nothing,
fullThemeName As String = Nothing,
category As String = Nothing,
smallGlyph As Uri = Nothing,
largeGlyph As Uri = Nothing,
svgGlyph As Uri = Nothing
) As Theme
| Name | Type | Description |
|---|---|---|
| palette | ThemePaletteBase |
A ThemePaletteBase that specifies the palette.
| | baseTheme | Theme |
A Theme that specifies the base theme.
|
| Name | Type | Default | Description |
|---|---|---|---|
| themeName | String | null |
A String that specifies the theme name.
| | fullThemeName | String | null |
A String that specifies the theme full name.
| | category | String | null |
A String that specifies the name of the theme category.
| | smallGlyph | Uri | null |
A Uri that specifies the uniform resource identifier of the theme small icon.
| | largeGlyph | Uri | null |
A Uri that specifies the uniform resource identifier of the theme large icon.
| | svgGlyph | Uri | null |
A Uri that specifies the uniform resource identifier of the theme vector (SVG) icon.
|
| Type | Description |
|---|---|
| Theme |
A Theme that specifies the new theme.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the CreateTheme(ThemePaletteBase, Theme, String, String, String, Uri, Uri, Uri) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
wpf-create-a-fluent-design-using-appearance-options/CS/FluentDesignTemplate/App.xaml.cs#L34
custompalette.SetColor("SelectionForeground", (Color)ColorConverter.ConvertFromString("White"));
var customtheme = Theme.CreateTheme(custompalette, Theme.Office2019Black);
Theme.RegisterTheme(customtheme);
wpf-mvvm-behaviors-gallery-based-theme-palette-selector/CS/App.xaml.cs#L12
customPalette.SetColor("Foreground", Colors.Red);
var customTheme = Theme.CreateTheme(customPalette, Theme.Office2016ColorfulSE);
Theme.RegisterTheme(customTheme);
wpf-create-a-fluent-design-using-appearance-options/VB/FluentDesignTemplate/App.xaml.vb#L29
custompalette.SetColor("SelectionForeground", CType(ColorConverter.ConvertFromString("White"), Color))
Dim customtheme = Theme.CreateTheme(custompalette, Theme.Office2019Black)
Theme.RegisterTheme(customtheme)
wpf-mvvm-behaviors-gallery-based-theme-palette-selector/VB/App.xaml.vb#L14
customPalette.SetColor("Foreground", Colors.Red)
Dim customTheme = Theme.CreateTheme(customPalette, Theme.Office2016ColorfulSE)
Theme.RegisterTheme(customTheme)
See Also