Skip to main content

ApplicationThemeHelper.ApplicationThemeName Property

Gets or sets the name of the theme applied to the entire application.

Namespace: DevExpress.Xpf.Core

Assembly: DevExpress.Data.Desktop.v24.1.dll

NuGet Packages: DevExpress.Data.Desktop, DevExpress.ExpressApp.Win.Design

Declaration

public static string ApplicationThemeName { get; set; }

Property Value

Type Description
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

    ...
    <configuration>
        <configSections>
            <section name="DXThemeManager"
            type="System.Configuration.ClientSettingsSection, System,Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
            allowExeDefinition="MachineToLocalUser" requirePermission="false" />
        </configSections>
        <DXThemeManager>
            <setting name="ApplicationThemeName" serializeAs="String">
                <value>Office2019Colorful</value>
            </setting>
        </DXThemeManager>
    </configuration>
    ...
    
  • .NET Framework

    <configuration>
      <configSections>
        <sectionGroup name="userSettings"
        type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
          <section name="DXThemeManager"
          type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
          allowExeDefinition="MachineToLocalUser" requirePermission="false" />
        </sectionGroup>
      </configSections>
      <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
      </startup>
      <userSettings>
        <DXThemeManager>
          <setting name="ApplicationThemeName" serializeAs="String">
            <value>Office2019Colorful</value>
          </setting>
        </DXThemeManager>
      </userSettings>
    </configuration>
    

    Note

    To apply a theme, the SectionGroups code section is required. The section does not contain any specific information about the current version of DevExpress controls nor of your application.

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.

See Also