VisualStyleRenderer.GetColor(ColorProperty) Method

Definition

Returns the value of the specified color property for the current visual style element.

C#
public System.Drawing.Color GetColor(System.Windows.Forms.VisualStyles.ColorProperty prop);

Parameters

prop
ColorProperty

One of the ColorProperty values that specifies which property value to retrieve for the current visual style element.

Returns

A Color that contains the value of the property specified by the prop parameter for the current visual style element.

Exceptions

prop is not one of the ColorProperty values.

Remarks

Visual styles use a set of color values to describe some properties of the elements defined by a style. These properties are encapsulated by the ColorProperty values.

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10