Partager via


ProvideToolboxPageAttribute Constructor (Type, Int16, Int16, String)

Initializes a new instance of ProvideToolboxPageAttribute, using the Type of the class implementing the Customize Toolbox dialog page, a resource ID, a page order, and a help string.

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

Syntax

'Declaration
Public Sub New ( _
    pageType As Type, _
    nameResourceID As Short, _
    pageOrder As Short, _
    helpKeyword As String _
)
public ProvideToolboxPageAttribute(
    Type pageType,
    short nameResourceID,
    short pageOrder,
    string helpKeyword
)
public:
ProvideToolboxPageAttribute(
    Type^ pageType, 
    short nameResourceID, 
    short pageOrder, 
    String^ helpKeyword
)
new : 
        pageType:Type * 
        nameResourceID:int16 * 
        pageOrder:int16 * 
        helpKeyword:string -> ProvideToolboxPageAttribute
public function ProvideToolboxPageAttribute(
    pageType : Type, 
    nameResourceID : short, 
    pageOrder : short, 
    helpKeyword : String
)

Parameters

  • pageType
    Type: Type

    [in] The type of the class implementing the Customize Toolbox dialog page. This type must derive from the DialogPage class.

  • nameResourceID
    Type: Int16

    [in] The native resource ID in a VSPackage's satellite dll containing the name for the tab of hosting this Customize Toolbox dialog page.

  • pageOrder
    Type: Int16

    [in] The Customize Toolbox dialog page placement in the pages of the Visual Studio Customize Toolbox Dialog box.

    A value of zero indicates that no order is requested.

  • helpKeyword
    Type: String

    [in] A help keyword used by the help system to find the correct help topic information.

Remarks

This method throws ArgumentException if pageType does not inherit from the DialogPage class.

It is up to the implementer to ensure that the provided keyword is integrated into the help indexing system.

Examples

This example shows how to register the Customize Toolbox dialog page implementation MyToolBoxPage as being provided by MyPackage. The name resource of the tab containing the page is 1002, page order of the page is 1 (indicating that it should be placed first), and a help keyword of "MyToolboxDialog".

    [ProvideToolboxPage(typeof(VsToolboxPage), 1002, 1 , "MyToolboxDialog")]
    [Guid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")]
    class VSCorePackage : Package

.NET Framework Security

See Also

Reference

ProvideToolboxPageAttribute Class

ProvideToolboxPageAttribute Overload

Microsoft.VisualStudio.Shell Namespace