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.v18.1.dll

Syntax

public void RegisterPropertyEditorAlias(
    string aliasName,
    Type propertyType,
    IsMemberCompatibleHandler memberHandler
)

Parameters

Type Name Description
String aliasName

A string specifying the Property Editor's alias name.

Type propertyType

A Type object specifying the target property type.

DevExpress.ExpressApp.Editors.IsMemberCompatibleHandler memberHandler

The IsMemberCompatibleHandler object which allows you to choose if the aliasName is appropriate for the propertyType.

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) {
        //...
    }
}

See Also