dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.98k stars 1.71k forks source link

Grid with auto width columns overflows its container #23735

Open RsZoli opened 1 month ago

RsZoli commented 1 month ago

Description

111

The lightblue background indicates a stacklayout, the gold/lightgreen/pink trio is a grid with 3 columns, each set to auto width!

The 3 columns each has a label with linebreakmode set to middletruncation, yet this does not happen, the grid overflows its container!

But, if i remove the auto width from the 2 outside columns, the linkebreakmode kicks in and it works perfectly!

333

However, if i reduce the content of the columns, truncation still happens but it should not be, since there is plenty space for the grid to grow!

222

Steps to Reproduce

Create a new .NET MAUI app, put a 3 coulm Grid inside a StackLayout in a ContentPage, set the Grid's columns to auto with and observe!

Link to public reproduction project repository

No response

Version with bug

8.0.61 SR6.1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android, I was not able test on other platforms

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

github-actions[bot] commented 1 month ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

RsZoli commented 1 month ago

Here you go: https://github.com/RsZoli/GitHubRepros

Screenshot_1722267083

ninachen03 commented 1 month ago

I can repro this issue at Android platform on the latest 17.11.0 Preview 5.0 (8.0.70 & 8.0.61 &8.0.3) GitHubRepros-main.zip