Drag and Drop on a CollectionView Shows the Wrong Text Afterwards
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 290
Description
### Description
One of the fields in the Target item gets the value from the source item, so in the attached example you start dragging:
Drop "Last" on top of "First" and you get this:
The drag/drop has successfully swapped the items but notice that the display of item 0 now says "Last" when it should be unchanged and still say "First".
### Steps to Reproduce
1. Clone the repository
2. Build and run the app on Windows (it fails on Android too)
3. Expect this page:
4. Ignore most of it, just drag "Last" over "First" and observe the result.
### Link to public reproduction project repository
https://github.com/david-maw/CollectionViewTest-DragDrop.git
### Version with bug
10.0.70
### Is this a regression from previous behavior?
Not sure, did not test other versions
### Last version that worked well
_No response_
### Affected platforms
Android, Windows, I was *not* able test on other platforms
### Affected platform versions
Windows 11, Android 36
### Did you find any workaround?
Yes, setting the `CollectionView ItemsSource` to null then restoring it, which was ok for my small collection but might be problematic for larger ones.
### Relevant log output
```shell
```
Contributor guide
Research direction
Start by cloning and running the linked CollectionViewTest-DragDrop reproduction on Windows or Android, then trace the CollectionView drag-and-drop path involved in swapping “Last” and “First.” Done means the items swap while the target item's displayed field remains unchanged, without needing to reset ItemsSource to null.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, csharp
- Domain
- frontend, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100