xamarin/Xamarin.Forms

Flex Layout not wrapped text correctly for Label

Open

#5,311 opened on Feb 19, 2019

 (6 comments) (1 reaction) (0 assignees)C# (1,926 forks)batch import
a/flexe/4 :clock4:help wantedinactivep/Androidt/bug :bug:up-for-grabs

Repository metrics

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

Description

Description

The Label text was not shown fully in Flex Layout. The only first part of the text was shown. Check the attached screenshot for more details.

Steps to Reproduce

Code :

<FlexLayout
                        HorizontalOptions="Start" 
                        VerticalOptions="Center" 
                        Direction="Row" 
                        Wrap="Wrap"
                        JustifyContent="Start"
                        AlignContent="Start" 
                        AlignItems="Start">
                <Label Margin="8,0,8,0" Text="Elvis A. Presley" LineBreakMode="NoWrap"/>
                <Label Margin="8,0,8,0" Text="John Doee" LineBreakMode="NoWrap"/>
                <Label Margin="8,0,8,0" Text="Ryan Gig" LineBreakMode="NoWrap"/>
                <Label Margin="8,0,8,0" Text="Rathana Kumar" LineBreakMode="NoWrap"/>
                </FlexLayout>
  1. Run the above code
  2. The Label text was not shown fully

Expected Behavior

Need to display the full text in the Label

Actual Behavior

Only the first part of the Label text only shown

Basic Information

  • Version with issue: 7.1
  • Last known good version: -
  • IDE: VS 17 Mac
  • Platform Target Frameworks:
    • iOS: -
    • Android: 7.1
    • UWP: -
  • Android Support Library Version:
  • Nuget Packages: -
  • Affected Devices: Currently checked in Moto G5 Plus.

Screenshots

image

Reproduction Link

Use the below code

<FlexLayout 
                        HorizontalOptions="Start" 
                        VerticalOptions="Center" 
                        Direction="Row" 
                        Wrap="Wrap"
                        JustifyContent="Start"
                        AlignContent="Start" 
                        AlignItems="Start">
                <Label Margin="8,0,8,0" Text="Elvis A. Presley" LineBreakMode="NoWrap"/>
                <Label Margin="8,0,8,0" Text="John Doee" LineBreakMode="NoWrap"/>
                <Label Margin="8,0,8,0" Text="Ryan Gig" LineBreakMode="NoWrap"/>
                <Label Margin="8,0,8,0" Text="Rathana Kumar" LineBreakMode="NoWrap"/>
                </FlexLayout>

Contributor guide