語言

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 的類別。
可重複 No
必要的屬性 ProvideAssemblyFilterAttribute (套用至實作的 IConfigureToolboxItem類別。
無效屬性 無

的每個實例 ProvideToolboxItemConfigurationAttribute 都會定義 特定的 實例 IConfigureToolboxItem。

當這個屬性套用至實作 IVsPackage 或 Package的類別時,它會通知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)

拿掉登錄機碼。

適用於