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

WordWrap doesn't wrap on a Label in a Grid if the ColumnDefinition is set to Auto. #21110

Closed
czuck opened this issue Mar 8, 2024 · 4 comments
Labels
area-controls-label Label, Span area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@czuck
Copy link

czuck commented Mar 8, 2024

Description

The text of the label goes off the screen instead of wrapping

Steps to Reproduce

Add this code to a content page:

        <Grid
            RowDefinitions="*, Auto, *"
            ColumnDefinitions="*">
        <Label Text="This is a long text message that should wrap to the next line when displayed on the screen"
               FontSize="16"
               Grid.Row="1"
               Grid.Column="0"
               LineBreakMode="WordWrap"></Label>
        </Grid>

Run it and the label will wrap to a second line:
image

Then change ColumnDefinitions in the Grid to Auto:
ColumnDefinitions="Auto">
the label no longer wraps:
image

Link to public reproduction project repository

No response

Version with bug

8.0.7 SR2

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

iOS 17.2, Android 9.0

Did you find any workaround?

No response

Relevant log output

No response

@czuck czuck added the t/bug Something isn't working label Mar 8, 2024
@czuck czuck changed the title WordWrap doesn't work on a label in a Grid if the ColumnDefinition is set to Auto. WordWrap doesn't work on a Label in a Grid if the ColumnDefinition is set to Auto. Mar 8, 2024
@czuck czuck changed the title WordWrap doesn't work on a Label in a Grid if the ColumnDefinition is set to Auto. WordWrap doesn't wrap on a Label in a Grid if the ColumnDefinition is set to Auto. Mar 8, 2024
@jsuarezruiz jsuarezruiz added area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter area-controls-label Label, Span labels Mar 11, 2024
@hansmbakker
Copy link

hansmbakker commented Mar 11, 2024

This issue looks similar to #10046 and #17658

@mattleibow
Copy link
Member

I just tested in WinUI and they have the same behaviour:

image

image

@jaosnz-rep
Copy link

Can repro on 17.10.0 Preview 2.0 with .NET 8 Android platform.

@jaosnz-rep jaosnz-rep added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Mar 14, 2024
@mattleibow
Copy link
Member

Duplicate of #10494

@mattleibow mattleibow marked this as a duplicate of #10494 Mar 18, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-label Label, Span area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants