ProvideToolboxItemsAttribute Constructor (Int32)
Creates a new instance of ProvideToolboxItemsAttribute which indicates if a class implementing a VSPackage is providing Toolbox items.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)
Syntax
'Declaration
Public Sub New ( _
version As Integer _
)
public ProvideToolboxItemsAttribute(
int version
)
public:
ProvideToolboxItemsAttribute(
int version
)
new :
version:int -> ProvideToolboxItemsAttribute
public function ProvideToolboxItemsAttribute(
version : int
)
Parameters
version
Type: System.Int32The version of the Toolbox items a VSPackage supplies.
Remarks
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.
Examples
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
.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
ProvideToolboxItemsAttribute Class
ProvideToolboxItemsAttribute Overload
Microsoft.VisualStudio.Shell Namespace