CollectionViewSource::Filter Event
.NET Framework (current version)
Provides filtering logic.
Assembly: PresentationFramework (in PresentationFramework.dll)
Views can apply a filter to a collection. This means that although an item might exist in the collection, a particular view is intended to show only a certain subset of the full collection.
You can use this event to set an event handler to provide filtering logic.
The following example shows how to set an event handler for the Filter event. In this example, listingDataView is an instance of CollectionViewSource.
The following shows the implementation of the example ShowOnlyBargainsFilter filter event handler. This event handler uses the Accepted property to filter out AuctionItem objects that have a CurrentPrice of $25 or greater.
For the complete example, see Data Binding Demo.
.NET Framework
Available since 3.0
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Available since 3.0
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Show: