xamarin/Xamarin.Forms

[Bug] Label resize bug on Android

Aperta

#8959 aperta il 18 dic 2019

 (1 commento) (0 reazioni) (0 assegnatari)C# (1926 fork)batch import
a/layoute/5 :clock5:help wantedinactivep/Androidt/bug :bug:up-for-grabs

Metriche repository

Star
 (5644 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Description

The height of the Label doesn't engage to a change in MaxLines when the Label is within a Stacklayout (ScrollView works)

Steps to Reproduce

<StackLayout VerticalOptions="FillAndExpand"> <Label LineBreakMode="TailTruncation" Text="{Binding ...}" MaxLines="3"> <Label.GestureRecognizers> <TapGestureRecognizer Tapped="OnCommentClicked"/> </Label.GestureRecognizers> </Label> </StackLayout>

async private void OnCommentClicked(object sender, EventArgs args) { ((Label)sender).MaxLines = 100; // height not changing, only the text }

Basic Information

  • Version with issue: XF 4.4.0

Guida contributor