共用方式為


VsColors.GetColorID Method

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

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

Syntax

'宣告
Public Shared Function GetColorID ( _
    vsColorKey As Object _
) As Integer
'用途
Dim vsColorKey As Object
Dim returnValue As Integer

returnValue = VsColors.GetColorID(vsColorKey)
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

Return Value

Type: System.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 VSCOLOR enumeration used with [M:Microsoft.VisualStudio.Shell.Interop.IVsUIShell2.GetVSSysColorEx(System.Int32,System.UInt32@))].

.NET Framework Security

See Also

Reference

VsColors Class

VsColors Members

Microsoft.VisualStudio.Shell Namespace