We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to customize the input direction of custom text editor in platform renderer?

Platform: Xamarin.Forms |
Control: SfDataForm

For data type string, text editor will be created, and Entry control will be loaded in SfDataForm and you can customize the data form text editor in each platform renderer by registering custom text editor to change the appearance or default style of native control. This article demonstrates the customizing the input direction of text editor in SfDataForm.


Please refer the more details about custom Entry renderer support in Xamarin.Forms.



Please refer the below link for more details about renderer and native control customization support in Xamarin.Forms platform.



First of all, you should register the custom editor in SfDataForm as follows using DataFormEditor calss which is used to add new editor in SfDataForm. Here `Entry` will be loaded as custom editor.


Code example in Xamarin.Forms project.


You can customize the `Entry` Editor loaded in SfDataForm by using EntryRenderer class.

And EntryRenderer allows you to customize the default native rendering by using `OnElementChanged` override method which is used to renders the native controls or customized control with their own platform specific appearance.


On Android platform, `EntryRenderer` class instantiates an EditText control and changed its Gravity value as Right in order to change the default input flow direction in text editor of SfDataForm.


Code example in Xamarin.Forms.Android project.



On iOS platform, `EntryRenderer` class instantiates an UITextField control and changed its TextAlignment value as Right in order to change the default input flow direction in text editor.


Code example in Xamarin.Forms.iOS project.




Like for UWP platform, `EntryRenderer` class instantiates an TextBox control and changed its FlowDirection value as RightToLeft to change the default input flow direction in text editor.


Code example in Xamarin.Forms.UWP project.



Please download the sample from below link.



2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile