dotnet / dotnet/maui

BoxView in Grid Auto Row doesn't get sized properly based on RowDefinition Height value

Open
#3,633 5 comments 0 reactions 0 assignees View on GitHub
area-layout platform/android platform/ios s/triaged s/verified t/bug
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 15h
Merged PRs (30d)
290

Description

### Description

The NestedGrid demo from the Xamarin Forms samples repo doesn't render similarly when ported to MAUI:

image

The XAML is as follows:
```






















```

In investigating this, setting row definitions to different values produces unexpected results:

1. These work properly:
- `


`
- `


`
- `


`
2. This causes BoxView to take up the whole Grid:
- `


`
3. This causes BoxView to not take up any space (the original issue)
`


`

### Steps to Reproduce

1. Port the following to MAUI: https://github.com/xamarin/xamarin-forms-samples/tree/main/UserInterface/Layout/GridDemos
2. Run the app without changing the XAML

### Version with bug

Preview 10 (current)

### Last version that worked well

Unknown/Other

### Affected platforms

iOS, Android

### Affected platform versions

iOS 15, Android Pixel 4 API 30

### Did you find any workaround?

Play around with RowDefinition Height values for the expected result.

### Relevant log output

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by porting the Xamarin.Forms GridDemos NestedGrid demo and running the supplied XAML on iOS and Android. Compare the BoxView size with the RowDefinition Height="Auto" and unspecified-height cases; done means the MAUI rendering matches the expected layout and the reported row-height variations behave consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.