FilterDescriptor Class
[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]
Represents a filter description for query operations in a DomainDataSource object.
Inheritance Hierarchy
System.Object
System.Windows.DependencyObject
System.Windows.Controls.FilterDescriptor
Namespace: System.Windows.Controls
Assembly: System.Windows.Controls.DomainServices (in System.Windows.Controls.DomainServices.dll)
Syntax
'Declaration
Public Class FilterDescriptor _
Inherits DependencyObject
'Usage
Dim instance As FilterDescriptor
public class FilterDescriptor : DependencyObject
public ref class FilterDescriptor : public DependencyObject
type FilterDescriptor =
class
inherit DependencyObject
end
public class FilterDescriptor extends DependencyObject
The FilterDescriptor type exposes the following members.
Constructors
Name | Description | |
---|---|---|
FilterDescriptor() | Initializes a new instance of the FilterDescriptor class with default values. | |
FilterDescriptor(String, FilterOperator, Object) | Initializes a new instance of the FilterDescriptor class with the specified property to use for filtering, the operator to use when evaluating the filtering check, and the filter value. |
Top
Properties
Name | Description | |
---|---|---|
Dispatcher | (Inherited from DependencyObject.) | |
IgnoredValue | Gets or sets the value that is not applied to a query operation for filtering. | |
IsCaseSensitive | Gets or sets a value indicating whether the FilterDescriptor is case sensitive for string values. | |
Operator | Gets or sets the filter operator. | |
PropertyPath | Gets or sets the name of the property path used as the data value to assess whether the entity meets the filter check. | |
Value | Gets or sets the value to use for evaluating the filter condition. |
Top
Methods
Name | Description | |
---|---|---|
CheckAccess | (Inherited from DependencyObject.) | |
ClearValue | (Inherited from DependencyObject.) | |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetAnimationBaseValue | (Inherited from DependencyObject.) | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
GetValue | (Inherited from DependencyObject.) | |
MemberwiseClone | (Inherited from Object.) | |
ReadLocalValue | (Inherited from DependencyObject.) | |
SetValue | (Inherited from DependencyObject.) | |
ToString | (Inherited from Object.) |
Top
Fields
Name | Description | |
---|---|---|
DefaultIgnoredValue | The default value of the IgnoredValue property. | |
IgnoredValueProperty | Identifies the IgnoredValue dependency property. | |
IsCaseSensitiveProperty | Identifies the IsCaseSensitive dependency property. | |
OperatorProperty | Identifies the Operator dependency property. | |
PropertyPathProperty | Identifies the PropertyPath dependency property. | |
ValueProperty | Identifies the Value dependency property. |
Top
Remarks
The DomainDataSource control provides the FilterDescriptors collection to enable you to filter the data that is returned by the query. By adding filters, you can specify that only entities which meet the condition in the filter are loaded from the domain context. You define the logical relationship between different filters by setting the FilterOperator property on the DomainDataSource object. The FilterOperator property supports any value in the FilterDescriptorLogicalOperator enumerator.Within a FilterDescriptor instance, you set the Operator property to specify the type of comparison to use when filtering. Filter descriptors support the operations in the FilterOperator enumerator.
Examples
The following example shows two filter descriptors that are connected by a logical AND statement. One filter depends on user input and one filter is specified in the declarative syntax.
<Grid x:Name="LayoutRoot" Background="White">
<Grid.RowDefinitions>
<RowDefinition Height="25" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<riaControls:DomainDataSource x:Name="source" QueryName="GetProducts" AutoLoad="true">
<riaControls:DomainDataSource.DomainContext>
<domain:ProductDomainContext />
</riaControls:DomainDataSource.DomainContext>
<riaControls:DomainDataSource.FilterDescriptors>
<riaData:FilterDescriptorCollection LogicalOperator="And">
<riaData:FilterDescriptor PropertyPath="Color" Operator="IsEqualTo" Value="Blue" />
<riaData:FilterDescriptor PropertyPath="ListPrice" Operator="IsLessThanOrEqualTo">
<riaControls:ControlParameter
ControlName="MaxPrice"
PropertyName="SelectedItem.Content"
RefreshEventName="SelectionChanged" />
</riaData:FilterDescriptor>
</riaData:FilterDescriptorCollection>
</riaControls:DomainDataSource.FilterDescriptors>
</riaControls:DomainDataSource>
<ComboBox x:Name="MaxPrice" Grid.Row="0" Width="60" SelectedIndex="0">
<ComboBoxItem Content="100" />
<ComboBoxItem Content="500" />
<ComboBoxItem Content="1000" />
</ComboBox>
<data:DataGrid Grid.Row="1" ItemsSource="{Binding Data, ElementName=source}" />
</Grid>
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.