VSColorTheme.GetThemedColor(ThemeResourceKey) Method

Definition

Gets a VS color value from the current theme. This function offers similar functionality to VsColors.GetThemedGDIColor, but caches the returned color value until the theme is changed for subsequent retrieval of the color with same themeResourceKey.

C++
public:
 static System::Drawing::Color GetThemedColor(Microsoft::VisualStudio::Shell::ThemeResourceKey ^ themeResourceKey);

Parameters

themeResourceKey
ThemeResourceKey

The identifier of the color to retrieve

Returns

The color value

Applies to

Product Versions
Visual Studio SDK 2015, 2017, 2019, 2022