TypeDescriptor.CreateDesigner(IComponent, Type) Metod

Definition

Skapar en instans av designern som är associerad med den angivna komponenten och av den angivna typen av designer.

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

Parametrar

component
IComponent

En IComponent som anger komponenten som ska associeras med designern.

designerBaseType
Type

En Type som representerar den typ av designer som ska skapas.

Returer

En IDesigner som är en instans av designern för komponenten, eller null om ingen designer kan hittas.

Attribut

Kommentarer

Om den här metoden inte kan hitta en giltig DesignerAttributesöker den upp klasshierarkin efter en designer. Om den inte hittar en designer i klasshierarkin returneras null.

Gäller för

Se även