wpf-devexpress-dot-xpf-dot-core-dot-applicationthemehelper.md
Gets or sets the name of the theme applied to the entire application.
Namespace : DevExpress.Xpf.Core
Assembly : DevExpress.Xpf.Core.v25.2.dll
NuGet Package : DevExpress.Wpf.Core
public static string ApplicationThemeName { get; set; }
Public Shared Property ApplicationThemeName As String
| Type | Description |
|---|---|
| String |
A String value that specifies the theme name.
|
The default value is Office2019Colorful. If the ApplicationThemeName property is set to “None”, the DeepBlue theme is applied to the application.
Refer to the List of DevExpress WPF Themes topic for more information.
Tip
Use the ApplicationThemeHelper.SaveApplicationThemeName method to save the current theme name (defined using the ApplicationThemeName property) to the application configuration file. To retrieve the theme name from the configuration file, call the ApplicationThemeHelper.UpdateApplicationThemeName method.
The following code snippet applies the Office2019Colorful theme to the application.
.NET
.NET Framework
Refer to the WPF Themes topic for more information.
The following code snippets (auto-collected from DevExpress Examples) contain references to the ApplicationThemeName property.
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.
base.OnStartup(e);
ApplicationThemeHelper.ApplicationThemeName = "Office2007Silver";
MainWindow = new DXWindow() { Title = "How to use the DevExpress components with MVVM pattern", Width = 525, Height = 350 };
wpf-use-devexpress-theme-in-applications/CS/DevExpress.Examples.ThemeSwitcher/MainWindow.xaml.cs#L58
private void Button_Click(object sender, RoutedEventArgs e) {
ApplicationThemeHelper.ApplicationThemeName = Theme.DefaultThemeName;
}
wpf-spreadsheet-spell-check-cell-text/CS/App.xaml.cs#L16
{
DevExpress.Xpf.Core.ApplicationThemeHelper.ApplicationThemeName =
DevExpress.Xpf.Core.Theme.Office2019ColorfulName;
splashscreenmanager-startup-test/CS/App.xaml.cs#L14
Timer = Stopwatch.StartNew();
ApplicationThemeHelper.ApplicationThemeName = Theme.Office2019Colorful.Name;
//Test_SplashScreenManager_DefaultFluentSplashScreen();
wpf-scheduler-load-data-on-demand/CS/Shared/App.xaml.cs#L7
public App() {
ApplicationThemeHelper.ApplicationThemeName = Theme.Office2019ColorfulName;
}
MyBase.OnStartup(e)
ApplicationThemeHelper.ApplicationThemeName = "Office2007Silver"
MainWindow = New DXWindow() With {.Title = "How to use the DevExpress components with MVVM pattern", .Width = 525, .Height = 350}
wpf-use-devexpress-theme-in-applications/VB/DevExpress.Examples.ThemeSwitcher/MainWindow.xaml.vb#L54
Private Sub Button_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
ApplicationThemeHelper.ApplicationThemeName = Theme.DefaultThemeName
End Sub
wpf-spreadsheet-spell-check-cell-text/VB/App.xaml.vb#L12
Protected Overrides Sub OnStartup(ByVal e As StartupEventArgs)
DevExpress.Xpf.Core.ApplicationThemeHelper.ApplicationThemeName = DevExpress.Xpf.Core.Theme.Office2019ColorfulName
MyBase.OnStartup(e)
splashscreenmanager-startup-test/VB/App.xaml.vb#L18
Timer = Stopwatch.StartNew()
ApplicationThemeHelper.ApplicationThemeName = Theme.Office2019Colorful.Name
'Test_SplashScreenManager_DefaultFluentSplashScreen();
wpf-scheduler-load-data-on-demand/VB/Shared/App.xaml.vb#L9
Public Sub New()
ApplicationThemeHelper.ApplicationThemeName = Theme.Office2019ColorfulName
End Sub
See Also