Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label control's MaxLine and LineBreakMode properties are not working properly in .Net MAUI #9853

Closed
divyesh008 opened this issue Sep 1, 2022 · 1 comment

Comments

@divyesh008
Copy link

Description

To Limit maximum lines of Label and indicate text truncation we use MaxLines and LineBreakMode properties of Label control.

This works fine in Xamarin.Forms but in .Net Maui it's not working properly.

Steps to Reproduce

  1. Create a new project of .Net Maui
  2. It will create MainPage.xaml automatically in that file on second label add some extra text. Also add MaxLines="2" and LineBreakMode="TailTruncation".
  3. Now run the app in both platform it will give different output.

Output

It should show the label with two lines and at the end of second line it will show '...' like this.
But in maui it's not working that way in both Android & iOS. In Android it does shows ellipsis but not second line. Check the attached screenshot.

imgonline-com-ua-twotoone-944sSEK6QvO33nL

Link to public reproduction project repository

https://github.com/divyesh008/MauiLabel_Bug.git

Version with bug

6.0.400

Last version that worked well

6.0.400

Affected platforms

iOS, Android

Affected platform versions

iOS 15, Android 11

Did you find any workaround?

Not yet.

Relevant log output

No response

@divyesh008 divyesh008 added the t/bug Something isn't working label Sep 1, 2022
@Eilon Eilon added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Sep 1, 2022
@PureWeen
Copy link
Member

PureWeen commented Sep 1, 2022

I'm going to close this one as a duplicate of #9084

I realize it's slightly different but they will most likely both be resolved by the same PR and it's helpful to track them together

@PureWeen PureWeen closed this as completed Sep 1, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Oct 1, 2022
@Eilon Eilon added area-controls-label Label, Span and removed legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor labels May 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants