-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[regression/8.0.0-preview.5.8529] Grid with a star and an empty auto column leads to an incorrect layout #16334
Comments
You specified two columns, but the grids children have no grid column value. The documentation for Maui Grid states... You must specify row and/or column if more than one. Xamarin would "kind of" figure that out for you, but moving forward, Maui doesn't. Hope that helps. |
@Stedy59 If For example, I have the following requirement:
One way to accomplish this is to duplicate the entire view for desktop and mobile, just to specify a different placement for that specific <Label Grid.Column="{OnIdiom Default=0, Phone=1}" Grid.Row="{OnIdiom Default=1, Phone=0}" /> That is just one example. Another case is to have a child in an The main problem is that when we have an |
Try this...
Make the inner StackLayout a global style, and use everywhere. |
@Stedy59 Thanks for the suggestion. I have a workaround for my particular scenario, but it is more involved. I am reporting a regression in the |
Just to add a bit more context, the sample project repros but the sample in the issue description does not. It seems like the condition here is when there's an auto/unbound measure involved only. If you just put the one Grid (First Name with entry) in a page, it doesn't repro, but as soon as I nest it inside a VerticalStackLayout (or even inside a ) it repros. So, without going into the repro project, you can simply use this XAML:
|
So this and #16368 are the same bug. |
…Fixes #16368 Fixes #16334 (#16641) Co-authored-by: E.Z. Hart <[email protected]>
Description
When using a
Grid
layout with*
andAuto
columns and there is no content in theAuto
column, the result layout is incorrect.For example, consider the following
Grid
layout:The above
Grid
contains children in the*
column only, while theAuto
is empty. The following screenshot demonstrates how the layout appears initially:After resizing the window, the layout appears correctly:
The above screenshot is on Windows, but similar problems can be observed on the other platforms as well.
Steps to Reproduce
Link to public reproduction project repository
https://github.com/telerik/ms-samples/tree/main/Maui/GridStarAutoEmptyIncorrectLayout
Version with bug
8.0.0-preview.5.8529
Last version that worked well
7.0.86
Affected platforms
iOS, Android, Windows, macOS
Affected platform versions
N/A
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: