Class DataFormCustomItem
Represents the class that encapsulates the layout and custom editor setting for a data field.
Inherited Members
Namespace: Syncfusion.Maui.DataForm
Assembly: Syncfusion.Maui.DataForm.dll
Syntax
public class DataFormCustomItem : DataFormItem, IThemeElement
Constructors
DataFormCustomItem()
Initializes a new instance of the DataFormCustomItem class.
Declaration
public DataFormCustomItem()
Fields
EditorValueProperty
Identifies the EditorValue dependency property.
Declaration
public static readonly BindableProperty EditorValueProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for EditorValue dependency property. |
EditorViewProperty
Identifies the EditorView dependency property.
Declaration
public static readonly BindableProperty EditorViewProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for EditorView dependency property. |
Properties
EditorValue
Gets or sets the editor value.
Declaration
public object EditorValue { get; set; }
Property Value
Type |
---|
System.Object |
Remarks
EditorView
Gets or sets a view that the data form displays as a custom editor.
Declaration
public View EditorView { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.View | The default value is |
Remarks
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 DataObject property. You can bind a custom editor view’s property to any property of this object.
Examples
The below examples shows, how to set the EditorView property of DataFormCustomItem in the SfDataForm.
<dataForm:SfDataForm x:Name="dataForm">
<dataForm:SfDataForm.Items>
<dataForm:DataFormTextItem FieldName="FirstName" />
<dataForm:DataFormPasswordItem FieldName="Password" />
<dataForm:DataFormCustomItem FieldName="Image" ShowLabel="False">
<dataForm:DataFormCustomItem.EditorView>
<Image Source="dotnet_bot.png" HeightRequest="100"/>
</dataForm:DataFormCustomItem.EditorView>
</dataForm:DataFormCustomItem>
</dataForm:SfDataForm.Items>
</dataForm:SfDataForm>
Methods
UpdateValidationView()
Method used to show or update the validation label for the custom editor. After validation this should be called to update data form layout and validation text.
Declaration
public void UpdateValidationView()