-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Grid with auto width columns overflows its container #23735
Comments
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:
|
Here you go: https://github.com/RsZoli/GitHubRepros |
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) |
@mattleibow Please, can you guys do something about this? |
According to #10494 (comment) this is expected behaviour. It seems Auto is pretty much only usable for fixed width items and just save you from duplicating the size explicitly. For your specific case I guess |
@hartez you said in the linked comment that this is by design. And sure the label can measure with infinite space, that's fine. But shouldn't the arrange step of the layout process limit the Labels width to something that does not break the Grids bounds and still fits the element with the fixed size. |
@FlavioGoncalves-Cayas for that specific case I think you can do: |
Doesn't work. That will always position the red box at the end. But I want it to always be next to the label independent of the labels width EDIT: You're right. Thanks for pointing that out. |
Okay, but for me, the truncation is the bigger issue here! But still, a content shouldn't overflow its container, in my opinion! |
@RsZoli sorry messed up my formatting, intended to write |
Sadly, that doesnt look good for my case! |
Description
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!
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!
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
The text was updated successfully, but these errors were encountered: