Partager via


VsColors Class

Map between VSCOLOR identifiers (used by GetVSSysColorEx and keys used by Windows Presentation Foundation ResourceDictionary objects.

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

Syntax

'Déclaration
Public NotInheritable Class VsColors
'Utilisation
You do not need to declare an instance of a static class in order to access its members.
public static class VsColors
public ref class VsColors abstract sealed
[<AbstractClassAttribute>]
[<SealedAttribute>]
type VsColors =  class end
public final class VsColors

Remarks

The keys provided by this class can be used to reference Color instances that Visual Studio places in Application.Current.Resources.

Examples

For example, this could be used from XAML to reference a Visual Studio color:

<Border Background="{DynamicResource {x:Static vsshell:VsBrushes.DropShadowBackgroundKey}}" xmlns:vsshell="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.10.0" />

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Shell.VsColors

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

VsColors Members

Microsoft.VisualStudio.Shell Namespace