microsoft / microsoft/microsoft-ui-xaml
CheckBox randomly messed up checked glyph while scrolling in a virtualized container like ListView
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
When I have a large number of `CheckBox` inside a virtualized container (`ListView` for example), during a quick scroll, some (actually most) of the CheckBox lost their checked glyph, only showing a filled rectangle. Some others are leaving their checked glyph without a filled rectangle.
### Why is this important?
This is a serious visual glitch for such a basic control.
### Steps to reproduce the bug
In a `ListView`, bind its `ItemsSource` with a `IVector` containing 1000 boolean elements.
```xml
```
Then scroll it rapidly.
I made the 1000 booleans a true followed with a false value and so on, to show it's clearly wrong.
### Actual behavior
- Checked checkbox is not checked.
- Unchecked checkbox is not unchecked.
Nothing works😆
### Expected behavior
Checked checkbox should have checked glyph and a background. Unchecked checkbox should have an empty rectangle. That's simple and obvious enough.
### Screenshots
_No response_
### NuGet package version
2.4
### Windows version
_No response_
### Additional context
_No response_
Contributor guide
Research direction
Reproduce the issue with the provided XAML ListView sample, using 1,000 alternating boolean values and rapid scrolling. Start by tracing CheckBox rendering and state updates while virtualized ListView items are recycled; done means checked items consistently show both glyph and background, while unchecked items show an empty rectangle.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100