TypeDescriptor.GetEditor Metodo

Definizione

Restituisce un editor con il tipo di base specificata.

Overload

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)

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

GetEditor(Object, Type)

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

public:
 static System::Object ^ GetEditor(System::Object ^ component, Type ^ editorBaseType);
public static object GetEditor (object component, Type editorBaseType);
public static object? GetEditor (object component, Type editorBaseType);
static member GetEditor : obj * Type -> obj
Public Shared Function GetEditor (component As Object, editorBaseType As Type) As Object

Parametri

component
Object

Componente per il quale ottenere l'editor.

editorBaseType
Type

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

Restituisce

Object

Istanza dell'editor che può eseguire il cast al tipo di editor specificato o null se non viene trovato nessun editor del tipo richiesto.

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à. Questo metodo consente di selezionare l'editor che si vuole usare.

Vedi anche

Si applica a

GetEditor(Type, Type)

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

public:
 static System::Object ^ GetEditor(Type ^ type, Type ^ editorBaseType);
public static object GetEditor (Type type, Type editorBaseType);
public static object? GetEditor (Type type, Type editorBaseType);
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.

Restituisce

Object

Istanza dell'oggetto editor che può eseguire il cast al tipo di base specificato o null se non viene trovato nessun editor del tipo richiesto.

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

GetEditor(Object, Type, Boolean)

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

public:
 static System::Object ^ GetEditor(System::Object ^ component, Type ^ editorBaseType, bool noCustomTypeDesc);
public static object GetEditor (object component, Type editorBaseType, bool noCustomTypeDesc);
public static object? GetEditor (object component, Type editorBaseType, bool noCustomTypeDesc);
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 il quale ottenere l'editor.

editorBaseType
Type

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

noCustomTypeDesc
Boolean

Flag che indica se prendere in considerazione le informazioni sulla descrizione dei tipi personalizzati.

Restituisce

Object

Istanza dell'editor che può eseguire il cast al tipo di editor specificato o null se non viene trovato nessun editor del tipo richiesto.

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à. Questo metodo consente di selezionare l'editor che si vuole usare.

Vedi anche

Si applica a