TypeDescriptor.CreateDesigner(IComponent, Type) 方法

定義

建立與指定元件關聯並屬於指定設計工具類型的設計工具執行個體。

public:
 static System::ComponentModel::Design::IDesigner ^ CreateDesigner(System::ComponentModel::IComponent ^ component, Type ^ designerBaseType);
public static System.ComponentModel.Design.IDesigner CreateDesigner (System.ComponentModel.IComponent component, Type designerBaseType);
public static System.ComponentModel.Design.IDesigner? CreateDesigner (System.ComponentModel.IComponent component, Type designerBaseType);
static member CreateDesigner : System.ComponentModel.IComponent * Type -> System.ComponentModel.Design.IDesigner
Public Shared Function CreateDesigner (component As IComponent, designerBaseType As Type) As IDesigner

參數

component
IComponent

IComponent,指定要與設計工具關聯的元件。

designerBaseType
Type

Type,代表要建立的設計工具類型。

傳回

IDesigner,亦即元件的設計工具執行個體;如果找不到設計工具,則為 null

備註

如果這個方法找不到有效的 DesignerAttribute,它會搜尋設計工具的類別階層。 如果無法在類別階層中找到設計工具,則會傳 null回 。

適用於

另請參閱