I have a WPF ListView bound to a CollectionViewSource. The source of that is bound to a property, which can change if the user selects an option.
When the list view
Are you changing the actual collection instance assigned to the CollectionViewSource.Source
, or are you just firing PropertyChanged
on the property that it's bound to?
If the Source
property is set, the filter should be recalled for every item in the new source collection, so I'm thinking something else is happening. Have you tried setting Source
manually instead of using a binding and seeing if you still get your behavior?
Edit:
Are you using CollectionViewSource.View.Filter property, or the CollectionViewSource.Filter event? The CollectionView
will get blown away when you set a new Source
, so if you had a Filter
set on the CollectionView
it won't be there anymore.