TypeDescriptor.GetEditor Metodo

Definizione

Restituisce un editor con il tipo di base specificato.

Overload

Nome Descrizione
GetEditor(Object, Type, Boolean)

Restituisce un editor con il tipo di base specificato e con un descrittore di tipo personalizzato per il componente specificato.

GetEditor(Object, Type)

Ottiene un editor con il tipo di base specificato per il componente specificato.

GetEditor(Type, Type)

Restituisce un editor con il tipo di base specificato per il tipo specificato.

GetEditor(Object, Type, Boolean)

Origine:
TypeDescriptor.cs
Origine:
TypeDescriptor.cs
Origine:
TypeDescriptor.cs
Origine:
TypeDescriptor.cs
Origine:
TypeDescriptor.cs

Restituisce un editor con il tipo di base specificato e con un descrittore di tipo personalizzato per il componente specificato.

public:
 static System::Object ^ GetEditor(System::Object ^ component, Type ^ editorBaseType, bool noCustomTypeDesc);
[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. The Type of component cannot be statically discovered.")]
public static object? GetEditor(object component, Type editorBaseType, bool noCustomTypeDesc);
public static object GetEditor(object component, Type editorBaseType, bool noCustomTypeDesc);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Editors registered in TypeDescriptor.AddEditorTable may be trimmed. The Type of component cannot be statically discovered.")]
public static object? GetEditor(object component, Type editorBaseType, bool noCustomTypeDesc);
[<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. The Type of component cannot be statically discovered.")>]
static member GetEditor : obj * Type * bool -> obj
static member GetEditor : obj * Type * bool -> obj
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Editors registered in TypeDescriptor.AddEditorTable may be trimmed. The Type of component cannot be statically discovered.")>]
static member GetEditor : obj * Type * bool -> obj
Public Shared Function GetEditor (component As Object, editorBaseType As Type, noCustomTypeDesc As Boolean) As Object

Parametri

component
Object

Componente per cui ottenere l'editor.

editorBaseType
Type

Oggetto Type che rappresenta il tipo di base dell'editor che si desidera trovare.

noCustomTypeDesc
Boolean

Flag che indica se è necessario considerare le informazioni sulla descrizione del tipo personalizzato.

Valori restituiti

Istanza dell'editor di cui è possibile eseguire il cast al tipo di editor specificato oppure null se non è possibile trovare alcun editor del tipo richiesto.

Attributi

Eccezioni

component o editorBaseType è null.

component è un oggetto remoto tra processi.

Commenti

Il tipo di editorBaseType è in genere UITypeEditor, ma è anche possibile usare altri tipi ( ad esempio ComponentEditor e InstanceCreationEditor).

È possibile definire più editor per una proprietà. Utilizzare questo metodo per selezionare l'editor che si vuole usare.

Vedi anche

Si applica a

GetEditor(Object, Type)

Origine:
TypeDescriptor.cs
Origine:
TypeDescriptor.cs
Origine:
TypeDescriptor.cs
Origine:
TypeDescriptor.cs
Origine:
TypeDescriptor.cs

Ottiene un editor con il tipo di base specificato per il componente specificato.

public:
 static System::Object ^ GetEditor(System::Object ^ component, Type ^ editorBaseType);
[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. The Type of component cannot be statically discovered.")]
public static object? GetEditor(object component, Type editorBaseType);
public static object GetEditor(object component, Type editorBaseType);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Editors registered in TypeDescriptor.AddEditorTable may be trimmed. The Type of component cannot be statically discovered.")]
public static object? GetEditor(object component, Type editorBaseType);
[<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. The Type of component cannot be statically discovered.")>]
static member GetEditor : obj * Type -> obj
static member GetEditor : obj * Type -> obj
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Editors registered in TypeDescriptor.AddEditorTable may be trimmed. The Type of component cannot be statically discovered.")>]
static member GetEditor : obj * Type -> obj
Public Shared Function GetEditor (component As Object, editorBaseType As Type) As Object

Parametri

component
Object

Componente per cui ottenere l'editor.

editorBaseType
Type

Oggetto Type che rappresenta il tipo di base dell'editor che si desidera trovare.

Valori restituiti

Istanza dell'editor di cui è possibile eseguire il cast al tipo di editor specificato oppure null se non è possibile trovare alcun editor del tipo richiesto.

Attributi

Eccezioni

component o editorBaseType è null.

component è un oggetto remoto tra processi.

Commenti

Il tipo di editorBaseType è in genere UITypeEditor, ma è anche possibile usare altri tipi , ad esempio ComponentEditor e InstanceCreationEditor.

È possibile definire più editor per una proprietà. Utilizzare questo metodo per selezionare l'editor che si vuole usare.

Vedi anche

Si applica a

GetEditor(Type, Type)

Origine:
TypeDescriptor.cs
Origine:
TypeDescriptor.cs
Origine:
TypeDescriptor.cs
Origine:
TypeDescriptor.cs
Origine:
TypeDescriptor.cs

Restituisce un editor con il tipo di base specificato per il tipo specificato.

public:
 static System::Object ^ GetEditor(Type ^ type, Type ^ editorBaseType);
[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 object? GetEditor(Type type, Type editorBaseType);
public static object GetEditor(Type type, Type editorBaseType);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Editors registered in TypeDescriptor.AddEditorTable may be trimmed.")]
public static object? GetEditor(Type type, Type editorBaseType);
[<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 GetEditor : Type * Type -> obj
static member GetEditor : Type * Type -> obj
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Editors registered in TypeDescriptor.AddEditorTable may be trimmed.")>]
static member GetEditor : Type * Type -> obj
Public Shared Function GetEditor (type As Type, editorBaseType As Type) As Object

Parametri

type
Type

Oggetto Type del componente di destinazione.

editorBaseType
Type

Oggetto Type che rappresenta il tipo di base dell'editor che si sta tentando di trovare.

Valori restituiti

Istanza dell'oggetto editor di cui è possibile eseguire il cast al tipo di base specificato oppure null se non è possibile trovare alcun editor del tipo richiesto.

Attributi

Eccezioni

type o editorBaseType è null.

Commenti

Il tipo di editorBaseType è in genere UITypeEditor, ma è anche possibile usare altri tipi ( ad esempio ComponentEditor e InstanceCreationEditor).

È possibile definire più editor per un tipo. Usare questo metodo per selezionare quello che si vuole usare.

Chiamare questa versione di questo metodo solo quando non si dispone di un'istanza dell'oggetto .

Vedi anche

Si applica a