ProvideToolboxItemConfigurationAttribute Class

 

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

Namespace:   Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

System.Object
  System.Attribute
    Microsoft.VisualStudio.Shell.RegistrationAttribute
      Microsoft.VisualStudio.Shell.ProvideToolboxItemConfigurationAttribute

[AttributeUsageAttribute(AttributeTargets.Class, Inherited = true, 
	AllowMultiple = true)]
public sealed class ProvideToolboxItemConfigurationAttribute : RegistrationAttribute

NameDescription
System_CAPS_pubmethodProvideToolboxItemConfigurationAttribute(Type)

Initializes a new instance of ProvideToolboxItemConfigurationAttribute.

NameDescription
System_CAPS_pubpropertyObjectType

Gets the type of the toolbox item configuration.

System_CAPS_pubpropertyTypeId

Gets the current instance of this attribute.(Inherited from RegistrationAttribute.)

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.

In the example below, the Package ItemConfiguration 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 

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: