In This Article

PredicateFilter Class

Represents a IDataFilter implementation that uses a predicate to execute custom filter logic.

public class PredicateFilter : DataFilterBase, IDataFilter
Inheritance:
object DataFilterBase object
Implements:
IDataFilter

Constructors

PredicateFilter()

Initializes an instance of the PredicateFilter class.

public PredicateFilter()

PredicateFilter(Predicate<object>)

Initializes an instance of the PredicateFilter class.

public PredicateFilter(Predicate<object> predicate)
Parameter Type Description
predicate Predicate<object>

The predicate to use for this filter.

Properties

Predicate

Gets or sets the predicate to use for this filter.

public Predicate<object> Predicate { get; set; }

Property Value

Predicate<object>:

The predicate to use for this filter. The default value is null.

Methods

Filter(object, object)

Examines the specified item to see if meets filter conditions.

public override DataFilterResult Filter(object item, object context)
Parameter Type Description
item object

The item to examine.

context object

An optional object that provides contextual information for the filter request.

Returns

DataFilterResult:

A DataFilterResult that indicates the filter result.

Fields

PredicateProperty

Identifies the Predicate dependency property. This field is read-only.

public static readonly DependencyProperty PredicateProperty

Inherited Members