To do this, we need to do two things:
- Increase
Entry Height in Xamarin.Forms - Create an iOS custom renderer to align text at the bottom of a
UITextField 
Increase Login Height in Xamarin.Forms
In this example, I use RelativeLayout to set the height of the filled record to 50, Constraint.Constant(50) .
using System; using Xamarin.Forms; namespace CustomEntrySample { public class EntryWithTopPadding : Entry { } public class App : Application { public App() { var normalEntry = new Entry { Text = "This Entry Has Normal Padding", BackgroundColor = Color.Lime }; var paddedEntry = new EntryWithTopPadding { Text = "This Entry Has Extra Top Padding", BackgroundColor = Color.Aqua }; var mainLayout = new RelativeLayout(); mainLayout.Children.Add( normalEntry, Constraint.Constant(0), Constraint.RelativeToParent(parent => parent.Y + 10), Constraint.RelativeToParent(parent => parent.Width) ); mainLayout.Children.Add( paddedEntry, Constraint.Constant(0), Constraint.RelativeToView(normalEntry, (parent, view) => view.Y + view.Height + 10), Constraint.RelativeToParent(parent => parent.Width), Constraint.Constant(50) ); MainPage = new NavigationPage( new ContentPage { Title = "Title", Content = mainLayout, Padding = new Thickness(10, 0, 10, 0) } ); } } }
Create custom render to align text to bottom of UITextField
Set the VerticalAlignment property to UITextField : UIControlContentVerticalAlignment.Bottom
using UIKit; using CustomEntrySample; using CustomEntrySample.iOS; using Xamarin.Forms; using Xamarin.Forms.Platform.iOS; [assembly: ExportRenderer(typeof(EntryWithTopPadding), typeof(EntryWithTopPaddingCustomRenderer))] namespace CustomEntrySample.iOS { public class EntryWithTopPaddingCustomRenderer : EntryRenderer { protected override void OnElementChanged(ElementChangedEventArgs<Entry> e) { base.OnElementChanged(e); if(Control == null) return; Control.VerticalAlignment = UIControlContentVerticalAlignment.Bottom; } } }
Brandon minnick
source share