Returns the foreground and background color for this colorable item.
Namespace: Microsoft.VisualStudio.Package
Assembly: Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Syntax
'宣言
Public Overridable Function GetDefaultColors ( _
foreColor As COLORINDEX(), _
backColor As COLORINDEX() _
) As Integer
'使用
Dim instance As ColorableItem
Dim foreColor As COLORINDEX()
Dim backColor As COLORINDEX()
Dim returnValue As Integer
returnValue = instance.GetDefaultColors(foreColor, _
backColor)
public virtual int GetDefaultColors(
COLORINDEX[] foreColor,
COLORINDEX[] backColor
)
public:
virtual int GetDefaultColors(
array<COLORINDEX>^ foreColor,
array<COLORINDEX>^ backColor
)
public function GetDefaultColors(
foreColor : COLORINDEX[],
backColor : COLORINDEX[]
) : int
Parameters
foreColor
Type: [][in, out] If not a null reference (Nothing in Visual Basic), this is where the COLORINDEX value for the text's foreground color is returned.
backColor
Type: [][in, out] If not a null reference (Nothing in Visual Basic), this is where the COLORINDEX value for the text's background color is returned.
Return Value
Type: System.Int32
If successful, returns S_OK; otherwise, returns an error code.
Implements
IVsColorableItem.GetDefaultColors([], [])
Remarks
The colors returned as the ones passed to the constructor.
The base method always returns S_OK. The base method is tolerant of a null value for foreColor and backColor so only one of the colors can be retrieved as desired.
Permissions
- 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.