Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Bug: UniformGridLayout can leave empty gaps after resizing while scrolled

Aperta
#869 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
frontend

Direzione di ricerca

Inizia riproducendo il problema con un ItemsRepeater usando UniformGridLayout, la virtualizzazione, lo scorrimento e una modifica della larghezza in fase di esecuzione. Esamina il comportamento del layout e della virtualizzazione durante il ridimensionamento, quindi verifica che tutti gli elementi visibili rimangano realizzati e posizionati senza spazi vuoti e ricompaiano senza ulteriore scorrimento.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

  1. Display a large collection of items using ItemsRepeater with UniformGridLayout.
  2. Ensure virtualization is active (enough items to require scrolling).
  3. Scroll down several rows.
  4. Resize the available width of the ItemsRepeater (for example by moving a GridSplitter that changes the width of its parent container).
  5. Observe that some visible positions become empty.
  6. Scroll slightly up or down.
  7. 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.

Lingua principale
C#
Stelle
1.1k
Fork
167
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CommunityToolkit/Windows

Tutte le issue di CommunityToolkit/Windows

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.