Share via


ProvideToolboxItemConfigurationAttribute Class

Definition

Registers a VSPackage as supplying a particular implementation of IConfigureToolboxItem. Used in conjunction with ProvideAssemblyFilterAttribute.

public ref class ProvideToolboxItemConfigurationAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
public ref class ProvideToolboxItemConfigurationAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
public sealed class ProvideToolboxItemConfigurationAttribute : Microsoft.VisualStudio.Shell.RegistrationAttribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)>]
type ProvideToolboxItemConfigurationAttribute = class
    inherit RegistrationAttribute
Public NotInheritable Class ProvideToolboxItemConfigurationAttribute
Inherits RegistrationAttribute
Inheritance
ProvideToolboxItemConfigurationAttribute
Attributes

Examples

In the example below, the PackageItemConfiguration implementation is registered as providing the class ToolboxConfig to support an implementation of IConfigureToolboxItem.

using MSVSIP = Microsoft.VisualStudio.Shell;  
 [assembly:ComVisible(true)]  

namespace Vsip.ItemConfiguration  
{  
    /////////////////////////////////////////////////////////////////////////////  
    // Walkthrough1  
    [MSVSIP.ProvideToolboxItemsAttribute(110)]  
    [MSVSIP.DefaultRegistryRoot("Software\\Microsoft\\VisualStudio\\8.0")]  
    [MSVSIP.InstalledProductRegistration(100, 102, "1.0", IconResId = 400)]  
    [MSVSIP.RegisterLoadKey("Standard", "1.0", "Package Name", "Company", 1)]  
    [MSVSIP.ProvideMenuResource(1000, 1)]  
    [ProvideToolboxItemConfigurationAttribute(typeof(ToolboxConfig))]  
    [GuidAttribute("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")]  
    public class ItemConfiguration : MSVSIP.Package  

Remarks

Attribute Context

Applies to Classes providing VSPackages by implementing IVsPackage, Package.
Repeatable No
Required attributes ProvideAssemblyFilterAttribute (applied to the class implementing IConfigureToolboxItem.
Invalid attributes None

A specific instance of ProvideToolboxItemConfigurationAttribute is defined for each instance of IConfigureToolboxItem.

When this attribute is applied to a class that implements IVsPackage or Package, it informs Visual Studio that this VSPackage supplies an implementation of IConfigureToolboxItem.

A VSPackage can have more than one instance of ProvideToolboxItemConfigurationAttribute applied to it.

Constructors

ProvideToolboxItemConfigurationAttribute(Type)

Initializes a new instance of ProvideToolboxItemConfigurationAttribute.

Properties

ObjectType

Gets the type of the toolbox item configuration.

TypeId

Override the TypeID property in order to let the RegistrationAttribute derived classes to work with System.ComponentModel.TypeDescriptor.GetAttributes(...). An attribute derived from this one will have to override this property only if it needs a better control on the instances that can be applied to a class.

(Inherited from RegistrationAttribute)

Methods

GetPackageRegKeyPath(Guid)

Gets the registry path (relative to the registry root of the application) of the VSPackage.

(Inherited from RegistrationAttribute)
Register(RegistrationAttribute+RegistrationContext)

Registers the toolbox item configuration.

Unregister(RegistrationAttribute+RegistrationContext)

Removes the registry key.

Applies to