xamarin/Xamarin.Forms

[FlexLayout] Labels with word wrap do not seem to auto calculate height correctly

Open

#4,950 opened on Jan 10, 2019

 (7 comments) (0 reactions) (0 assignees)C# (1,926 forks)batch import
a/flexa/layoute/6 :clock6:help wantedinactivet/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 stars)
PR merge metrics
 (No merged PRs in 30d)

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

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

image

Reproduction Link

Contributor guide