共用方式為


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.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)

Syntax

'宣告
Public Property Color As TokenColor
    Get
    Set
'用途
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);
}
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.

注意

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

See Also

Reference

TokenInfo Class

TokenInfo Members

Microsoft.VisualStudio.Package Namespace