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 返回的集合。

返回

工具箱项。

注解

可以在后台线程上调用此方法。

适用于