TypeDescriptor.GetEditor 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用指定的基类型返回编辑器。
重载
GetEditor(Object, Type) |
获取指定组件的具有指定基类型的编辑器。 |
GetEditor(Type, Type) |
返回具有指定基类型的指定类型的编辑器。 |
GetEditor(Object, Type, Boolean) |
为指定组件返回具有指定基类型和自定义类型描述符的编辑器。 |
GetEditor(Object, Type)
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
获取指定组件的具有指定基类型的编辑器。
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
参数
- component
- Object
要为其获取编辑器的组件。
返回
可转换为指定编辑器类型的编辑器的一个实例,如果找不到请求类型的编辑器,则为 null
。
例外
component
或 editorBaseType
为 null
。
component
是一个跨进程进行远程处理的对象。
注解
的类型 editorBaseType
通常 UITypeEditor为 ,但也可以使用其他类型的 (例如 和 ComponentEditorInstanceCreationEditor) 。
可以为一个属性定义多个编辑器。 使用此方法选择要使用的编辑器。
另请参阅
适用于
GetEditor(Type, Type)
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
返回具有指定基类型的指定类型的编辑器。
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
参数
返回
可转换为指定基类型的编辑器对象的一个实例,如果找不到请求类型的编辑器,则为 null
。
例外
type
或 editorBaseType
为 null
。
注解
的类型 editorBaseType
通常是 UITypeEditor,但也可以使用其他类型 (例如 ComponentEditor 和 InstanceCreationEditor) 。
可以为一个类型定义多个编辑器。 使用此方法可以选择要使用的方法。
仅当没有 对象的实例时,才调用此方法的此版本。
另请参阅
适用于
GetEditor(Object, Type, Boolean)
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
为指定组件返回具有指定基类型和自定义类型描述符的编辑器。
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
参数
- component
- Object
要为其获取编辑器的组件。
- noCustomTypeDesc
- Boolean
表示是否应考虑自定义类型描述信息的标志。
返回
可转换为指定编辑器类型的编辑器的一个实例,如果找不到请求类型的编辑器,则为 null
。
例外
component
或 editorBaseType
为 null
。
component
是一个跨进程进行远程处理的对象。
注解
的类型 editorBaseType
通常是 UITypeEditor,但也可以使用其他类型 (例如 ComponentEditor 和 InstanceCreationEditor) 。
可以为一个属性定义多个编辑器。 使用此方法选择要使用的编辑器。
另请参阅
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈