Back to Devexpress

WindowsFormsSettings.TrackWindowsAppMode Property

windowsforms-devexpress-dot-xtraeditors-dot-windowsformssettings.md

latest4.7 KB
Original Source

WindowsFormsSettings.TrackWindowsAppMode Property

Gets or sets whether your application tracks the Default App Mode setting in Windows OS and displays only light or dark color palettes in a Skin gallery. This setting works only in “WXI”, “Basic”, and “The Bezier” skins.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.Utils.v25.2.dll

NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core

Declaration

csharp
public static DefaultBoolean TrackWindowsAppMode { get; set; }
vb
Public Shared Property TrackWindowsAppMode As DefaultBoolean

Property Value

TypeDescription
DefaultBoolean

DefaultBoolean.True to track the Default App Mode setting in Windows OS; otherwise, DefaultBoolean.False or DefaultBoolean.Default.

|

Available values:

NameDescriptionReturn Value
True

The value is true.

|

0

| | False |

The value is false.

|

1

| | Default |

The value is specified by a global option or a higher-level object.

|

2

|

Remarks

Note

The WindowsFormsSettings.TrackWindowsAppMode setting works only in “WXI”, “Basic”, and “The Bezier” skins.

csharp
static void Main() {
    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    WindowsFormsSettings.TrackWindowsAppMode = DevExpress.Utils.DefaultBoolean.True;
    Application.Run(new Form1());
}
vb
Shared Sub Main()
    Application.EnableVisualStyles()
    Application.SetCompatibleTextRenderingDefault(False)
    WindowsFormsSettings.TrackWindowsAppMode = DevExpress.Utils.DefaultBoolean.True
    Application.Run(New Form1())
End Sub

Tip

Read the following topic for information on how to display pre-designed Ribbon UI commands that correspond to advanced skin settings: Ribbon Skin Selectors.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the TrackWindowsAppMode 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.

winforms-reporting-add-ai-options-to-report-wizard/CS/Program.cs#L22

csharp
DevExpress.XtraEditors.WindowsFormsSettings.SetDPIAware();
WindowsFormsSettings.TrackWindowsAppMode = DevExpress.Utils.DefaultBoolean.True;
Application.EnableVisualStyles();

winforms-reporting-add-ai-options-to-report-wizard/VB/Program.vb#L33

vb
WindowsFormsSettings.SetDPIAware()
WindowsFormsSettings.TrackWindowsAppMode = DevExpress.Utils.DefaultBoolean.[True]
Call Application.EnableVisualStyles()

See Also

TrackWindowsAccentColor

TrackSystemHighContrastMode

WindowsFormsSettings Class

WindowsFormsSettings Members

DevExpress.XtraEditors Namespace