Partager via


IVsFontAndColorDefaults.GetBaseCategory Method

IVsFontAndColorDefaults::GetBaseCategory allows a VSPackage that manages fonts and colors to change the behavior of the Use Defaults button of the Fonts and Colors properties page.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
Function GetBaseCategory ( _
    <OutAttribute> ByRef pguidBase As Guid _
) As Integer
int GetBaseCategory(
    out Guid pguidBase
)
int GetBaseCategory(
    [OutAttribute] Guid% pguidBase
)
abstract GetBaseCategory : 
        pguidBase:Guid byref -> int
function GetBaseCategory(
    pguidBase : Guid
) : int

Parameters

  • pguidBase
    Type: Guid%

    [out] Pointer to a GUID specifying the base category for a client.

Return Value

Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsFontAndColorDefaults::GetBaseCategory(
   [out] GUID *pguidBase
);

If the Use Defaults button of the Fonts and Colors properties page is selected, settings are not automatically returning to their original default values (defined as the Category's implementation of the IVsFontAndColorDefaults interface).

Instead, users are prompted to choose the defaults defined for the original Category, or those defined for the Category returned by this method.

An example of this can be found in the Printer Category. A user selecting Use Defaults can choose to use the original defaults of the Printer Category or use the Text Editor Category as a default setting.

.NET Framework Security

See Also

Reference

IVsFontAndColorDefaults Interface

Microsoft.VisualStudio.Shell.Interop Namespace