microsoft / microsoft/microsoft-ui-xaml
Grid clips subsequent items to the height of the first item, renders display useless
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
When using a Grid to display data flowing left to right, the content of each cell is arbitrarily clipped, rendering the application useless.
From lots of archeology it appears the height of any given row in the grid is controlled by the height of the first cell in the grid. This cell's height bears zero relation to any other cell's height, and so data is arbitrarily clipped.
It appears that the WinUI3 Gallery app cheats by explicitly setting the height on the rows. This may make sense for a static app showing static data, but any real app showing real data fails.
What is needed is for an option for the cells to be made the height of the tallest cell, not the first cell. This will guarantee that all data appears on the screen without clipping.
### Steps to reproduce the bug
- Create a grid where the second cell is taller than the first.
- When rendered, the second cell is clipped.
### Expected behavior
- Create a grid where the second cell is taller than the first.
- The first cell is fully visible.
- The second cell is fully visible.
### Screenshots
Second cell clipped at height of first cell.
First cell given a fake extra fixed height row, revealing clipped data in second cell.
### NuGet package version
None
### Windows version
Windows 11 (24H2): Build 26100
### Additional context
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with a WinUI3 Grid whose second cell is taller than the first, then compare its behavior with the WinUI3 Gallery app. The work is complete when row sizing follows the tallest cell and both cells' contents remain fully visible without fixed row heights.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100