microsoft / microsoft/microsoft-ui-xaml

Grid clips subsequent items to the height of the first item, renders display useless

Open
#10,588 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-Lists bug
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.

Image

First cell given a fake extra fixed height row, revealing clipped data in second cell.

Image

### NuGet package version

None

### Windows version

Windows 11 (24H2): Build 26100

### Additional context

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.