Partager via


TokenInfo.Color Property

Definition

Determines the color index to use for the token.

public:
 property Microsoft::VisualStudio::Package::TokenColor Color { Microsoft::VisualStudio::Package::TokenColor get(); void set(Microsoft::VisualStudio::Package::TokenColor value); };
public:
 property Microsoft::VisualStudio::Package::TokenColor Color { Microsoft::VisualStudio::Package::TokenColor get(); void set(Microsoft::VisualStudio::Package::TokenColor value); };
public Microsoft.VisualStudio.Package.TokenColor Color { get; set; }
member this.Color : Microsoft.VisualStudio.Package.TokenColor with get, set
Public Property Color As TokenColor

Property Value

Returns a color index cast to a TokenColor enumeration.

Remarks

The value handled by this property is an index into the ColorableItem list maintained by the LanguageService class. The TokenColor enumeration is just a guide to five typical color indices that correspond to the default ColorableItem list. If you supply your own ColorableItem list, you can make sure the first set of colorable items correspond to this enumeration and add more color indices beyond that or replace the enumeration values entirely with your own meaning.

Note

Color index 0 is reserved and always represents the default text color the user has specified. The scanner should return 0 for any token type of Text.

Applies to