Bug: UniformGridLayout can leave empty gaps after resizing while scrolled
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
Direção de pesquisa
Comece reproduzindo o problema com um ItemsRepeater usando UniformGridLayout, virtualização, rolagem e uma alteração da largura em tempo de execução. Inspecione o comportamento do layout e da virtualização durante o redimensionamento e, em seguida, verifique se todos os itens visíveis continuam realizados e posicionados sem lacunas e reaparecem sem rolagem adicional.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Describe the bug
Describe the bug
UniformGridLayout can leave empty gaps in an ItemsRepeater after resizing the available width while the control is scrolled.
Some items disappear from the viewport, leaving blank spaces where the items should be. Simply scrolling a small amount causes the missing items to reappear.
Steps to reproduce
- Display a large collection of items using
ItemsRepeaterwithUniformGridLayout. - Ensure virtualization is active (enough items to require scrolling).
- Scroll down several rows.
- Resize the available width of the
ItemsRepeater(for example by moving aGridSplitterthat changes the width of its parent container). - Observe that some visible positions become empty.
- Scroll slightly up or down.
- The missing items reappear.
Expected behavior
After a width change, all visible items should remain correctly realized and positioned.
No empty gaps should appear.
Actual behavior
After resizing while scrolled:
- Some items disappear from the viewport.
- Empty spaces remain where those items should be.
- A small scroll causes the missing items to reappear.
This suggests the layout/virtualization state becomes inconsistent after the width change.
Environment
- Windows App SDK: (fill in version)
- WinUI: (fill in version)
- Windows version: (fill in version)
Additional information
The issue appears only after the control has been scrolled.
Resizing while already at the top of the list is much harder (or impossible) to reproduce.
The problem is consistently reproducible in a grid using UniformGridLayout with virtualization enabled after changing the available width.
Steps to reproduce
## Steps to reproduce
1. Create an `ItemsRepeater` using `UniformGridLayout` with enough items to enable virtualization and scrolling.
2. Place the `ItemsRepeater` in a layout where its available width can change at runtime (for example, by resizing a neighboring panel with a `GridSplitter`).
3. Scroll down several rows so the viewport is no longer at the top of the list.
4. Resize the available width of the `ItemsRepeater`.
5. Observe that some items disappear, leaving empty gaps in the grid.
6. Scroll slightly up or down.
7. Observe that the missing items immediately reappear.
## Reproducibility
Occurs consistently in this scenario after scrolling and resizing the available width of the `ItemsRepeater`.
Expected behavior
Expected behavior
When the available width of an ItemsRepeater using UniformGridLayout changes, the layout should correctly recalculate the positions of all visible items.
No visible items should disappear or leave empty gaps in the grid. The realized items and scroll extent should remain consistent before, during, and after the resize, without requiring any additional user interaction (such as scrolling) to restore the correct layout.
Screenshots
No response
Code Platform
- UWP
- WinAppSDK / WinUI 3
- Web Assembly (WASM)
- Android
- iOS
- MacOS
- Linux / GTK
Windows Build Number
- Windows 10 1809 (Build 17763)
- Windows 10 1903 (Build 18362)
- Windows 10 1909 (Build 18363)
- Windows 10 2004 (Build 19041)
- Windows 10 20H2 (Build 19042)
- Windows 10 21H1 (Build 19043)
- Windows 10 21H2 (Build 19044)
- Windows 10 22H2 (Build 19045)
- Windows 11 21H2 (Build 22000)
- Windows 11 22H2 (Build 22621)
- Windows 11 23H2 (Build 22631)
- Windows 11 24H2 (Build 26100)
- Windows 11 25H2 (Build 26200)
- Windows 11 26H1 (Build 28000)
- Other (specify)
Other Windows Build number
No response
App minimum and target SDK version
- Windows 10, version 1809 (Build 17763)
- Windows 10, version 1903 (Build 18362)
- Windows 10, version 1909 (Build 18363)
- Windows 10, version 2004 (Build 19041)
- Windows 10, version 2104 (Build 20348)
- Windows 11, version 22H2 (Build 22000)
- Windows 11, version 24H2 (Build 26100)
- Windows 11, version 25H2 (Build 26200)
- Windows 11, version 26H1 (Build 28000)
- Other (specify)
Other SDK version
No response
Visual Studio Version
2026
Visual Studio Build Number
No response
Device form factor
Desktop
Additional context
No response
Help us help you
Yes, I'd like to be assigned to work on this item.
- Linguagem predominante
- C#
- Estrelas
- 1.1k
- Forks
- 170
- Merge médio
- 6d 5h
- PRs com merge (30d)
- 1
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de CommunityToolkit/Windows
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
CommunityToolkit/Windows#883 ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
CommunityToolkit/Windows#882 ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 62/100
CommunityToolkit/Windows#867 · 7 comentários ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
CommunityToolkit/Windows#863 · 12 comentários ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 62/100
CommunityToolkit/Windows#860 · 2 comentários ·
Todas as issues de CommunityToolkit/Windows
Issues semelhantes
-
[Bug] Dashboard renders attachment links that resolve to 404 when the FILES binding is absentAbertabug 優先: 低
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 92/100
-
.NET area: storage bug good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Larson-Logan/medal-sync#61 ·
Mantenedores costumam responder em até 1 dia
-
area-ai bug untriaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
dotnet/extensions#7893 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 72/100