wpf-devexpress-dot-xpf-dot-core-dot-applicationthemehelper-318e1187.md
Gets or sets where to save the application theme name.
Namespace : DevExpress.Xpf.Core
Assembly : DevExpress.Xpf.Core.v25.2.dll
NuGet Package : DevExpress.Wpf.Core
public static ConfigurationUserLevel ConfigurationUserLevel { get; set; }
Public Shared Property ConfigurationUserLevel As ConfigurationUserLevel
| Type | Default | Description |
|---|---|---|
| ConfigurationUserLevel | PerUserRoaming |
A path to the application configuration file.
|
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.PerUserRoamingAndLocalSaves the applied theme name to the %LocalAppData%\{AppName}\{AppName.exe_Url_id}\{version}\user.config file.ConfigurationUserLevel.NoneSaves 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();
}
}
Public Partial Class App
Inherits Application
Public Sub New()
' ...
End Sub
Private Shared Sub New()
ApplicationThemeHelper.ConfigurationUserLevel = ConfigurationUserLevel.None
End Sub
Protected Overrides Sub OnExit(ByVal e As ExitEventArgs)
MyBase.OnExit(e)
ApplicationThemeHelper.SaveApplicationThemeName()
End Sub
End Class
Refer to the following help topic for more information: WPF Application Themes.
See Also