Skip to main content

DataFormCustomItem.EditorView Property

Gets or sets a view that the data form displays as a custom editor. This is a bindable property.

Namespace: DevExpress.Maui.DataForm

Assembly: DevExpress.Maui.Editors.dll

NuGet Package: DevExpress.Maui.Editors

Declaration

public View EditorView { get; set; }

Property Value

Type Description
View

A view.

Example

To create a custom editor on a data form, add the DataFormCustomItem item to the data form’s Items collection and set the EditorView property to a View class descendant that specifies a view or layout.

The binding context of the data form’s custom editor is an object assigned to the DataFormView.DataObject property. You can bind a custom editor view’s property to any property of this object.

Note

DataFormCustomItem.EditorView is a content property. You can skip property tags in the markup.

In this example, the data form is associated with an EmployeeInfo object. The Image view is added to the form as a custom editor and bound to the EmployeeInfo.PhotoPath property to display an employee photo.

View Example

DevExpress MAUI DataForm - CustomEditor

<dxdf:DataFormCustomItem FieldName="PhotoPath">
    <dx:DXStackLayout Padding="16">
        <Frame Padding="0"
               HorizontalOptions="Center"
               BorderColor="#dadada"
               WidthRequest="100"
               HeightRequest="100"
               CornerRadius="50"
               IsClippedToBounds="True">
            <dx:DXImage Source="{Binding PhotoPath}"
                   BackgroundColor="Gray"
                   Aspect="AspectFill"/>
        </Frame>
    </dx:DXStackLayout>
</dxdf:DataFormCustomItem>

When you define a custom editor for the data form, you can bind the custom editor property to any property of the data object (it is the binding context of the data form’s custom editors). Note, in this case, the data form’s built-in validate and commit mechanisms are not available for the custom editor. If you need to validate and commit values entered within the custom editor, bind its value property to the EditorValue property.

See Also