Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
In my Xamarin Forms app running on iOS, when I set the FontSize of an Entry to say 42, the Entries do not resize so for example the tail of a lower case g is cut off and the top and bottom of an upper case G are also cut off.
I have tried the following code in a custom renderer however this has had little effect :-
public class MyEntryRenderer : EntryRenderer
protected override void OnElementChanged(ElementChangedEventArgs<Entry> e)
if (Control != null)
void ResizeHeightWithText(UITextField textField, float maxHeight = 960f)
var width = textField.Frame.Width;
var size = ((NSString)textField.Text).StringSize(textField.Font, new CGSize(width, maxHeight),
var labelFrame = textField.Frame;
labelFrame.Size = new CGSize(width, size.Height);
textField.Frame = labelFrame;
Is there a solution to this problem?
I have reproduced this by putting an Entry control in a StackLayout. The StackLayout appears to be constraining the height of the Entry.
You can work around the issue by setting the VerticalOptions of the Entry control to FillAndExpand.
My Entry controls are set to have VerticalOptions of FillAndExpand however this does not allow them to resize correctly, inline with the original bug.
Are you able to provide a more complete sample to help us ensure that we're reproducing the same behavior?
I can reproduce this easily - don't even need a stack layout.
Create a brand new Xamarin Forms app in Xamarin Studio, change the label to an entry with a font size of 64:
<Entry Text="Welcome to Xamarin Forms!" VerticalOptions="Center" HorizontalOptions="Fill" FontSize="64" />
Run this on Android/iOS and you'll see the text doesn't fit.
I've tested this with the latest stable and the latest pre-release version. Happens on both.
As a workaround I've found if you explicitly call ForceLayout after the page is loaded (e.g in OnAppearing) the entry control is sized correctly
Update - calling force layout only works in the simulator, not on an actual device
Also a problem on UWP. Shall I raise a new bug for UWP?
John please do.. this one should be fixed on 2.3.6-pre1