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.
- foreColor
Type: Microsoft.VisualStudio.TextManager.Interop.COLORINDEX
[in] The text's foreground color as specified by a value from the COLORINDEX enumeration.
- backColor
Type: Microsoft.VisualStudio.TextManager.Interop.COLORINDEX
[in] The text's background color as specified by a value from the COLORINDEX enumeration.
- 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.
- fontFlags
Type: Microsoft.VisualStudio.TextManager.Interop.FONTFLAGS
[in] A set of flags from the FONTFLAGS enumeration describing how the text is to be rendered.
Remarks
All of this information must be specified for each colorable item.
.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.