[regression/8.0.0-preview.5.8529] Grid with a star and an empty auto column leads to an incorrect layout
See original GitHub issueDescription
When using a Grid
layout with *
and Auto
columns and there is no content in the Auto
column, the result layout is incorrect.
For example, consider the following Grid
layout:
<Grid ColumnDefinitions="*, Auto" RowDefinitions="Auto, *">
<Label Grid.Row="0" Text="First Name" />
<Entry Grid.Row="1" />
</Grid>
The above Grid
contains children in the *
column only, while the Auto
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
- Run the sample project from the provided link.
- Observe the incorrect initial layout.
- Resize the window or rotate the phone/tablet.
- Observe the correct layout after resizing.
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
Issue Analytics
- State:
- Created 2 months ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
GridLayoutManager - how to auto fit columns?
You can calculate available number of columns, given a desired column width, and load the image as calculated. Define a static funtion to ......
Read more >totalCount must not be null or less than the number of items
I've been looking through the forums and have checked that when there's no data being passed in, no data should be getting generated...
Read more >GridLayout
A column or row that is sized Auto(true) tries to fit its own size to its content. When a GridLayout is solved, it...
Read more >a!WriteRecords not working
Hi! I´m trying to write records using the a!writeRecords inside an interface. First of all, I save all the values of my editable...
Read more >Use CSS Grid auto-fit For Responsive Column Layout
We'll complete our landing page styles by using CSS grid auto-fit in conjunction with the grid functions repeat and minmax.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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
Grid
layout that worked well with the latest official version, but was broken in the latest preview, in hope Microsoft would have enough time to fix it before .NET 8 goes official.So this and #16368 are the same bug.