2X faster development
The ultimate Xamarin UI toolkit to boost your development speed.
DataForm allows you to add custom editor by overriding the DataFormEditor class which is used to add custom view.
This article explains adding custom text editor in DataForm.
By passing custom view in DataFormEditor class, you can add the custom editor in data form. You can refer to the DataForm user guide documentation for creating new custom editor: https://help.syncfusion.com/xamarin/sfdataform/editing#creating-new-custom-editor
Here, Entry is loaded for custom entry editor.
The custom view (Entry) property settings, commit, and data validation can be handled by overriding required methods in the DataFormEditor class.
Manually commit the custom data form item editor value by using the OnCommitValue override method of the DataFormEditor class on the custom editor TextChanged event which is used to update custom editor value in the DataObject property of DataForm. Manually validate the custom editor value by using the OnValidateValue override method of the DataFormEditor class on the custom editor Unfocused event which is used to validate custom editor value in DataForm.
Refer to the following code example for binding the DataObject and adding custom editor as TextBoxEditor editor using the RegisterEditor method in DataForm.
You can also customize or change the default appearance of loaded custom editor view in custom renderer platform using the OnElementChanged override method of EntryRenderer.
This article explains pointer over customization for text editor by overriding the default style of TextBox and custom renderer in DataForm for Xamarin.Forms.UWP platform alone.
Here, TextBox is loaded as native control for custom entry editor in Xamarin.Forms.UWP platform. By overriding the default style of TextBox, the control can customize the pointer over text color and border color for text editor.
By using the GotFocus, LostFocus, PointerEntered, and PointerExited events of the TextBox control, customized the PlaceholderText and border color on pointer over.
To download the sample click DataFormCustomTextEditor.
|
2X faster development
The ultimate Xamarin UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.