Back to Devexpress

WindowsFormsSettings.GetAccentColor() Method

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

latest2.8 KB
Original Source

WindowsFormsSettings.GetAccentColor() Method

Returns a custom accent color.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.Utils.v25.2.dll

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

Declaration

csharp
public static Color GetAccentColor()
vb
Public Shared Function GetAccentColor As Color

Returns

TypeDescription
Color

The accent color.

|

Remarks

Use the SetAccentColor and SetAccentColor2 methods to specify custom accent colors.

If the TrackWindowsAccentColor option is enabled and a custom accent color is specified, the custom accent color takes priority over the system accent color.

The following example demonstrates how to obtain the system accent color:

csharp
using System.Drawing;
using DevExpress.Utils.Drawing.Helpers;

Color systemAccentColor = NativeMethods.GetWindowsAccentColor();
vb
Imports System.Drawing
Imports DevExpress.Utils.Drawing.Helpers

Private systemAccentColor As Color = NativeMethods.GetWindowsAccentColor()

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.

See Also

TrackWindowsAccentColor

SetAccentColor

SetAccentColor2

GetAccentColor2()

WindowsFormsSettings Class

WindowsFormsSettings Members

DevExpress.XtraEditors Namespace