语言

ProvideToolboxItemConfigurationAttribute 类

定义

将 VSPackage 注册为提供 的特定 IConfigureToolboxItem实现。 与 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
继承
ProvideToolboxItemConfigurationAttribute
属性

示例

在下面的示例中 PackageItemConfiguration , 实现注册为提供 类 ToolboxConfig 以支持 的 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  

注解

特性上下文

适用于 通过实现 IVsPackage、 Package来提供 VSPackage 的类。
可重复 否
必需属性 ProvideAssemblyFilterAttribute (应用于实现 的 IConfigureToolboxItem类。
无效的特性 无

为每个 实例 ProvideToolboxItemConfigurationAttribute 定义 的特定实例 IConfigureToolboxItem。

当此属性应用于实现 或 Package的IVsPackage类时,它会通知 Visual Studio 此 VSPackage 提供 的IConfigureToolboxItem实现。

VSPackage 可以应用多个 实例 ProvideToolboxItemConfigurationAttribute 。

构造函数

ProvideToolboxItemConfigurationAttribute(Type)

初始化 ProvideToolboxItemConfigurationAttribute 的新实例。

属性

ObjectType

获取工具箱项配置的类型。

TypeId

重写 TypeID 属性,以便让 RegistrationAttribute 派生类与 System.ComponentModel.TypeDescriptor.GetAttributes 一起使用 (...) 。仅当派生自此属性的属性需要对可应用于类的实例使用更好的控件时,它才必须重写此属性。

(继承自 RegistrationAttribute)

方法

GetPackageRegKeyPath(Guid)

获取相对于 VSPackage 的应用程序) 注册表根目录 (注册表路径。

(继承自 RegistrationAttribute)
Register(RegistrationAttribute+RegistrationContext)

注册工具箱项配置。

Unregister(RegistrationAttribute+RegistrationContext)

删除注册表项。

适用于