共用方式為


ColorableItem Constructor

Initializes the ColorableItem class and accepts all the information needed to describe a colorable item.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)

Syntax

'宣告
Public Sub New ( _
    name As String, _
    displayName As String, _
    foreColor As COLORINDEX, _
    backColor As COLORINDEX, _
    hiForeColor As Color, _
    hiBackColor As Color, _
    fontFlags As FONTFLAGS _
)
'用途
Dim name As String
Dim displayName As String
Dim foreColor As COLORINDEX
Dim backColor As COLORINDEX
Dim hiForeColor As Color
Dim hiBackColor As Color
Dim fontFlags As FONTFLAGS

Dim instance As New ColorableItem(name, displayName, _
    foreColor, backColor, hiForeColor, _
    hiBackColor, fontFlags)
public ColorableItem(
    string name,
    string displayName,
    COLORINDEX foreColor,
    COLORINDEX backColor,
    Color hiForeColor,
    Color hiBackColor,
    FONTFLAGS fontFlags
)
public:
ColorableItem(
    String^ name, 
    String^ displayName, 
    COLORINDEX foreColor, 
    COLORINDEX backColor, 
    Color hiForeColor, 
    Color hiBackColor, 
    FONTFLAGS fontFlags
)
new : 
        name:string * 
        displayName:string * 
        foreColor:COLORINDEX * 
        backColor:COLORINDEX * 
        hiForeColor:Color * 
        hiBackColor:Color * 
        fontFlags:FONTFLAGS -> ColorableItem
public function ColorableItem(
    name : String, 
    displayName : String, 
    foreColor : COLORINDEX, 
    backColor : COLORINDEX, 
    hiForeColor : Color, 
    hiBackColor : Color, 
    fontFlags : FONTFLAGS
)

Parameters

  • name
    Type: System.String
    [in] The name of the colorable item. This can be used in the properties listing if you support customizing your own custom colors.
  • displayName
    Type: System.String
    [in] The name of the colorable item that is displayed in the Fonts and Colors list of colors. This is the localized name.
  • hiForeColor
    Type: System.Drawing.Color
    [in] A Color structure describing the foreground color in terms of red, green, blue components. This value can be Empty if high colors are not used.
  • hiBackColor
    Type: System.Drawing.Color
    [in] A Color structure describing the background color in terms of red, green, blue components. This value can be Empty if high colors are not used.

Remarks

All of this information must be specified for each colorable item.

.NET Framework Security

See Also

Reference

ColorableItem Class

ColorableItem Members

Microsoft.VisualStudio.Package Namespace