In This Topic
    Applying a style to localize the operators
    In This Topic

    The following example demonstrates how to set a style to localize the operators.

    XAML
    Copy Code
    <Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid">
       <Grid.Resources>
          <ResourceDictionary>
             <xcdg:DataGridCollectionViewSource x:Key="cvs_orders"
                                                Source="{Binding Source={x:Static Application.Current}, Path=Orders}" />
             <Style x:Key="filterExpressionEditorStyle"
                    TargetType="xcdg:FilterExpressionEditor">
                <Setter Property="FilterOperatorsText">
                   <Setter.Value>
                      <col:Hashtable>
                         <s:String x:Key="{x:Type xcdg:GreaterThanFilterCriterion}">&gt;</s:String>
                         <s:String x:Key="{x:Type xcdg:GreaterThanOrEqualToFilterCriterion}">&gt;=</s:String>
                         <s:String x:Key="{x:Type xcdg:LessThanFilterCriterion}">&lt;</s:String>
                         <s:String x:Key="{x:Type xcdg:LessThanOrEqualToFilterCriterion}">&lt;=</s:String>
                         <s:String x:Key="{x:Type xcdg:EqualToFilterCriterion}">=</s:String>
                         <s:String x:Key="{x:Type xcdg:DifferentThanFilterCriterion}">&lt;&gt;</s:String>
                      </col:Hashtable>
                   </Setter.Value>
                </Setter>
             </Style>
          </ResourceDictionary>
       </Grid.Resources>
       <xcdg:DataGridControl x:Name="OrdersGrid"
                             ItemsSource="{Binding Source={StaticResource cvs_orders}}">
          <xcdg:DataGridControl.Columns>
             <xcdg:Column FieldName="ShipCountry"
                          FilterExpressionEditorStyle="{StaticResource filterExpressionEditorStyle}" />
          </xcdg:DataGridControl.Columns>
       </xcdg:DataGridControl>
    </Grid>