Bahasa

TypeDescriptor.CreateDesigner(IComponent, Type) Metode

Definisi

Membuat instans perancang yang terkait dengan komponen yang ditentukan dan dari jenis perancang yang ditentukan.

public:
 static System::ComponentModel::Design::IDesigner ^ CreateDesigner(System::ComponentModel::IComponent ^ component, Type ^ designerBaseType);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Design-time attributes are not preserved when trimming. Types referenced by attributes like EditorAttribute and DesignerAttribute may not be available after trimming.")]
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);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of component cannot be statically discovered.")]
public static System.ComponentModel.Design.IDesigner? CreateDesigner(System.ComponentModel.IComponent component, Type designerBaseType);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Design-time attributes are not preserved when trimming. Types referenced by attributes like EditorAttribute and DesignerAttribute may not be available after trimming.")>]
static member CreateDesigner : System.ComponentModel.IComponent * Type -> System.ComponentModel.Design.IDesigner
static member CreateDesigner : System.ComponentModel.IComponent * Type -> System.ComponentModel.Design.IDesigner
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of component cannot be statically discovered.")>]
static member CreateDesigner : System.ComponentModel.IComponent * Type -> System.ComponentModel.Design.IDesigner
Public Shared Function CreateDesigner (component As IComponent, designerBaseType As Type) As IDesigner

Parameter

component
IComponent

Yang IComponent menentukan komponen yang akan dikaitkan dengan perancang.

designerBaseType
Type

Type Yang mewakili jenis perancang yang akan dibuat.

Mengembalikan

Yang IDesigner merupakan instans perancang untuk komponen, atau null jika tidak ada perancang yang dapat ditemukan.

Atribut

Keterangan

Jika metode ini tidak dapat menemukan yang valid DesignerAttribute, metode ini mencari hierarki kelas untuk perancang. Jika tidak dapat menemukan perancang dalam hierarki kelas, perancang akan mengembalikan null.

Berlaku untuk

Lihat juga