Share via


ColorableItem.GetDefaultColors Method

Returns the foreground and background color for this colorable item.

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

Syntax

'Declaration
Public Overridable Function GetDefaultColors ( _
    foreColor As COLORINDEX(), _
    backColor As COLORINDEX() _
) As Integer
public virtual int GetDefaultColors(
    COLORINDEX[] foreColor,
    COLORINDEX[] backColor
)
public:
virtual int GetDefaultColors(
    array<COLORINDEX>^ foreColor, 
    array<COLORINDEX>^ backColor
)
abstract GetDefaultColors : 
        foreColor:COLORINDEX[] * 
        backColor:COLORINDEX[] -> int  
override GetDefaultColors : 
        foreColor:COLORINDEX[] * 
        backColor:COLORINDEX[] -> int
public function GetDefaultColors(
    foreColor : COLORINDEX[], 
    backColor : COLORINDEX[]
) : int

Parameters

Return Value

Type: Int32
If successful, returns S_OK; otherwise, returns an error code.

Implements

IVsColorableItem.GetDefaultColors(array<COLORINDEX[], array<COLORINDEX[])

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.

.NET Framework Security

See Also

Reference

ColorableItem Class

Microsoft.VisualStudio.Package Namespace