ProvideToolboxPageAttribute Constructor (Type, Int16)
Initializes a new instance of ProvideToolboxPageAttribute, using the type of the class implementing the Customize Toolbox dialog page, and a resource ID.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)
Syntax
'Declaration
Public Sub New ( _
pageType As Type, _
nameResourceID As Short _
)
public ProvideToolboxPageAttribute(
Type pageType,
short nameResourceID
)
public:
ProvideToolboxPageAttribute(
Type^ pageType,
short nameResourceID
)
new :
pageType:Type *
nameResourceID:int16 -> ProvideToolboxPageAttribute
public function ProvideToolboxPageAttribute(
pageType : Type,
nameResourceID : 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 hosting this Customize Toolbox dialog page.
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.
[ProvideToolboxPage(typeof(VsToolboxPage), 1002)]
[Guid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")]
class VSCorePackage : Package
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
ProvideToolboxPageAttribute Class