-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Describe the bug
The system ListView
and GridView
controls exhibit an unexpected behavior when their items are reordered while a ListViewBase.ItemClick
event is being processed. It seems that there is some internal race inside the control since we can receive a null ItemClickEventArgs.ClickedItem
in the event even if there is no null item within the list.
This issue can easily by hit in our application but I didn't find a way to reproduce this issue in a sample app 😥. It seems to depend on the complexity on the template, the load on the UI thread and the click speed.
Regression
No response
Reproducible in sample app?
- This bug can be reproduced in the sample app.
Steps to reproduce
In our application, clicking several times very fast on the item while the ListView
/ GridView
items are being reordered almost always trigger the issue.
Expected behavior
There is two ways to work around this issue:
- Add a null check in all our
ICommand
s - Prevent the unexpected null event from being triggered.
Option 1 is not viable on my side, so I'd like to add an option to ListViewExtensions
to add the ability to discard the null value at the ListViewExtensions.Command
level.
Screenshots
No response
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 11 21H2 (Build 22000)
- 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)
- Other (specify)
Other SDK version
No response
Visual Studio Version
No response
Visual Studio Build Number
No response
Device form factor
No response
Nuget packages
No response
Additional context
No response
Help us help you
Yes, I'd like to be assigned to work on this item.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status