ProvideToolboxItemsAttribute Constructor (Int32)
Creates a new instance of ProvideToolboxItemsAttribute which indicates if a class implementing a VSPackage is providing Toolbox items.
Assembly: Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)
Parameters
- version
-
Type:
System::Int32
The version of the Toolbox items a VSPackage supplies.
Visual Studio tracks the version numbers of Toolbox items provided by a VSPackage. The version number of an item, supplied by the version argument to the constructor, is stored when the VSPackage is registered as a Toolbox item provider.
If the version of the Toolbox items a VSPackage provides does not match the value stored by Visual Studio for that package, Visual Studio issues the ToolboxUpgraded event.
In the example below the attributes applied to the class MyPackage indicates that it supports version 1 of Toolbox items of with two clipboard formats "CF_XMLCODE" and "InPlaceMenuEditorMenu".
[DefaultRegistryRoot("Software\\Microsoft\\VisualStudio\\8.0")]
[ProvideToolboxItems( 1)]
[ProvideToolboxFormat("CF_XMLCODE")]
[ProvideToolboxFormat("InPlaceMenuEditorMenu")]
[Guid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")]
internal sealed class MyPackage : Package