共用方式為


VsColors.GetThemedColorRgba(IVsUIShell5, ThemeResourceKey) Method

Definition

Gets a uint VS_RGBA value from the current theme for the given color key. The returned value ha the red channel in the low byte to the alpha channel in the high byte.

public:
[System::Runtime::CompilerServices::Extension]
 static System::UInt32 GetThemedColorRgba(Microsoft::VisualStudio::Shell::Interop::IVsUIShell5 ^ vsUIShell, Microsoft::VisualStudio::Shell::ThemeResourceKey ^ themeResourceKey);
public:
[System::Runtime::CompilerServices::Extension]
 static unsigned int GetThemedColorRgba(Microsoft::VisualStudio::Shell::Interop::IVsUIShell5 ^ vsUIShell, Microsoft::VisualStudio::Shell::ThemeResourceKey ^ themeResourceKey);
public static uint GetThemedColorRgba (this Microsoft.VisualStudio.Shell.Interop.IVsUIShell5 vsUIShell, Microsoft.VisualStudio.Shell.ThemeResourceKey themeResourceKey);
static member GetThemedColorRgba : Microsoft.VisualStudio.Shell.Interop.IVsUIShell5 * Microsoft.VisualStudio.Shell.ThemeResourceKey -> uint32
<Extension()>
Public Function GetThemedColorRgba (vsUIShell As IVsUIShell5, themeResourceKey As ThemeResourceKey) As UInteger

Parameters

vsUIShell
IVsUIShell5

The IVsUIShell5 service, used to get the color's value.

themeResourceKey
ThemeResourceKey

The key to find the color for.

Returns

The current theme's VS_RGBA value of the named color.

Applies to