[WPF] BindingListCollectionView ignores item replace #1314
Labels
Enhancement Requested
Product code improvement that does NOT require public API changes/additions
Milestone
Disclaimer: I know that ObservableCollection<T> is the recommended collection type for bindings. Still, if a collection implements both INotifyCollectionChanged and IBindingList interfaces (such as ObservableBindingList<T>), then WPF prefers to handle it as a binding list (picks a BindingListCollectionView for it), which has the issues described below.
Issue Reproduction Steps:
Remark: If T does not implement INotifyPropertyChanged (select PlainTestObject in the app linked above), then replace works; however, since a Reset change type is raised instead of Replace the selection always jumps to the first item.
Proposed fix:
After analyzing the BindingListCollectionView source it seems that the issue can be fixed by a small change in the OnListChanged method:
Disclaimer: I could not test it.
This issue has been moved from https://developercommunity.visualstudio.com/content/problem/651699/wpf-bindinglistcollectionview-ignores-item-replace.html
VSTS ticketId: 949137
These are the original issue comments:
Visual Studio Feedback System on 7/19/2019, 02:18 PM (35 min ago):
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
These are the original issue solutions:
(no solutions)
The text was updated successfully, but these errors were encountered: