Reputation: 1081
I'm trying to add grouping to a ListCollectionView. I have a custom made observable collection that implements IList, IList and INotifyCollectionChanged. The underlying data in the observable collection is loaded async,
The problem is that if I call GetDefaultView on the same instance of the observable collection I can get different instances of a ListCollectionView. Anybody knows when CollectionViewSource determined when to create a new view or when to reuse the old?
Upvotes: 1
Views: 187
Reputation: 1081
I figured this out. The real problem was that my grouping was not applied when initializing the view and view model. The reason for this was that you should not add group descriptions in any other thread then the main thread, otherwise nothing will happen. Now all works great :)
Upvotes: 1