Export (0) Print
Expand All

VisualStyleRenderer.GetColor Method

Note: This method is new in the .NET Framework version 2.0.

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

Namespace: System.Windows.Forms.VisualStyles
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public Color GetColor (
	ColorProperty prop
)
public Color GetColor (
	ColorProperty prop
)
public function GetColor (
	prop : ColorProperty
) : Color

Parameters

prop

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

Return Value

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

Exception typeCondition

InvalidEnumArgumentException

prop is not one of the ColorProperty values.

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.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2014 Microsoft