ToolboxService.GetToolboxItem 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回给定类型的工具箱项。
重载
| 名称 | 说明 |
|---|---|
| GetToolboxItem(Type) |
返回给定类型的工具箱项。 |
| GetToolboxItem(Type, Boolean) |
返回给定类型的工具箱项。 |
GetToolboxItem(Type)
返回给定类型的工具箱项。
public:
static System::Drawing::Design::ToolboxItem ^ GetToolboxItem(Type ^ toolType);
public static System.Drawing.Design.ToolboxItem GetToolboxItem(Type toolType);
static member GetToolboxItem : Type -> System.Drawing.Design.ToolboxItem
Public Shared Function GetToolboxItem (toolType As Type) As ToolboxItem
参数
- toolType
- Type
要为其检索工具箱项的组件的类型。
返回
与给定类型关联的工具箱项,或者 null 该类型没有相应的工具箱项。
例外
toolType 是 null。
适用于
GetToolboxItem(Type, Boolean)
返回给定类型的工具箱项。
public:
static System::Drawing::Design::ToolboxItem ^ GetToolboxItem(Type ^ toolType, bool nonPublic);
public static System.Drawing.Design.ToolboxItem GetToolboxItem(Type toolType, bool nonPublic);
static member GetToolboxItem : Type * bool -> System.Drawing.Design.ToolboxItem
Public Shared Function GetToolboxItem (toolType As Type, nonPublic As Boolean) As ToolboxItem
参数
- toolType
- Type
要为其检索工具箱项的组件的类型。
- nonPublic
- Boolean
true 在类型上搜索非公共构造函数; false 以搜索公共构造函数。
返回
与给定类型关联的工具箱项,或者 null 该类型没有相应的工具箱项。
例外
toolType 是 null。