Partager via


VsColors.GetColorID Method

Gets the __VSSYSCOLOREX identifier for a given WPF color resource key.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
Public Shared Function GetColorID ( _
    vsColorKey As Object _
) As Integer
public static int GetColorID(
    Object vsColorKey
)
public:
static int GetColorID(
    Object^ vsColorKey
)
static member GetColorID : 
        vsColorKey:Object -> int
public static function GetColorID(
    vsColorKey : Object
) : int

Parameters

  • vsColorKey
    Type: Object

    The Visual Studio color key.

Return Value

Type: Int32
The color ID.

Remarks

The input is a key that can be used to reference the color in Visual Studio from XAML. The output is an identifier from the __VSSYSCOLOREX enumeration used with GetVSSysColorEx.

.NET Framework Security

See Also

Reference

VsColors Class

Microsoft.VisualStudio.Shell Namespace