Edit

Share via


SystemColors.UseAlternativeColorSet Property

Definition

Gets or sets a value that indicates whether the alternative color set is used.

public:
 static property bool UseAlternativeColorSet { bool get(); void set(bool value); };
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5002", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static bool UseAlternativeColorSet { get; set; }
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5002", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member UseAlternativeColorSet : bool with get, set
Public Shared Property UseAlternativeColorSet As Boolean

Property Value

When true, system KnownColor values will return the alternative color set (as returned by SystemColors statics or FromKnownColor(KnownColor)). This is currently "dark mode" variants of the system colors.

Attributes

Remarks

KnownColor Color values are always looked up every time you use them and do not retain any other context. As such, existing Color values will change when this property is set.

On Windows, system KnownColor values always return the current Windows color when the OS has a high contrast theme enabled.

Applies to