Click or drag to resize

ObservableFilteredCollectionT Class

A simple filtered collection implementation.

This collection contains only the items from the source collection passing the filter.

Inheritance Hierarchy

Namespace: TomsToolbox.ObservableCollections
Assembly: TomsToolbox.ObservableCollections (in TomsToolbox.ObservableCollections.dll) Version: 2.21.0+44d18b541fc9419ec3c549350a832394661b2a4d
XMLNS for XAML: Not mapped to an xmlns.
Syntax
public class ObservableFilteredCollection<T> : ReadOnlyObservableCollectionAdapter<T, ObservableCollection<T>>

Type Parameters

T
Type of the items in the collection.

The ObservableFilteredCollectionT type exposes the following members.

Constructors
 NameDescription
Public methodObservableFilteredCollectionT Initializes a new instance of the ObservableFilteredCollectionT class.
Top
Properties
 NameDescription
Protected propertyItems Returns the collection that the ReadOnlyObservableCollectionAdapterT, TList wraps.
(Inherited from ReadOnlyObservableCollectionAdapterT, TList)
Top
Methods
Events
 NameDescription
Public eventCollectionChanged Occurs when the collection changes.
(Inherited from ReadOnlyObservableCollectionAdapterT, TList)
Public eventPropertyChanged Occurs when a property value changes.
(Inherited from ReadOnlyObservableCollectionAdapterT, TList)
Top
Extension Methods
 NameDescription
Public Extension MethodSafeCastT Performs a cast from object to T, avoiding possible null violations if T is a value type.
(Defined by ObjectExtensions)
Top
Remarks
Changes in the source collection will be tracked always, changes in the individual objects that would affect the filter will be tracked when any of the live tracking properties changes.

The order of the elements may be different than the order in the source collection; also changes that affect the items order in the source collection (see Move, Insert(Int32, Object)) will be ignored.

This collection does not hold a reference to the source collection. To keep the source collection alive, the object generating the ObservableFilteredCollectionT must hold a reference to the source collection.

See Also