TypeDescriptor.GetEditor Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns an editor with the specified base type.
Overloads
GetEditor(Object, Type, Boolean) |
Returns an editor with the specified base type and with a custom type descriptor for the specified component. |
GetEditor(Object, Type) |
Gets an editor with the specified base type for the specified component. |
GetEditor(Type, Type) |
Returns an editor with the specified base type for the specified type. |
GetEditor(Object, Type, Boolean)
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
Returns an editor with the specified base type and with a custom type descriptor for the specified component.
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
Parameters
- component
- Object
The component to get the editor for.
- noCustomTypeDesc
- Boolean
A flag indicating whether custom type description information should be considered.
Returns
An instance of the editor that can be cast to the specified editor type, or null
if no editor of the requested type can be found.
Exceptions
component
or editorBaseType
is null
.
component
is a cross-process remoted object.
Remarks
The type of editorBaseType
is usually UITypeEditor, but you can also use other types (for example ComponentEditor and InstanceCreationEditor).
You can define multiple editors for a property. You use this method to select the editor you want to use.
See also
- ICustomTypeDescriptor
- AddEditorTable(Type, Hashtable)
- GetConverter
- User Interface Type Editors Overview
Applies to
GetEditor(Object, Type)
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
Gets an editor with the specified base type for the specified component.
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
Parameters
- component
- Object
The component to get the editor for.
Returns
An instance of the editor that can be cast to the specified editor type, or null
if no editor of the requested type can be found.
Exceptions
component
or editorBaseType
is null
.
component
is a cross-process remoted object.
Remarks
The type of editorBaseType
is usually UITypeEditor, but you can also use other types (for example, ComponentEditor and InstanceCreationEditor).
You can define multiple editors for a property. You use this method to select the editor you want to use.
See also
Applies to
GetEditor(Type, Type)
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
Returns an editor with the specified base type for the specified type.
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
Parameters
Returns
An instance of the editor object that can be cast to the given base type, or null
if no editor of the requested type can be found.
Exceptions
type
or editorBaseType
is null
.
Remarks
The type of editorBaseType
is usually UITypeEditor, but you can also use other types (for example ComponentEditor and InstanceCreationEditor).
You can define multiple editors for a type. You use this method to select the one you want to use.
Call this version of this method only when you do not have an instance of the object.