I want to change placeholder position on focus in entry, place holder slide to up on top of the entry border with animation linear by using custom renderer, and can be avail to set margin and padding for placeholder
CodePudding user response:
You could use some of the components or plugins to achieve this. You could use the Material library from Baseflow or the Syncfusion components which both give you the desired results. Links are given below.
https://github.com/Baseflow/XF-Material-Library#text-fields
https://www.syncfusion.com/xamarin-ui-controls/xamarin-text-input-layout
CodePudding user response:
You can try to set padding to an entry cell:
Padding in IOS :
Control.LeftView = new UIView(new CGRect(0,0,15,0));
Control.LeftViewMode = UITextFieldViewMode.Always;
Control.RightView = new UIView(new CGRect(0, 0, 15, 0));
Control.RightViewMode = UITextFieldViewMode.Always;
Padding in Android:
Control.SetPadding(15, 15, 15, 0);
Note:
Accordingly, you can set the value to make text start from specific position.