Skip to content

CheckBox randomly messed up checked glyph while scrolling in a virtualized container like ListView #11585

Description

@HO-COOH

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.

    <ListView ItemsSource="{x:Bind Items}">
        <ListView.ItemTemplate>
            <DataTemplate x:DataType="x:Boolean">
                <CheckBox Content="CheckBox" IsChecked="{x:Bind}" />
            </DataTemplate>
        </ListView.ItemTemplate>
    </ListView>

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

Image Image
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageIssue needs to be triaged by the area owners

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions