Bug: UniformGridLayout can leave empty gaps after resizing while scrolled
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
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
- 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.
- Lingua principale
- C#
- Stelle
- 1.1k
- Fork
- 167
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di CommunityToolkit/Windows
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
CommunityToolkit/Windows#867 · 4 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
CommunityToolkit/Windows#863 · 13 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 62/100
CommunityToolkit/Windows#860 · 2 commenti ·
-
[SettingsCard] Change ActionIcon to utilize IconSource and IconSourceElementForse di nuovo libera @Avid29 l’ha presa 124 giorni fa e non c’è nessuna pull request aperta. Apertacomponents::controls::settingscontrols
CommunityToolkit/Windows#858 · 4 commenti · 1 assegnatario ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
CommunityToolkit/Windows#857 · 3 commenti ·
Tutte le issue di CommunityToolkit/Windows
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
MicrosoftLearning/PL-400_Microsoft-Power-Platform-Developer#231 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
joinrpg/joinrpg-net#5313 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno