Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ApplicationThemeHelper.ConfigurationUserLevel Property

Gets or sets where to save the application theme name.

Namespace: DevExpress.Xpf.Core

Assembly: DevExpress.Xpf.Core.v24.2.dll

NuGet Package: DevExpress.Wpf.Core

#Declaration

public static ConfigurationUserLevel ConfigurationUserLevel { get; set; }

#Property Value

Type Default Description
ConfigurationUserLevel PerUserRoaming

A path to the application configuration file.

#Remarks

The ConfigurationUserLevel property specifies the path used by the SaveApplicationThemeName() method to save the name of the theme applied at runtime:

ConfigurationUserLevel.PerUserRoaming (default value)
Saves the applied theme name to the %AppData%\{AppName}\{AppName.exe_Url_id}\{version}\user.config file.
ConfigurationUserLevel.PerUserRoamingAndLocal
Saves the applied theme name to the %LocalAppData%\{AppName}\{AppName.exe_Url_id}\{version}\user.config file.
ConfigurationUserLevel.None
Saves the applied theme name to the application configuration file ({AppDirectory}\{AppName.exe}.Config).

The following code sample demonstrates how to use the ConfigurationUserLevel property:

public partial class App : Application {
    public App() {
        // ...
    }
    static App() {
        ApplicationThemeHelper.ConfigurationUserLevel = ConfigurationUserLevel.None;
    }
    protected override void OnExit(ExitEventArgs e) {
        base.OnExit(e);
        ApplicationThemeHelper.SaveApplicationThemeName();
    }
}

Refer to the following help topic for more information: WPF Application Themes.

See Also