TokenInfo.Color Property
Determines the color index to use for the token.
Namespace: Microsoft.VisualStudio.Package
Assembly: Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Syntax
'Declaration
Public Property Color As TokenColor
'Usage
Dim instance As TokenInfo
Dim value As TokenColor
value = instance.Color
instance.Color = value
public TokenColor Color { get; set; }
public:
property TokenColor Color {
TokenColor get ();
void set (TokenColor value);
}
public function get Color () : TokenColor
public 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.