Add an additional property to your ViewModel that exposes the CollectionViewSource and bind your ListBox to that property.
public CollectionViewSource FilteredUsers{
get {
return usercvs.View;
}
}
The ObservableCollection
is not changed when you apply any filters to the CollectionViewSource
, so that you will always see all items. The Filter gets applied to the CollectionViewSource and the filtered result can be accessed by the property View of the class.