TokenInfo.Color Property
Determines the color index to use for the token.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Syntax
'Declaration
Public Property Color As TokenColor
public TokenColor Color { get; set; }
public:
property TokenColor Color {
TokenColor get ();
void set (TokenColor value);
}
member Color : TokenColor with get, set
function get Color () : TokenColor
function set Color (value : TokenColor)
Property Value
Type: Microsoft.VisualStudio.Package.TokenColor
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.