共用方式為


IToolboxItemCreator.CreateToolboxItem 方法

定義

從指定的型別建立工具箱專案。

public:
 Microsoft::VisualStudio::OLE::Interop::IDataObject ^ CreateToolboxItem(System::String ^ typeName, System::Reflection::AssemblyName ^ assemblyName, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::String ^>> ^ itemProperties, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::String ^>> ^ extraInfo);
public Microsoft.VisualStudio.OLE.Interop.IDataObject CreateToolboxItem (string typeName, System.Reflection.AssemblyName assemblyName, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,string>> itemProperties, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,string>> extraInfo);
abstract member CreateToolboxItem : string * System.Reflection.AssemblyName * seq<System.Collections.Generic.KeyValuePair<string, string>> * seq<System.Collections.Generic.KeyValuePair<string, string>> -> Microsoft.VisualStudio.OLE.Interop.IDataObject
Public Function CreateToolboxItem (typeName As String, assemblyName As AssemblyName, itemProperties As IEnumerable(Of KeyValuePair(Of String, String)), extraInfo As IEnumerable(Of KeyValuePair(Of String, String))) As IDataObject

參數

typeName
String

完整階層式類型名稱。

assemblyName
AssemblyName

在其中找到的 typeName 元件。

itemProperties
IEnumerable<KeyValuePair<String,String>>

從 IToolboxItemInfo.GetPropertyValue 取得此項目的屬性。

extraInfo
IEnumerable<KeyValuePair<String,String>>

此專案從 IToolboxItemInfo.ExtraInfo 傳回的集合。

傳回

工具箱專案。

備註

這個方法可以在背景線程上呼叫。

適用於