| ObservableExtensionsObservableWhereT Method |
Returns an observable collection of objects of type
T that contains all items of the source collection that pass the filter.
See
ObservableFilteredCollectionT for details.
Namespace:
TomsToolbox.ObservableCollections
Assembly:
TomsToolbox.ObservableCollections (in TomsToolbox.ObservableCollections.dll)
Syntax public static IObservableCollection<T> ObservableWhere<T>(
this IList<T> source,
Func<T, bool> predicate,
params string[] liveTrackingProperties
)
<ExtensionAttribute>
Public Shared Function ObservableWhere(Of T) (
source As IList(Of T),
predicate As Func(Of T, Boolean),
ParamArray liveTrackingProperties As String()
) As IObservableCollection(Of T)
Parameters
- source
- Type: System.Collections.GenericIListT
The source collection. - predicate
- Type: SystemFuncT, Boolean
The predicate used to filter. - liveTrackingProperties
- Type: SystemString
The live tracking properties. Whenever one of these properties in any item changes, the filter is reevaluated for the item.
Type Parameters
- T
- The type of the target elements.
Return Value
Type:
IObservableCollectionT
The observable collection of objects of type
T that contains the filtered items of the source collection.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IListT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Remarks See Also