CollectionViewSource.Filter Event

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Provides filtering logic.

Namespace:  System.Windows.Data
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public Event Filter As FilterEventHandler
public event FilterEventHandler Filter
<collectionViewSource Filter="eventHandler"/>

Exceptions

Exception Condition
InvalidOperationException

When adding a handler to this event, the View property value has a CanFilter property value of false.

Remarks

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.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.