xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.62k stars 1.87k forks source link

[Bug] Label with MaxLines > 1 doesn't fill allocated space #11634

Open Tommigun1980 opened 4 years ago

Tommigun1980 commented 4 years ago

1) Set up a label, and give it a high max lines value. 2) Feed it a long sentence with lots of line breaks. 3) Set it up in a layout, where it should fill remaining space. For example occupy a row in a grid with star option.

Problem: The label always draws all lines, up 'til max lines, instead of filling available space. Expected: The label should occupy the space it's allocated.

Workaround/hack: Everything works normally if one sets a low HeightRequest on it, I set HeightRequest to 1 and it draws fine now.

Tested only on iOS.

StephaneDelcroix commented 4 years ago

could you please attach a small reproduction project ? thanks

Tommigun1980 commented 4 years ago

Sorry, I'm so swamped atm that I don't think I will be able to provide one in a reasonable timeframe.