Back to Devexpress

ApplicationThemeHelper.ApplicationThemeName Property

wpf-devexpress-dot-xpf-dot-core-dot-applicationthemehelper.md

latest6.7 KB
Original Source

ApplicationThemeHelper.ApplicationThemeName Property

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

Declaration

csharp
public static string ApplicationThemeName { get; set; }
vb
Public Shared Property ApplicationThemeName As String

Property Value

TypeDescription
String

A String value that specifies the theme name.

|

Remarks

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.

mvvm-application-with-wpf-bars/CS/Step 2 - creating view 1 (PersonViewModel and PersonView)/App.xaml.cs#L17

csharp
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

csharp
private void Button_Click(object sender, RoutedEventArgs e) {
    ApplicationThemeHelper.ApplicationThemeName = Theme.DefaultThemeName;
}

wpf-spreadsheet-spell-check-cell-text/CS/App.xaml.cs#L16

csharp
{
    DevExpress.Xpf.Core.ApplicationThemeHelper.ApplicationThemeName =
    DevExpress.Xpf.Core.Theme.Office2019ColorfulName;

splashscreenmanager-startup-test/CS/App.xaml.cs#L14

csharp
Timer = Stopwatch.StartNew();
ApplicationThemeHelper.ApplicationThemeName = Theme.Office2019Colorful.Name;
//Test_SplashScreenManager_DefaultFluentSplashScreen();

wpf-scheduler-load-data-on-demand/CS/Shared/App.xaml.cs#L7

csharp
public App() {
    ApplicationThemeHelper.ApplicationThemeName = Theme.Office2019ColorfulName;
}

mvvm-application-with-wpf-bars/VB/Step 2 - creating view 1 (PersonViewModel and PersonView)/Application.xaml.vb#L19

vb
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

vb
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

vb
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

vb
Timer = Stopwatch.StartNew()
ApplicationThemeHelper.ApplicationThemeName = Theme.Office2019Colorful.Name
'Test_SplashScreenManager_DefaultFluentSplashScreen();

wpf-scheduler-load-data-on-demand/VB/Shared/App.xaml.vb#L9

vb
Public Sub New()
    ApplicationThemeHelper.ApplicationThemeName = Theme.Office2019ColorfulName
End Sub

See Also

ApplicationThemeHelper Class

ApplicationThemeHelper Members

DevExpress.Xpf.Core Namespace