ProvideToolboxPageAttribute Constructor (Type, Int16, Int16)

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

Namespace:  Microsoft.VisualStudio.Shell
Assemblies:   Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
  Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)

Syntax

‘선언
Public Sub New ( _
    pageType As Type, _
    nameResourceID As Short, _
    pageOrder As Short _
)
‘사용 방법
Dim pageType As Type
Dim nameResourceID As Short
Dim pageOrder As Short

Dim instance As New ProvideToolboxPageAttribute(pageType, _
    nameResourceID, pageOrder)
public ProvideToolboxPageAttribute(
    Type pageType,
    short nameResourceID,
    short pageOrder
)
public:
ProvideToolboxPageAttribute(
    Type^ pageType, 
    short nameResourceID, 
    short pageOrder
)
new : 
        pageType:Type * 
        nameResourceID:int16 * 
        pageOrder:int16 -> ProvideToolboxPageAttribute
public function ProvideToolboxPageAttribute(
    pageType : Type, 
    nameResourceID : short, 
    pageOrder : short
)

Parameters

  • pageType
    Type: System.Type
    [in] The type of the class implementing the Customize Toolbox dialog page. This type must derive from the DialogPage class.
  • nameResourceID
    Type: System.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: System.Int16
    [in] The Customize Toolbox dialog page placement in the pages of the Visual Studio Customize Toolbox Dialog.
    A value of 0 indicates that no order is requested.

Remarks

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

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).

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

.NET Framework Security

See Also

Reference

ProvideToolboxPageAttribute Class

ProvideToolboxPageAttribute Members

ProvideToolboxPageAttribute Overload

Microsoft.VisualStudio.Shell Namespace