[Bug]iOS,Android: Grid not measured size by it's content
See original GitHub issueDescription
Grid fill all available page space but has VerticalOptions=“Center”
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="gridexampl.MainPage"
BackgroundColor="{DynamicResource SecondaryColor}">
<Grid BackgroundColor="Gray" VerticalOptions="Center" HorizontalOptions="Center" >
<Label Text="Text" BackgroundColor="Red" VerticalOptions="Center" HorizontalOptions="Center"/>
</Grid>
</ContentPage>
Expected Behavior
Grid must be mesuared size by their content

Actual Behavior
Grid fill all empty space on page

I Attached Example gridexampl.zip
Steps to Reproduce
- Open example .NET MAUI App
- Run App
Version with bug
Preview 10 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android
Affected platform versions
iOS 15, Android 11
Did you find any workaround?
No
Relevant log output
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Why is my Grid element's height not being calculated ...
The size of the tracks is first calculated by the browser considering content and grid properties and then this height is used as...
Read more >How to troubleshoot a grid item not resizing in CSS
You can try the following steps: Check if the grid item has a fixed size set in pixels. If it does, change it...
Read more >fit-content() - CSS: Cascading Style Sheets - MDN Web Docs
The fit-content() CSS function clamps a given size to an available size according to the formula min(maximum size, max(minimum size, ...
Read more >Intrinsic measurements in Compose layouts
One of the rules of Compose is that you should only measure your children once; measuring children twice throws a runtime exception.
Read more >JavaScript Data Grid: Grid Size
Under normal usage, your application should set the width and height of the grid using CSS styles. The grid will then fit the...
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

Hello, we are developing DevExpress .NET MAUI controls and experienced the same issue in the scenario with layout our controls. This issue has a high priority for us and we do not have a workaround. Thank you for your help.
Verified - this is fixed on the net6.0 branch and the fix should be in SR2.