Compartilhar via


IVsFontAndColorStorage2 Interface

Allows a VSPackage to manage registry font and color entries.

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

Syntax

'Declaration
<InterfaceTypeAttribute()> _
<GuidAttribute("1EE6C79A-B763-42E6-AC95-FD0CC00DE315")> _
Public Interface IVsFontAndColorStorage2
[InterfaceTypeAttribute()]
[GuidAttribute("1EE6C79A-B763-42E6-AC95-FD0CC00DE315")]
public interface IVsFontAndColorStorage2
[InterfaceTypeAttribute()]
[GuidAttribute(L"1EE6C79A-B763-42E6-AC95-FD0CC00DE315")]
public interface class IVsFontAndColorStorage2
[<InterfaceTypeAttribute()>]
[<GuidAttribute("1EE6C79A-B763-42E6-AC95-FD0CC00DE315")>]
type IVsFontAndColorStorage2 =  interface end
public interface IVsFontAndColorStorage2

The IVsFontAndColorStorage2 type exposes the following members.

Methods

  Name Description
Public method RevertAllItemsToDefault Revert all registry font and color entries to default values.
Public method RevertFontToDefault Revert all registry font entries to default values.
Public method RevertItemToDefault Revert the indicated registry font or color entry to its default value.

Top

Remarks

The Visual Studio environment provides an implementation of this interface. This interface allows a VSPackage to manage registry font and color entries. Use this interface in conjunction with the IVsFontAndColorStorage interface.

Notes to Implementers

COM programmers can obtain an IVsFontAndColorStorage2 interface by calling QueryService with the service ID SID_SVsFontAndColorStorage2 and the interface ID IID_IVsFontAndColorStorage2:

    CComPtr<IVsFontAndColorStorage2>  pStorage;
    hr = pSP->QueryService(SID_SVsFontAndColorStorage2, IID_IVsFontAndColorStorage2, (void**)&pStorage);
    VSASSERT(SUCCEEDED(hr), "IVsFontAndColorStorage2 not provided");

VSPackages developed using managed code can obtain an IVsFontAndColorStorage2 interface by calling GetService with an argument of SVsFontAndColorStorage2:

    IVsFontAndColorStorage2 store=null;
    store=GetService(typeof(SVsFontAndColorStorage2)) as IVsFontAndColorStorage2;
    if (store == null ){
        throw new ApplicationException("Unable to obtain IVsFontAndColorStorage2 Interface");
    }

See Also

Reference

Microsoft.VisualStudio.Shell.Interop Namespace

IVsFontAndColorStorage