Is there a way to get notified when CompositeCollection’s current location changes?
I need to have the CompositeCollection monitored by a CollectionView, any ideas are welcommed.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can detect when the current item has changed by monitoring the
ICollectionView.CurrentChangedevent of your CollectionView. The following code works for me:When I change the selection in the ListBox, the message box displays.
Regarding filtering, sorting and grouping, as per Aron’s answer these are not available on a view over a CompositeCollection. But for the record here are the ways you can detect changes for views that do support these features:
ObservableCollection<GroupDescription>, so hook up a CollectionChanged event handler on the GroupDescriptions property.