EditorDescriptorsFactory.RegisterPropertyEditorAlias(String, Type, IsMemberCompatibleHandler) Method
Registers a Property Editor‘s alias name and specifies the handler which provides a logic to choose if the alias is appropriate for the given property.
Namespace: DevExpress.ExpressApp.Editors
Assembly: DevExpress.ExpressApp.v23.1.dll
NuGet Package: DevExpress.ExpressApp
Declaration
Parameters
Name | Type | Description |
---|---|---|
aliasName | String | A string specifying the Property Editor’s alias name. |
propertyType | Type | A Type object specifying the target property type. |
memberHandler | DevExpress.ExpressApp.Editors.IsMemberCompatibleHandler | The IsMemberCompatibleHandler object which allows you to choose if the aliasName is appropriate for the propertyType. |
Remarks
The classHandler parameter is used if you want to register a number of editors for one type and choose the appropriate editor according to the logic implemented in it.
public class MyModule : ModuleBase {
//...
protected override void RegisterEditorDescriptors(EditorDescriptorsFactory
editorDescriptorsFactory) {
//...
editorDescriptorsFactory.RegisterPropertyEditorAlias("CustomPropertyEditorAlias",
typeof(DateTime), IsMemberCompatibleHandler);
}
private static bool IsMemberCompatibleHandler(IModelMember modelMember) {
//...
}
}