WindowsFormsSettings.TrackWindowsAccentColor Property
Gets or sets whether to use the Accent Color setting in Windows OS and apply it to all color palettes of vector skins except the High Contrast skin.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.Utils.v24.1.dll
NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core
Declaration
Property Value
Type | Description |
---|---|
DefaultBoolean |
|
Available values:
Name | Description | Return Value |
---|---|---|
True | The value is true. |
|
False | The value is false. |
|
Default | The value is specified by a global option or a higher-level object. |
|
Remarks
Important
The WindowsFormsSettings.TrackWindowsAccentColor
setting does not work in the High Contrast skin.
using DevExpress.XtraEditors;
static void Main() {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
WindowsFormsSettings.TrackWindowsAccentColor = DevExpress.Utils.DefaultBoolean.True;
Application.Run(new Form1());
}
The following example demonstrates how to obtain the system accent color:
using System.Drawing;
using DevExpress.Utils.Drawing.Helpers;
Color systemAccentColor = NativeMethods.GetWindowsAccentColor();
Custom Accent Color
Use the SetAccentColor method to specify a custom accent color (that takes priority over the system accent color).
The following example demonstrates how to reset the accent color:
Note
“The Bezier” skin supports the second accent color. Other skins do not support the second accent color.
Use the SetAccentColor2 method to specify the second accent color.
Tip
Read the following topic for information on how to display pre-designed Ribbon UI commands that correspond to advanced skin settings: Add and Customize the Ribbon Skin List and Skin Gallery.