This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.
[FlexLayout] Labels with word wrap do not seem to auto calculate height correctly #4950
Open
Description
Description
Text can be cut off/truncated when there are several FlexLayout's with Labels, filling a StackLayout
In the example below, 8 lines of text are assigned to the label, but when rendered to the screen (only tested on Android phone) only 5 lines are displayed before truncation
<StackLayout VerticalOptions="FillAndExpand" Padding="70,5,0,0">
<FlexLayout Direction="Row" Wrap="Wrap">
<Label FlexLayout.Grow="1" FlexLayout.Basis="100" Text="NOTES"/>
<Label FlexLayout.Grow="2" FlexLayout.Basis="150"
Text="1This is a test to see if the word wrap will not cut off.
2This is a test to see if the word wrap will not cut off.
3This is a test to see if the word wrap will not cut off.
4This is a test to see if the word wrap will not cut off.
5This is a test to see if the word wrap will not cut off.
6This is a test to see if the word wrap will not cut off.
7This is a test to see if the word wrap will not cut off.
8This is a test to see if the word wrap will not cut off. "/>
</FlexLayout>
<FlexLayout Direction="Row" Wrap="Wrap">
<Label FlexLayout.Grow="1" FlexLayout.Basis="100" Text="NOTES"/>
<Label FlexLayout.Grow="2" FlexLayout.Basis="150"
Text="1This is a test to see if the word wrap will not cut off.
2This is a test to see if the word wrap will not cut off.
3This is a test to see if the word wrap will not cut off.
4This is a test to see if the word wrap will not cut off.
5This is a test to see if the word wrap will not cut off.
6This is a test to see if the word wrap will not cut off.
7This is a test to see if the word wrap will not cut off.
8This is a test to see if the word wrap will not cut off. "/>
</FlexLayout>
(copy/paste FlexLayout several more times)
...
Steps to Reproduce
- See attached Repo.zip
Expected Behavior
Display all text within the top-most FlexLayouts
Actual Behavior
Text is being truncated in each label. (in order to fit more controls on the screen?)
Basic Information
- Version with issue:
- Xamarin Form 3.4.0.1009999
Screenshots
Reproduction Link
- Repo.zip - https://github.com/xamarin/Xamarin.Forms/files/2746948/Repo.zip
- MainPage.xaml Gist - https://gist.github.com/mattregul/edb5219149afa4136045b87ad606d9aa
- Xamarin Forum Post - https://forums.xamarin.com/discussion/145900/long-label-with-word-wrap-doesnt-seem-to-auto-calculate-height-correctly