<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Data" xmlns:telerikData="clr-namespace:Telerik.Windows.Data;assembly=Telerik.Windows.Data" xmlns:input="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input" xmlns:dataPager="clr-namespace:Telerik.Windows.Controls.Data.DataPager;assembly=Telerik.Windows.Controls.Data" xmlns:dataFilter="clr-namespace:Telerik.Windows.Controls.Data.DataFilter;assembly=Telerik.Windows.Controls.Data" xmlns:dataForm="clr-namespace:Telerik.Windows.Controls.Data.DataForm;assembly=Telerik.Windows.Controls.Data" xmlns:propertyGrid="clr-namespace:Telerik.Windows.Controls.Data.PropertyGrid;assembly=Telerik.Windows.Controls.Data">
  <LinearGradientBrush x:Key="RadPager_Page_TopShadow" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#4C000000" Offset="0" />
    <GradientStop Offset="0.3" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="RadPager_Page_Over" EndPoint="0.5,0.99" StartPoint="0.5,0.01">
    <GradientStop Color="#FFE4F1F6" Offset="0.216" />
    <GradientStop Color="#FFD5E7EE" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="RadPager_Page_Disabled" EndPoint="0.5,0.99" StartPoint="0.5,0.01">
    <GradientStop Color="White" Offset="1" />
    <GradientStop Color="#FFBDBDBD" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="RadPager_Page_Checked" EndPoint="0.5,0.99" StartPoint="0.5,0.01">
    <GradientStop Color="#FFB3D2DC" Offset="0.5" />
    <GradientStop Color="#FF80BED3" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="RadPager_Page_Background" EndPoint="0.5,0.99" StartPoint="0.5,0.01">
    <GradientStop Color="White" Offset="0.216" />
    <GradientStop Color="#FFBDBDBD" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="RadPager_Page_Border" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF494949" Offset="0" />
    <GradientStop Color="#FF9D9D9D" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="RadPager_Indicator" Color="Black" />
  <SolidColorBrush x:Key="RadPager_NumericPresenter_Background" Color="#FF929292" />
  <LinearGradientBrush x:Key="RadPager_NumericPresenter_Border" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF494949" Offset="0" />
    <GradientStop Color="#FF9D9D9D" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="RadPager_Separator1" Color="White" />
  <SolidColorBrush x:Key="RadPager_Separator2" Color="#FFB1B1B1" />
  <LinearGradientBrush x:Key="RadPager_Background" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="White" Offset="0" />
    <GradientStop Color="#FFDADDDE" Offset="0.037" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="RadPager_Border" Color="#FFB1B1B1" />
  <SolidColorBrush x:Key="RadPager_Foreground" Color="Black" />
  <telerikData:FilterOperatorConverter x:Key="FilterOperatorConverter" />
  <LinearGradientBrush x:Key="RemoveFilterButton_Background_Over" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFDE4646" Offset="1" />
    <GradientStop Color="#FFFF8B6A" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="RemoveFilterButton_Background_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF943434" />
    <GradientStop Color="#FFFF3800" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="RemoveFilterButton_Background" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF943434" Offset="1" />
    <GradientStop Color="#FFFF3800" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="RemoveFilterButton_Border" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF89C3D6" Offset="0" />
    <GradientStop Color="#FFE0F3FD" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="RemoveFilterButton_Foreground" Color="White" />
  <LinearGradientBrush x:Key="AddFilterButton_Background_Over" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF5AB13C" Offset="1" />
    <GradientStop Color="#FFB1FF72" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="AddFilterButton_Background_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF4D9434" />
    <GradientStop Color="#FF71FF00" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="AddFilterButton_Background" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF4D9434" Offset="1" />
    <GradientStop Color="#FF71FF00" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="AddFilterButton_Border" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF89C3D6" Offset="0" />
    <GradientStop Color="#FFE0F3FD" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="AddFilterButton_Foreground" Color="White" />
  <LinearGradientBrush x:Key="ToggleButton_Background_Over" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFBBDBE6" Offset="0.12" />
    <GradientStop Color="#FFB4D2DC" Offset="0" />
    <GradientStop Color="#FF7FBFD4" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ToggleButton_Background_Pressed" EndPoint="0.5,0" StartPoint="0.5,0.9">
    <GradientStop Color="#FFE7F3F8" Offset="0" />
    <GradientStop Color="#FFD4E7EE" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ToggleButton_Background" Color="Transparent" />
  <SolidColorBrush x:Key="ToggleButton_Foreground" Color="Black" />
  <SolidColorBrush x:Key="ToggleButton_Border_Checked" Color="#FF84ADC5" />
  <LinearGradientBrush x:Key="ToggleButton_Background_Checked" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFDFE1E2" Offset="0" />
    <GradientStop Color="White" Offset="0.5" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ComboBoxItem_Border_Selected" Color="#FFC2DAE3" />
  <LinearGradientBrush x:Key="ComboBoxItem_Background_Over" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFE7F3F8" Offset="0" />
    <GradientStop Color="#FFD4E7EE" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ComboBoxItem_Foreground" Color="Black" />
  <SolidColorBrush x:Key="Popup_Border" Color="#FF84ADC5" />
  <SolidColorBrush x:Key="Popup_Background" Color="White" />
  <SolidColorBrush x:Key="FilterControl_InnerBorder" Color="White" />
  <telerik:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
  <dataFilter:LogicalOperatorToCheckedConverter x:Key="LogicalOperatorToCheckedConverter" />
  <telerikData:FilterCompositionLogicalOperatorConverter x:Key="LogicalOperatorConverter" />
  <telerik:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter" />
  <LinearGradientBrush x:Key="SeparatorBorder" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF649CAD" />
    <GradientStop Color="#33649CAD" Offset="1" />
  </LinearGradientBrush>
  <dataFilter:FilterOperatorToSelectedItemConverter x:Key="FilterOperatorToSelectedItemConverter" />
  <dataFilter:FilterMemberToEnabledConverter x:Key="FilterMemberToEnabledConverter" />
  <LinearGradientBrush x:Key="FilterControl_Background" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFFEFEFE" Offset="0" />
    <GradientStop Color="#FFE9E9E9" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="FilterControl_Border" Color="#FFB2B2B2" />
  <SolidColorBrush x:Key="FilterControl_Foreground" Color="Black" />
  <SolidColorBrush x:Key="ValidationSummary_BorderBrush" Color="White" />
  <SolidColorBrush x:Key="ValidationSummary_Background" Color="#FFF0F0F0" />
  <SolidColorBrush x:Key="ControlOuterBorder" Color="#FFB2B2B2" />
  <SolidColorBrush x:Key="ValidationSummary_Foreground" Color="#FFFF0000" />
  <dataForm:DescriptionVisibilityConverter x:Key="DescriptionVisibilityConverter" />
  <SolidColorBrush x:Key="DataForm_HeaderOuterBorder" Color="#FFB2B2B2" />
  <LinearGradientBrush x:Key="DataForm_HeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF0E7094" />
    <GradientStop Color="#FF1990B1" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="DataForm_HeaderInnerBorder" Color="White" />
  <SolidColorBrush x:Key="DataForm_HeaderForeground" Color="White" />
  <SolidColorBrush x:Key="DataFormPanel_Border" Color="#FFB2B2B2" />
  <LinearGradientBrush x:Key="DataForm_FooterPanel_Background" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="White" />
    <GradientStop Color="#FFE4E6E8" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="Background_Disabled" Color="#330E7194" />
  <SolidColorBrush x:Key="NagigatorIconColor" Color="#FF282828" />
  <SolidColorBrush x:Key="DataField_Foreground" Color="Black" />
  <SolidColorBrush x:Key="ControlBackground" Color="White" />
  <SolidColorBrush x:Key="DataField_Background" Color="Transparent" />
  <SolidColorBrush x:Key="DataField_BorderBrush" Color="Transparent" />
  <SolidColorBrush x:Key="DataForm_CollectionNavigator_Border" Color="#FFB0B0B0" />
  <LinearGradientBrush x:Key="DataForm_CollectionNavigatorBackground" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFE9E9E9" Offset="0.936" />
    <GradientStop Color="#FFFEFEFE" />
    <GradientStop Color="White" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="GridView_ToggleButtonStroke" Color="#FF353535" />
  <SolidColorBrush x:Key="GridView_ToggleButtonForeground" Color="#FFA3A3A3" />
  <SolidColorBrush x:Key="GridView_ToggleButtonBorder" Color="#FFB2B2B2" />
  <LinearGradientBrush x:Key="GridView_ToggleButtonBackground" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFE3E8EB" Offset="1" />
    <GradientStop Color="White" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ItemOuterBorder_Selected" Color="#FF6F9DB5" />
  <LinearGradientBrush x:Key="ItemInnerBorder_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFBBDBE6" Offset="0.12" />
    <GradientStop Color="#FFB4D2DC" Offset="0" />
    <GradientStop Color="#FF7FBFD4" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ItemBackground_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFBBDBE6" Offset="0.12" />
    <GradientStop Color="#FFB4D2DC" Offset="0" />
    <GradientStop Color="#FF7FBFD4" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ItemOuterBorder_Over" Color="#FFC2DAE3" />
  <LinearGradientBrush x:Key="ItemInnerBorder_Over" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFE7F3F8" Offset="0" />
    <GradientStop Color="#FFD4E7EE" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ItemBackground_Over" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFE7F3F8" Offset="0" />
    <GradientStop Color="#FFD4E7EE" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlInnerBorder" Color="White" />
  <LinearGradientBrush x:Key="PropertyGrid_IndentCellBackground" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFE1E1E1" Offset="1" />
    <GradientStop Color="#FFDFDFDF" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="PropertyGrid_TemplatesBorderBrush" Color="#FFB0B0B0" />
  <propertyGrid:FlatItemSourceConverter x:Key="FlatItemSourceConverter" />
  <propertyGrid:InvertedVisibilityConverter x:Key="InvertedVisibilityConverter" />
  <LinearGradientBrush x:Key="ToggleButton_Indicator" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF929394" Offset="0.46" />
    <GradientStop Color="#FF353535" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="PropertyGrid_HeaderBackground" Color="#FFF0F0F0" />
  <SolidColorBrush x:Key="RadioButton_Indicator" Color="#FF282828" />
  <telerik:InvertedBooleanConverter x:Key="InvertedBooleanConverter" />
  <SolidColorBrush x:Key="PropertyGrid_SearchIndicator_Background" Color="#FF282828" />
  <SolidColorBrush x:Key="PropertyGrid_DescriptionBorderBrush" Color="White" />
  <SolidColorBrush x:Key="PropertyGrid_DescriptionBackground" Color="#FFF0F0F0" />
  <SolidColorBrush x:Key="ControlForeground" Color="#FF000000" />
  <SolidColorBrush x:Key="PropertyGridField_Background" Color="White" />
  <!--RadDataPager-->
  <!--PageStyle-->
  <ControlTemplate x:Key="RadPageTemplate" TargetType="telerik:RadRadioButton">
    <Border x:Name="PageButton" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0,0,6,1">
      <Border Background="{StaticResource RadPager_Page_TopShadow}">
        <ContentControl HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" IsTabStop="False" />
      </Border>
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="Background" TargetName="PageButton" Value="{StaticResource RadPager_Page_Over}" />
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Background" TargetName="PageButton" Value="{StaticResource RadPager_Page_Disabled}" />
      </Trigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter Property="Background" TargetName="PageButton" Value="{StaticResource RadPager_Page_Checked}" />
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Background" TargetName="PageButton" Value="{StaticResource RadPager_Page_Checked}" />
      </Trigger>
      <Trigger Property="IsFocused" Value="True">
        <Setter Property="Background" TargetName="PageButton" Value="{StaticResource RadPager_Page_Over}" />
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RadPageStyle" TargetType="telerik:RadRadioButton">
    <Setter Property="Template" Value="{StaticResource RadPageTemplate}" />
    <Setter Property="Background" Value="{StaticResource RadPager_Page_Background}" />
    <Setter Property="BorderBrush" Value="{StaticResource RadPager_Page_Border}" />
    <Setter Property="BorderThickness" Value="0,0,1,1" />
    <Setter Property="MinWidth" Value="21" />
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Padding" Value="0" />
  </Style>
  <!--Pages-->
  <ControlTemplate x:Key="NumericElementsPresenterTemplate" TargetType="dataPager:NumericElementsPresenter">
    <ItemsControl ItemsSource="{Binding Pages}">
      <ItemsControl.ItemsPanel>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel Orientation="Horizontal" />
        </ItemsPanelTemplate>
      </ItemsControl.ItemsPanel>
      <ItemsControl.ItemTemplate>
        <DataTemplate>
          <telerik:RadRadioButton IsChecked="{Binding IsCurrent, Mode=OneWay}" GroupName="{Binding GroupName}" Command="controls:RadDataPagerCommands.MoveToPage" CommandParameter="{Binding PageIndex}" Content="{Binding Content}" Style="{Binding NumericButtonStyle}" />
        </DataTemplate>
      </ItemsControl.ItemTemplate>
    </ItemsControl>
  </ControlTemplate>
  <Style x:Key="NumericElementsPresenterStyle" TargetType="dataPager:NumericElementsPresenter">
    <Setter Property="Template" Value="{StaticResource NumericElementsPresenterTemplate}" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>
  <Style TargetType="dataPager:NumericElementsPresenter" BasedOn="{StaticResource NumericElementsPresenterStyle}" />
  <!--Pager Template-->
  <ControlTemplate x:Key="DataPagerPresenterTemplate" TargetType="dataPager:DataPagerPresenter">
    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
      <Grid VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="*" />
          <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <StackPanel Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
          <!--FirstPage Button-->
          <telerik:RadButton Name="MoveToFirstPageButton" Visibility="{Binding PagerControlsVisibility.MoveToFirstPageControlVisibility,RelativeSource={RelativeSource TemplatedParent}}" Command="controls:RadDataPagerCommands.MoveToFirstPage" Width="18" Height="18" Margin="2">
            <StackPanel Orientation="Horizontal">
              <Rectangle Fill="{StaticResource RadPager_Indicator}" VerticalAlignment="Center" HorizontalAlignment="Center" Width="1" Height="7" />
              <Path Fill="{StaticResource RadPager_Indicator}" VerticalAlignment="Center" HorizontalAlignment="Center" Data="M0,0 L3.5,3.5 0,7 Z" Width="4" Height="7" RenderTransformOrigin="0.5, 0.5">
                <Path.RenderTransform>
                  <TransformGroup>
                    <ScaleTransform ScaleX="-1" ScaleY="1" />
                    <SkewTransform AngleX="0" AngleY="0" />
                    <RotateTransform Angle="0" />
                    <TranslateTransform />
                  </TransformGroup>
                </Path.RenderTransform>
              </Path>
            </StackPanel>
          </telerik:RadButton>
          <!--PreviousPage Button-->
          <telerik:RadButton Name="MoveToPreviousPageButton" Visibility="{Binding PagerControlsVisibility.MoveToPreviousPageControlVisibility,RelativeSource={RelativeSource TemplatedParent}}" Command="controls:RadDataPagerCommands.MoveToPreviousPage" Width="18" Height="18" Margin="2">
            <Path Fill="{StaticResource RadPager_Indicator}" VerticalAlignment="Center" HorizontalAlignment="Center" Data="M0,0 L3.5,3.5 0,7 Z" Width="4" Height="7" RenderTransformOrigin="0.5, 0.5">
              <Path.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="-1" ScaleY="1" />
                  <SkewTransform AngleX="0" AngleY="0" />
                  <RotateTransform Angle="0" />
                  <TranslateTransform />
                </TransformGroup>
              </Path.RenderTransform>
            </Path>
          </telerik:RadButton>
          <!--NumericPresenter-->
          <Border BorderThickness="1,0,0,0" Background="{StaticResource RadPager_NumericPresenter_Background}" BorderBrush="{StaticResource RadPager_NumericPresenter_Border}" Height="20" VerticalAlignment="Center" Visibility="{Binding PagerControlsVisibility.NumericElementsControlVisibility,RelativeSource={RelativeSource TemplatedParent}}">
            <dataPager:NumericElementsPresenter NumericButtonStyle="{TemplateBinding NumericButtonStyle}" AutoEllipsisMode="{TemplateBinding AutoEllipsisMode}" PageIndex="{TemplateBinding PageIndex}" PageCount="{TemplateBinding PageCount}" NumericButtonCount="{TemplateBinding NumericButtonCount}" />
          </Border>
          <!--NextPage Button-->
          <telerik:RadButton Name="MoveToNextPageButton" Visibility="{Binding PagerControlsVisibility.MoveToNextPageControlVisibility,RelativeSource={RelativeSource TemplatedParent}}" Command="controls:RadDataPagerCommands.MoveToNextPage" Width="18" Height="18" Margin="2">
            <Path Fill="{StaticResource RadPager_Indicator}" VerticalAlignment="Center" HorizontalAlignment="Center" Data="M0,0 L3.5,3.5 0,7 Z" Width="4" Height="7" />
          </telerik:RadButton>
          <!--LastPage Button-->
          <telerik:RadButton Name="MoveToLastPageButton" Visibility="{Binding PagerControlsVisibility.MoveToLastPageControlVisibility,RelativeSource={RelativeSource TemplatedParent}}" Command="controls:RadDataPagerCommands.MoveToLastPage" Width="18" Height="18" Margin="2">
            <StackPanel Orientation="Horizontal">
              <Path Fill="{StaticResource RadPager_Indicator}" VerticalAlignment="Center" HorizontalAlignment="Center" Data="M0,0 L3.5,3.5 0,7 Z" Width="4" Height="7" />
              <Rectangle Fill="{StaticResource RadPager_Indicator}" VerticalAlignment="Center" HorizontalAlignment="Center" Width="1" Height="7" />
            </StackPanel>
          </telerik:RadButton>
        </StackPanel>
        <!--TextPager-->
        <StackPanel Orientation="Horizontal" Grid.Column="1" Visibility="{Binding PagerControlsVisibility.TextControlVisibility,RelativeSource={RelativeSource TemplatedParent}}" Margin="5,0">
          <Border HorizontalAlignment="Left" Margin="5,0,0,0" Width="1" Background="{StaticResource RadPager_Separator1}" VerticalAlignment="Center" Height="18" />
          <Border HorizontalAlignment="Left" Margin="0,0,10,0" Width="1" Background="{StaticResource RadPager_Separator2}" VerticalAlignment="Center" Height="18" />
          <TextBlock telerik:LocalizationManager.ResourceKey="RadDataPagerPage" VerticalAlignment="Center" Margin="2,0" />
          <dataPager:DataPagerTextBox Command="controls:RadDataPagerCommands.MoveToPage" Width="48" Height="20" Margin="2,0" VerticalContentAlignment="Center" VerticalAlignment="Center" PageIndex="{TemplateBinding PageIndex}" />
          <TextBlock telerik:LocalizationManager.ResourceKey="RadDataPagerOf" VerticalAlignment="Center" Margin="2,0" />
          <TextBlock Text="{Binding PageCount, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Center" Margin="2,0" />
        </StackPanel>
      </Grid>
    </Border>
  </ControlTemplate>
  <Style x:Key="DataPagerPresenterStyle" TargetType="dataPager:DataPagerPresenter">
    <Setter Property="Template" Value="{StaticResource DataPagerPresenterTemplate}" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>
  <Style TargetType="dataPager:DataPagerPresenter" BasedOn="{StaticResource DataPagerPresenterStyle}" />
  <!--Pager-->
  <ControlTemplate x:Key="RadDataPagerTemplate" TargetType="controls:RadDataPager">
    <dataPager:DataPagerPresenter NumericButtonStyle="{TemplateBinding NumericButtonStyle}" AutoEllipsisMode="{TemplateBinding AutoEllipsisMode}" DisplayMode="{TemplateBinding DisplayMode}" PageIndex="{TemplateBinding PageIndex}" PageCount="{TemplateBinding PageCount}" NumericButtonCount="{TemplateBinding NumericButtonCount}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" PageSize="{Binding PageSize, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" ItemCount="{Binding ItemCount, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" />
  </ControlTemplate>
  <Style x:Key="RadDataPagerStyle" TargetType="controls:RadDataPager">
    <Setter Property="Template" Value="{StaticResource RadDataPagerTemplate}" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Background" Value="{StaticResource RadPager_Background}" />
    <Setter Property="BorderBrush" Value="{StaticResource RadPager_Border}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Foreground" Value="{StaticResource RadPager_Foreground}" />
    <Setter Property="NumericButtonStyle" Value="{StaticResource RadPageStyle}" />
    <Setter Property="Height" Value="28" />
    <Setter Property="FontSize" Value="9" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>
  <Style TargetType="controls:RadDataPager" BasedOn="{StaticResource RadDataPagerStyle}" />
  <!--RadDataFilter-->
  <DataTemplate x:Key="FilterOperatorTemplate">
    <TextBlock Text="{Binding Converter={StaticResource FilterOperatorConverter}}" />
  </DataTemplate>
  <!--Animations-->
  <Storyboard x:Key="FilterButton_MouseEnter">
    <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetName="ButtonBorder_Over" Storyboard.TargetProperty="Opacity" />
  </Storyboard>
  <Storyboard x:Key="FilterButton_MouseLeave" FillBehavior="Stop">
    <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetName="ButtonBorder_Over" Storyboard.TargetProperty="Opacity" />
  </Storyboard>
  <Storyboard x:Key="FilterButton_MouseDown">
    <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetName="ButtonBorder_Pressed" Storyboard.TargetProperty="Opacity" />
  </Storyboard>
  <Storyboard x:Key="FilterButton_MouseUp" FillBehavior="Stop">
    <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetName="ButtonBorder_Pressed" Storyboard.TargetProperty="Opacity" />
  </Storyboard>
  <Storyboard x:Key="FilterButton_Check">
    <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetName="ButtonBorder_Checked" Storyboard.TargetProperty="Opacity" />
  </Storyboard>
  <Storyboard x:Key="FilterButton_Uncheck" FillBehavior="Stop">
    <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetName="ButtonBorder_Checked" Storyboard.TargetProperty="Opacity" />
  </Storyboard>
  <!--Styles-->
  <!--RemoveFilterButton-->
  <ControlTemplate x:Key="RemoveFilterButtonTemplate" TargetType="telerik:RadButton">
    <Grid>
      <Border x:Name="ButtonBorder" CornerRadius="8" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" />
      <Border x:Name="ButtonBorder_Over" CornerRadius="8" Opacity="0" BorderBrush="{TemplateBinding BorderBrush}" Background="{StaticResource RemoveFilterButton_Background_Over}" BorderThickness="{TemplateBinding BorderThickness}" />
      <Border x:Name="ButtonBorder_Pressed" CornerRadius="8" Opacity="0" BorderBrush="{TemplateBinding BorderBrush}" Background="{StaticResource RemoveFilterButton_Background_Pressed}" BorderThickness="{TemplateBinding BorderThickness}" />
      <Path Stretch="Fill" Height="8" Width="8" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RenderTransformOrigin="0.5,0.5" Data="M4.0551758,5.1411133 L4.9467773,5.1411133 L4.9467773,8.0683594 L7.8740234,8.0683594 L7.8740234,8.9277344 L4.9467773,8.9277344 L4.9467773,11.85498 L4.0551758,11.85498 L4.0551758,8.9277344 L1.1279297,8.9277344 L1.1279297,8.0683594 L4.0551758,8.0683594 z" Stroke="{TemplateBinding Foreground}">
        <Path.RenderTransform>
          <TransformGroup>
            <ScaleTransform />
            <SkewTransform />
            <RotateTransform Angle="-45" />
            <TranslateTransform />
          </TransformGroup>
        </Path.RenderTransform>
      </Path>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseEnter}" />
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseLeave}" />
        </Trigger.ExitActions>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseDown}" />
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseUp}" />
        </Trigger.ExitActions>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="RemoveFilterButtonStyle" TargetType="telerik:RadButton">
    <Setter Property="Template" Value="{StaticResource RemoveFilterButtonTemplate}" />
    <Setter Property="Background" Value="{StaticResource RemoveFilterButton_Background}" />
    <Setter Property="BorderBrush" Value="{StaticResource RemoveFilterButton_Border}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Width" Value="16" />
    <Setter Property="Height" Value="16" />
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Foreground" Value="{StaticResource RemoveFilterButton_Foreground}" />
    <Setter Property="Margin" Value="1,0,4,0" />
  </Style>
  <!--AddFilterButton-->
  <ControlTemplate x:Key="AddFilterButtonTemplate" TargetType="telerik:RadButton">
    <Grid>
      <Border x:Name="ButtonBorder" CornerRadius="8" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" />
      <Border x:Name="ButtonBorder_Over" CornerRadius="8" Opacity="0" BorderBrush="{TemplateBinding BorderBrush}" Background="{StaticResource AddFilterButton_Background_Over}" BorderThickness="{TemplateBinding BorderThickness}" />
      <Border x:Name="ButtonBorder_Pressed" CornerRadius="8" Opacity="0" BorderBrush="{TemplateBinding BorderBrush}" Background="{StaticResource AddFilterButton_Background_Pressed}" BorderThickness="{TemplateBinding BorderThickness}" />
      <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseEnter}" />
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseLeave}" />
        </Trigger.ExitActions>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseDown}" />
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseUp}" />
        </Trigger.ExitActions>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="AddFilterButtonStyle" TargetType="telerik:RadButton">
    <Setter Property="Template" Value="{StaticResource AddFilterButtonTemplate}" />
    <Setter Property="Background" Value="{StaticResource AddFilterButton_Background}" />
    <Setter Property="BorderBrush" Value="{StaticResource AddFilterButton_Border}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Width" Value="16" />
    <Setter Property="Height" Value="16" />
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Foreground" Value="{StaticResource AddFilterButton_Foreground}" />
    <Setter Property="Margin" Value="4,0,1,0" />
  </Style>
  <!--ToggleButton-->
  <ControlTemplate x:Key="RadDataFilter_ToggleButtonTemplate" TargetType="ToggleButton">
    <Grid>
      <Border x:Name="ButtonBorder" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" />
      <Border x:Name="ButtonBorder_Over" Opacity="0" BorderBrush="{TemplateBinding BorderBrush}" Background="{StaticResource ToggleButton_Background_Over}" BorderThickness="{TemplateBinding BorderThickness}" />
      <Border x:Name="ButtonBorder_Pressed" Opacity="0" BorderBrush="{TemplateBinding BorderBrush}" Background="{StaticResource ToggleButton_Background_Pressed}" BorderThickness="{TemplateBinding BorderThickness}" />
      <ContentPresenter x:Name="Content" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseEnter}" />
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseLeave}" />
        </Trigger.ExitActions>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseDown}" />
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseUp}" />
        </Trigger.ExitActions>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="ToggleButtonStyle" TargetType="telerik:RadToggleButton">
    <!--<Setter Property="Template" Value="{StaticResource RadDataFilter_ToggleButtonTemplate}" />-->
    <!--<Setter Property="Background" Value="{StaticResource ToggleButton_Background}" />-->
    <Setter Property="BorderBrush" Value="{x:Null}" />
    <Setter Property="BorderThickness" Value="0" />
    <Setter Property="VerticalAlignment" Value="Stretch" />
    <Setter Property="HorizontalAlignment" Value="Stretch" />
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <!--<Setter Property="Foreground" Value="{StaticResource ToggleButton_Foreground}" />-->
    <Setter Property="FontSize" Value="10" />
    <Setter Property="Padding" Value="2,0" />
    <Setter Property="Height" Value="18" />
    <Setter Property="MinWidth" Value="30" />
  </Style>
  <!--DropDownToggle-->
  <ControlTemplate x:Key="DropDownToggleTemplate" TargetType="{x:Type ToggleButton}">
    <Grid>
      <Border x:Name="ButtonBorder" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" />
      <Border x:Name="ButtonBorder_Over" Opacity="0" BorderBrush="{TemplateBinding BorderBrush}" Background="{StaticResource ToggleButton_Background_Over}" BorderThickness="{TemplateBinding BorderThickness}" />
      <Border x:Name="ButtonBorder_Checked" Opacity="0" BorderBrush="{StaticResource ToggleButton_Border_Checked}" Background="{StaticResource ToggleButton_Background_Checked}" BorderThickness="{TemplateBinding BorderThickness}" />
      <Path x:Name="BtnArrow" Data="F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z " HorizontalAlignment="Right" Height="4" Margin="0,0,6,0" Stretch="Uniform" Width="8" Fill="{TemplateBinding Foreground}" />
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsChecked" Value="true">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_Check}" />
          <!--<BeginStoryboard>
						<Storyboard>
							<ColorAnimation Duration="0:0:0.2"  To="#FF5D5D5D" Storyboard.TargetProperty="(Path.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="BtnArrow" />
						</Storyboard>
					</BeginStoryboard>-->
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_Uncheck}" />
          <!--<BeginStoryboard>
						<Storyboard FillBehavior="Stop">
							<ColorAnimation Duration="0:0:0.2" To="White" Storyboard.TargetProperty="(Path.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="BtnArrow" />
						</Storyboard>
					</BeginStoryboard>-->
        </Trigger.ExitActions>
      </Trigger>
      <Trigger Property="IsMouseOver" Value="true">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseEnter}" />
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseLeave}" />
        </Trigger.ExitActions>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="DropDownToggleStyle" TargetType="{x:Type ToggleButton}">
    <Setter Property="OverridesDefaultStyle" Value="true" />
    <Setter Property="IsTabStop" Value="false" />
    <Setter Property="Focusable" Value="false" />
    <Setter Property="ClickMode" Value="Press" />
    <Setter Property="Template" Value="{StaticResource DropDownToggleTemplate}" />
    <Setter Property="Background" Value="{StaticResource ToggleButton_Background}" />
    <Setter Property="BorderBrush" Value="{x:Null}" />
    <Setter Property="BorderThickness" Value="1,0" />
    <Setter Property="VerticalAlignment" Value="Stretch" />
    <Setter Property="HorizontalAlignment" Value="Stretch" />
    <Setter Property="Foreground" Value="{StaticResource ToggleButton_Foreground}" />
    <Setter Property="MinWidth" Value="30" />
    <Setter Property="HorizontalContentAlignment" Value="Left" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="FontSize" Value="10" />
  </Style>
  <!--FilterComboBox-->
  <ControlTemplate x:Key="FilterComboBoxItemTemplate" TargetType="{x:Type ComboBoxItem}">
    <Grid Background="{TemplateBinding Background}">
      <Border x:Name="ButtonBorder_Over" Opacity="0" BorderBrush="{StaticResource ComboBoxItem_Border_Selected}" Background="{StaticResource ComboBoxItem_Background_Over}" BorderThickness="1" CornerRadius="2" Margin="1" />
      <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsHighlighted" Value="True">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseEnter}" />
          <!--<BeginStoryboard>
						<Storyboard>
							<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)">
								<SplineColorKeyFrame KeyTime="0:0:0.2" Value="White"/>
							</ColorAnimationUsingKeyFrames>
						</Storyboard>
					</BeginStoryboard>-->
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseLeave}" />
          <!--<BeginStoryboard>
						<Storyboard FillBehavior="Stop">
							<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)">
								<SplineColorKeyFrame KeyTime="0:0:0.2" Value="#FF5D5D5D"/>
							</ColorAnimationUsingKeyFrames>
						</Storyboard>
					</BeginStoryboard>-->
        </Trigger.ExitActions>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="FilterComboBoxItemStyle" TargetType="telerik:RadComboBoxItem">
    <!--<Setter Property="Template" Value="{StaticResource FilterComboBoxItemTemplate}" />-->
    <Setter Property="Padding" Value="2" />
    <Setter Property="HorizontalContentAlignment" Value="Left" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="FontSize" Value="10" />
    <!--<Setter Property="Foreground" Value="{StaticResource ComboBoxItem_Foreground}" />-->
    <!--<Setter Property="Height" Value="18" />-->
  </Style>
  <ControlTemplate x:Key="FilterComboBoxTemplate" TargetType="{x:Type ComboBox}">
    <Grid x:Name="MainGrid">
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
        <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0" />
      </Grid.ColumnDefinitions>
      <Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" MinWidth="{TemplateBinding MinWidth}" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom">
        <Border x:Name="DropDownBorder" BorderBrush="{StaticResource Popup_Border}" BorderThickness="1,0,1,1" Background="{StaticResource Popup_Background}" HorizontalAlignment="Stretch" Height="Auto">
          <ScrollViewer CanContentScroll="true" BorderThickness="0" Padding="1">
            <ItemsPresenter KeyboardNavigation.DirectionalNavigation="Contained" />
          </ScrollViewer>
        </Border>
      </Popup>
      <ToggleButton BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource DropDownToggleStyle}" />
      <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" Content="{TemplateBinding SelectionBoxItem}" ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="false" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
    </Grid>
    <ControlTemplate.Triggers>
      <!--<Trigger Property="IsDropDownOpen" Value="True">
				<Trigger.EnterActions>
					<BeginStoryboard>
						<Storyboard>
							<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)">
								<SplineColorKeyFrame KeyTime="0:0:0.2" Value="#FF5D5D5D"/>
							</ColorAnimationUsingKeyFrames>
						</Storyboard>
					</BeginStoryboard>
				</Trigger.EnterActions>
				<Trigger.ExitActions>
					<BeginStoryboard>
						<Storyboard FillBehavior="Stop">
							<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)">
								<SplineColorKeyFrame KeyTime="0:0:0.2" Value="White"/>
							</ColorAnimationUsingKeyFrames>
						</Storyboard>
					</BeginStoryboard>
				</Trigger.ExitActions>
			</Trigger>-->
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="FilterComboBoxStyle" TargetType="telerik:RadComboBox">
    <Setter Property="ItemContainerStyle" Value="{StaticResource FilterComboBoxItemStyle}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
    <Setter Property="FontSize" Value="10" />
    <!--<Setter Property="Template" Value="{StaticResource FilterComboBoxTemplate}" />-->
    <!--<Setter Property="Background" Value="{StaticResource ToggleButton_Background}" />-->
    <Setter Property="BorderBrush" Value="{x:Null}" />
    <!--<Setter Property="BorderThickness" Value="1,0" />-->
    <Setter Property="VerticalAlignment" Value="Stretch" />
    <Setter Property="HorizontalAlignment" Value="Stretch" />
    <!--<Setter Property="Foreground" Value="{StaticResource ToggleButton_Foreground}" />-->
    <Setter Property="MinWidth" Value="100" />
    <Setter Property="HorizontalContentAlignment" Value="Left" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Padding" Value="3,0,2,3" />
    <!--<Setter Property="Height" Value="18" />-->
  </Style>
  <!--FilterTextBox-->
  <ControlTemplate x:Key="FilterTextBoxTemplate" TargetType="{x:Type TextBox}">
    <Grid>
      <Border x:Name="ButtonBorder" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" />
      <Border x:Name="ButtonBorder_Over" Opacity="0" BorderBrush="{TemplateBinding BorderBrush}" Background="{StaticResource ToggleButton_Background_Over}" BorderThickness="{TemplateBinding BorderThickness}" />
      <Border x:Name="ButtonBorder_Checked" Opacity="0" BorderBrush="{StaticResource ToggleButton_Border_Checked}" Background="{StaticResource ToggleButton_Background_Checked}" BorderThickness="{TemplateBinding BorderThickness}" />
      <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseEnter}" />
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseLeave}" />
        </Trigger.ExitActions>
      </Trigger>
      <Trigger Property="IsFocused" Value="True">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_Check}" />
          <!--<BeginStoryboard>
						<Storyboard>
							<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)">
								<SplineColorKeyFrame KeyTime="0:0:0.2" Value="#FF5D5D5D"/>
							</ColorAnimationUsingKeyFrames>
						</Storyboard>
					</BeginStoryboard>-->
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_Uncheck}" />
          <!--<BeginStoryboard>
						<Storyboard>
							<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)">
								<SplineColorKeyFrame KeyTime="0:0:0.2" Value="White"/>
							</ColorAnimationUsingKeyFrames>
						</Storyboard>
					</BeginStoryboard>-->
        </Trigger.ExitActions>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="FilterTextBoxStyle" BasedOn="{x:Null}" TargetType="{x:Type TextBox}">
    <Setter Property="Template" Value="{StaticResource FilterTextBoxTemplate}" />
    <Setter Property="Background" Value="{StaticResource ToggleButton_Background}" />
    <Setter Property="BorderBrush" Value="{x:Null}" />
    <Setter Property="BorderThickness" Value="1,0" />
    <Setter Property="VerticalAlignment" Value="Stretch" />
    <Setter Property="HorizontalAlignment" Value="Stretch" />
    <Setter Property="Foreground" Value="{StaticResource ToggleButton_Foreground}" />
    <Setter Property="MinWidth" Value="30" />
    <Setter Property="HorizontalContentAlignment" Value="Left" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Padding" Value="3,0" />
    <Setter Property="FontSize" Value="10" />
  </Style>
  <!--MatchCaseToggle-->
  <ControlTemplate x:Key="MatchCaseToggleTemplate" TargetType="ToggleButton">
    <Grid>
      <Border x:Name="ButtonBorder" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" />
      <Border x:Name="ButtonBorder_Over" Opacity="0" BorderBrush="{TemplateBinding BorderBrush}" Background="{StaticResource ToggleButton_Background_Over}" BorderThickness="{TemplateBinding BorderThickness}" />
      <Border x:Name="ButtonBorder_Checked" Opacity="0" BorderBrush="{StaticResource ToggleButton_Border_Checked}" Background="{StaticResource ToggleButton_Background_Checked}" BorderThickness="{TemplateBinding BorderThickness}" />
      <ContentControl Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" x:Name="ContentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseEnter}" />
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseLeave}" />
        </Trigger.ExitActions>
      </Trigger>
      <Trigger Property="IsChecked" Value="True">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_Check}" />
          <BeginStoryboard>
            <Storyboard>
              <ColorAnimation Duration="0:0:0.2" To="#FF5D5D5D" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="ContentPresenter" />
            </Storyboard>
          </BeginStoryboard>
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_Uncheck}" />
          <BeginStoryboard>
            <Storyboard FillBehavior="Stop">
              <ColorAnimation Duration="0:0:0.2" To="White" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="ContentPresenter" />
            </Storyboard>
          </BeginStoryboard>
        </Trigger.ExitActions>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="MatchCaseToggleStyle" TargetType="ToggleButton">
    <Setter Property="Template" Value="{StaticResource MatchCaseToggleTemplate}" />
    <Setter Property="Background" Value="{StaticResource ToggleButton_Background}" />
    <Setter Property="BorderBrush" Value="{x:Null}" />
    <Setter Property="BorderThickness" Value="1,0" />
    <Setter Property="VerticalAlignment" Value="Stretch" />
    <Setter Property="HorizontalAlignment" Value="Stretch" />
    <Setter Property="Foreground" Value="{StaticResource ToggleButton_Foreground}" />
    <Setter Property="HorizontalContentAlignment" Value="Left" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Padding" Value="5,0" />
    <Setter Property="FontSize" Value="10" />
  </Style>
  <!--FilterControl-->
  <ControlTemplate x:Key="FilterControlTemplate" TargetType="dataFilter:FilterControl">
    <Border x:Name="OuterBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="11">
      <Border.OpacityMask>
        <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
          <GradientStop Offset="0" Color="Black" />
          <GradientStop Offset="0.3" />
        </LinearGradientBrush>
      </Border.OpacityMask>
      <Border.Triggers>
        <EventTrigger RoutedEvent="Canvas.Loaded">
          <BeginStoryboard>
            <Storyboard>
              <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="(UIElement.OpacityMask).(GradientBrush.GradientStops)[0].(GradientStop.Offset)" Storyboard.TargetName="OuterBorder" />
              <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="(UIElement.OpacityMask).(GradientBrush.GradientStops)[1].(GradientStop.Offset)" Storyboard.TargetName="OuterBorder" />
              <ColorAnimation Duration="0" BeginTime="0:0:0.2" To="Black" Storyboard.TargetProperty="(UIElement.OpacityMask).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="OuterBorder" />
            </Storyboard>
          </BeginStoryboard>
        </EventTrigger>
      </Border.Triggers>
      <Border x:Name="InnerBorder" Background="{TemplateBinding Background}" BorderBrush="{StaticResource FilterControl_InnerBorder}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="10">
        <StackPanel Orientation="Horizontal">
          <telerik:RadButton Name="PART_RemoveFilterButton" Command="{Binding RemoveFilter}" Style="{StaticResource RemoveFilterButtonStyle}" />
          <StackPanel Orientation="Horizontal" Visibility="{Binding IsComposite, Converter={StaticResource BooleanToVisibilityConverter}}">
            <telerik:RadToggleButton Name="PART_CompositeFilterLogicalOperatorToggleButton" Height="18" FontSize="10" MinWidth="30" IsChecked="{Binding CompositeFilter.LogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToCheckedConverter}}" Content="{Binding CompositeFilter.LogicalOperator, Converter={StaticResource LogicalOperatorConverter}}" />
            <telerik:RadButton Name="PART_AddFilterButton" Command="{Binding AddFilter}" Style="{StaticResource AddFilterButtonStyle}">
              <Path Stretch="Fill" Height="8" Width="8" RenderTransformOrigin="0.5,0.5" Data="M4.0551758,5.1411133 L4.9467773,5.1411133 L4.9467773,8.0683594 L7.8740234,8.0683594 L7.8740234,8.9277344 L4.9467773,8.9277344 L4.9467773,11.85498 L4.0551758,11.85498 L4.0551758,8.9277344 L1.1279297,8.9277344 L1.1279297,8.0683594 L4.0551758,8.0683594 z" Stroke="{StaticResource AddFilterButton_Foreground}">
                <Path.RenderTransform>
                  <TransformGroup>
                    <ScaleTransform />
                    <SkewTransform />
                    <RotateTransform />
                    <TranslateTransform />
                  </TransformGroup>
                </Path.RenderTransform>
              </Path>
            </telerik:RadButton>
          </StackPanel>
          <StackPanel Orientation="Horizontal" Visibility="{Binding IsComposite, Converter={StaticResource InvertedBooleanToVisibilityConverter}}">
            <telerik:RadComboBox Name="PART_SimpleFilterMemberComboBox" Margin="0,0,3,0" MinWidth="100" VerticalAlignment="Center" ItemsSource="{Binding SimpleFilter.AvailableMembers}" SelectedItem="{Binding SimpleFilter.SelectedMember, Mode=TwoWay}" />
            <!--<Border Width="1" BorderThickness="1" Margin="1,3" BorderBrush="{StaticResource SeparatorBorder}" />-->
            <telerik:RadComboBox Name="PART_SimpleFilterOperatorComboBox" Margin="0,0,3,0" MinWidth="100" VerticalAlignment="Center" ItemsSource="{Binding SimpleFilter.AvailableOperators}" SelectedItem="{Binding SimpleFilter.Operator, Mode=TwoWay, Converter={StaticResource FilterOperatorToSelectedItemConverter}}" IsEnabled="{Binding SimpleFilter.Member, Converter={StaticResource FilterMemberToEnabledConverter}}" ItemTemplate="{StaticResource FilterOperatorTemplate}" />
            <!--<Border x:Name="Separator1" Width="1" BorderThickness="1" Margin="1,3" BorderBrush="{StaticResource SeparatorBorder}" />-->
            <!--<Border Width="1" BorderThickness="1" Margin="1,3" BorderBrush="{StaticResource SeparatorBorder}" />-->
            <!-- All editors created in code behind will be inserted as Content of this guy below -->
            <dataFilter:FilterEditor DataContext="{Binding SimpleFilter}" ItemPropertyDefinition="{Binding SelectedMember}" FilterOperator="{Binding Operator}" IsEnabled="{Binding IsFilterEditorEnabled}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" />
            <Border Width="8" BorderBrush="Transparent" Visibility="{Binding CanUserCreateCompositeFilters, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" />
            <telerik:RadButton Name="PART_ToCompositeFilterButton" Command="{Binding ToCompositeFilter}" Style="{StaticResource AddFilterButtonStyle}" Visibility="{Binding CanUserCreateCompositeFilters, Converter={StaticResource BooleanToVisibilityConverter}}">
              <Path Fill="{StaticResource AddFilterButton_Foreground}" Stretch="Fill" Margin="4.764,3.911,0.231,0.182" RenderTransformOrigin="0.178532408309272,0.500013572224711" Data="M2.0597237,0.00011700392 C2.3919959,0.0037145019 2.7279578,0.090300739 3.0362324,0.26828307 3.9928176,0.82056788 4.3205678,2.0437487 3.7682831,3.0003339 3.5047298,3.4568219 3.0883964,3.7701081 2.6211619,3.9128945 2.5376498,3.9384158 2.606295,8.1556374 2.6448601,8.1688096 2.7661251,8.2102287 2.8851618,8.2639664 3.0003339,8.3304611 3.119907,8.3994967 3.2296547,8.479015 3.3290861,8.567185 L3.3953214,8.6289421 7.0353448,6.5273734 7.032584,6.5179721 C6.9001091,6.0235683 6.9562423,5.4786268 7.2323849,5.0003339 7.5948217,4.3725749 8.2461894,4.0156323 8.921531,4.0005015 8.9436405,4.0000061 8.9657753,3.9998771 8.9879267,4.0001169 9.3201993,4.0037147 9.6561611,4.0903007 9.9644353,4.2682832 10.921021,4.8205677 11.248771,6.0437485 10.696486,7.0003339 10.144202,7.9569193 8.9210207,8.2846695 7.9644353,7.7323848 7.7908325,7.6321552 7.6379409,7.5098292 7.5072617,7.3710103 7.457924,7.3185995 3.8905699,9.3987923&#xA;3.9225863,9.510286 4.0671648,10.013763 4.0149822,10.573039 3.7323847,11.062512 3.1801,12.019097 1.9569192,12.346847 1.0003339,11.794563 0.043748736,11.242278 -0.28400159,10.019097 0.26828313,9.062512 0.56168437,8.5543262 1.0444304,8.2236139 1.5759602,8.108039 L1.6210667,8.099353 1.6210667,3.9568464 1.5962493,3.9518846 C1.4043243,3.9085528 1.2155921,3.8359381 1.0362324,3.7323848 0.079647064,3.1801001 -0.24810326,1.9569192 0.30418158,1.0003339 0.66661841,0.37257487 1.3179861,0.015632391 1.9933276,0.00050151348 2.0154371,6.1988831E-06 2.0375722,-0.00012278557 2.0597237,0.00011700392 z">
                <Path.RenderTransform>
                  <TransformGroup>
                    <ScaleTransform ScaleX="-1" ScaleY="1" />
                    <SkewTransform AngleX="0" AngleY="0" />
                    <RotateTransform Angle="120" />
                    <TranslateTransform X="1.7763568394002505E-15" />
                  </TransformGroup>
                </Path.RenderTransform>
              </Path>
            </telerik:RadButton>
          </StackPanel>
        </StackPanel>
      </Border>
    </Border>
  </ControlTemplate>
  <Style x:Key="FilterControlStyle" TargetType="dataFilter:FilterControl">
    <Setter Property="Template" Value="{StaticResource FilterControlTemplate}" />
    <Setter Property="Background" Value="{StaticResource FilterControl_Background}" />
    <Setter Property="BorderBrush" Value="{StaticResource FilterControl_Border}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Padding" Value="0" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Foreground" Value="{StaticResource FilterControl_Foreground}" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <!--<Setter Property="Height" Value="22" />-->
    <Setter Property="VerticalAlignment" Value="Top" />
    <Setter Property="HorizontalAlignment" Value="Left" />
  </Style>
  <Style TargetType="dataFilter:FilterControl" BasedOn="{StaticResource FilterControlStyle}" />
  <!--DataFilterPresenter-->
  <ControlTemplate x:Key="DataFilterPresenterTemplate" TargetType="dataFilter:DataFilterPresenter">
    <Border Padding="20, 2, 0, 2">
      <Grid x:Name="Root">
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto" />
          <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <ContentControl x:Name="HeaderContent" Grid.Row="0" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" IsTabStop="False" />
        <ItemsPresenter x:Name="Items" Grid.Row="1" />
      </Grid>
    </Border>
  </ControlTemplate>
  <HierarchicalDataTemplate x:Key="DataFilterPresenterItemTemplate" ItemsSource="{Binding CompositeFilter.Filters}">
    <dataFilter:FilterControl />
  </HierarchicalDataTemplate>
  <DataTemplate x:Key="DataFilterPresenterHeaderTemplate">
    <dataFilter:FilterControl />
  </DataTemplate>
  <Style x:Key="DataFilterPresenterStyle" TargetType="dataFilter:DataFilterPresenter">
    <Setter Property="Template" Value="{StaticResource DataFilterPresenterTemplate}" />
    <Setter Property="ItemTemplate" Value="{StaticResource DataFilterPresenterItemTemplate}" />
    <Setter Property="HeaderTemplate" Value="{StaticResource DataFilterPresenterHeaderTemplate}" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>
  <Style TargetType="dataFilter:DataFilterPresenter" BasedOn="{StaticResource DataFilterPresenterStyle}" />
  <!--RadDataFilter-->
  <ControlTemplate x:Key="RadDataFilterTemplate" TargetType="controls:RadDataFilter">
    <ScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
      <dataFilter:DataFilterPresenter DataContext="{TemplateBinding ViewModel}" Header="{Binding .}" ItemsSource="{Binding CompositeFilter.Filters}" />
    </ScrollViewer>
  </ControlTemplate>
  <Style x:Key="RadDataFilterStyle" TargetType="controls:RadDataFilter">
    <Setter Property="Template" Value="{StaticResource RadDataFilterTemplate}" />
    <Setter Property="IsTabStop" Value="False" />
  </Style>
  <Style TargetType="controls:RadDataFilter" BasedOn="{StaticResource RadDataFilterStyle}" />
  <!--RadDataForm-->
  <ControlTemplate x:Key="DataFormValidationSummaryTemplate" TargetType="dataForm:DataFormValidationSummary">
    <Border BorderThickness="0,1,0,0" BorderBrush="{StaticResource ValidationSummary_BorderBrush}" Background="{StaticResource ValidationSummary_Background}" Height="{TemplateBinding Height}">
      <ItemsControl IsTabStop="False" ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Errors}">
        <ItemsControl.Style>
          <Style TargetType="ItemsControl">
            <Setter Property="Template">
              <Setter.Value>
                <ControlTemplate>
                  <ScrollViewer IsTabStop="False" Name="ScrollViewer" BorderBrush="{StaticResource ControlOuterBorder}" BorderThickness="0,0,0,1" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto">
                    <ItemsPresenter />
                  </ScrollViewer>
                </ControlTemplate>
              </Setter.Value>
            </Setter>
            <Setter Property="ItemTemplate">
              <Setter.Value>
                <DataTemplate>
                  <StackPanel Orientation="Horizontal">
                    <TextBlock Foreground="{StaticResource ValidationSummary_Foreground}" Margin="5,5,0,5" FontWeight="Bold" Text="{Binding SourceFieldDisplayName}" />
                    <TextBlock Foreground="{StaticResource ValidationSummary_Foreground}" FontWeight="Bold" Text=":" Margin="0,5,0,0" />
                    <TextBlock Margin="5,5,0,5" Text="{Binding ErrorContent}" />
                  </StackPanel>
                </DataTemplate>
              </Setter.Value>
            </Setter>
            <Setter Property="MaxHeight" Value="75" />
          </Style>
        </ItemsControl.Style>
      </ItemsControl>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="RadDataFormTemplate" TargetType="controls:RadDataForm">
    <Border x:Name="PART_RootElement" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
      <Grid x:Name="PART_DataFormGrid" Background="{TemplateBinding Background}">
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto" />
          <RowDefinition Height="Auto" />
          <RowDefinition Height="*" />
          <RowDefinition Height="Auto" />
          <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Border x:Name="Header" Visibility="{Binding Header,RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DescriptionVisibilityConverter}}" BorderThickness="1" BorderBrush="{StaticResource DataForm_HeaderOuterBorder}" Margin="-1,-1,-1,0">
          <Border Background="{StaticResource DataForm_HeaderBackground}" BorderBrush="{StaticResource DataForm_HeaderInnerBorder}" BorderThickness="1">
            <ContentControl x:Name="PART_ContentPresenter" Margin="4,6,4,6" Foreground="{StaticResource DataForm_HeaderForeground}" FontWeight="Bold" VerticalContentAlignment="Top" HorizontalContentAlignment="Stretch" Content="{TemplateBinding Header}" VerticalAlignment="Center" />
          </Border>
        </Border>
        <dataForm:CollectionNavigator x:Name="CollectionNavigator" Grid.Row="1" />
        <Border BorderBrush="{StaticResource DataFormPanel_Border}" Grid.Row="2" BorderThickness="0,0,0,1">
          <ScrollViewer x:Name="PART_ItemsScrollViewer" IsTabStop="False" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
            <StackPanel Orientation="Vertical">
              <dataForm:AutoGeneratedFieldsPresenter x:Name="PART_AutoGeneratedFieldsPresenter" AutoGenerateFields="{Binding AutoGenerateFields,RelativeSource={RelativeSource TemplatedParent}}" CurrentItem="{Binding CurrentItem}" />
              <ContentPresenter x:Name="PART_FieldsContentPresenter" Content="{Binding CurrentItem}" />
            </StackPanel>
          </ScrollViewer>
        </Border>
        <dataForm:DataFormValidationSummary x:Name="PART_ValidationSummary" Grid.Row="3" Visibility="{TemplateBinding ValidationSummaryVisibility}" />
        <Border x:Name="FooterPanel_Background" Background="{StaticResource DataForm_FooterPanel_Background}" Grid.Row="4">
          <StackPanel x:Name="PART_FooterPanel" Orientation="Horizontal" HorizontalAlignment="Right">
            <telerik:RadButton x:Name="PART_CommitButton" Visibility="{Binding CommitButtonVisibility}" MinWidth="48" MinHeight="20" Margin="2,4,4,4" Command="controls:RadDataFormCommands.CommitEdit" Content="{TemplateBinding CommitButtonContent}" />
            <telerik:RadButton x:Name="PART_CancelButton" Visibility="{Binding CancelButtonVisibility}" MinWidth="48" MinHeight="20" Margin="2,4,4,4" Command="controls:RadDataFormCommands.CancelEdit" Content="{TemplateBinding CancelButtonContent}" />
          </StackPanel>
        </Border>
        <Border x:Name="Background_Disabled" Visibility="{Binding IsEnabled, Converter={StaticResource InvertedBooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}" Grid.RowSpan="5" Background="{StaticResource Background_Disabled}" IsHitTestVisible="False" />
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="AutoGeneratedFieldsPresenterTemplate" TargetType="dataForm:AutoGeneratedFieldsPresenter">
    <ItemsControl IsTabStop="False" ItemsSource="{TemplateBinding Fields}">
      <ItemsControl.ItemsPanel>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel Orientation="Vertical" />
        </ItemsPanelTemplate>
      </ItemsControl.ItemsPanel>
    </ItemsControl>
  </ControlTemplate>
  <ControlTemplate x:Key="DataFormDataFieldTemplate" TargetType="controls:DataFormDataField">
    <Border x:Name="PART_RootElement" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
      <Grid x:Name="PART_DataFormDataFieldGrid" Margin="{TemplateBinding Padding}">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="*" />
          <ColumnDefinition Width="2*" />
          <ColumnDefinition Width="24" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
          <RowDefinition />
          <RowDefinition />
        </Grid.RowDefinitions>
        <ContentControl x:Name="PART_Label" Content="{TemplateBinding Label}" Foreground="{TemplateBinding Foreground}" Margin="5,0" ContentTemplate="{TemplateBinding LabelTemplate}" />
        <ContentPresenter Grid.Row="1" x:Name="PART_ContentPresenter" Grid.Column="1" Content="{TemplateBinding Content}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="5,0" />
        <Grid Grid.Row="1" x:Name="DescriptionIcon" Visibility="{Binding Description, Converter={StaticResource DescriptionVisibilityConverter},RelativeSource={RelativeSource TemplatedParent}}" Grid.Column="2" Width="16" Height="16" Margin="4,0">
          <ToolTipService.ToolTip>
            <ToolTip Content="{TemplateBinding Description}" />
          </ToolTipService.ToolTip>
          <Ellipse>
            <Ellipse.Fill>
              <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FF68A2DB" Offset="0" />
                <GradientStop Color="#FF2C6CC0" Offset="1" />
              </LinearGradientBrush>
            </Ellipse.Fill>
          </Ellipse>
          <Ellipse Margin="1">
            <Ellipse.Stroke>
              <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFA2C2E6" Offset="0" />
                <GradientStop Color="#FF558DD3" Offset="1" />
              </LinearGradientBrush>
            </Ellipse.Stroke>
          </Ellipse>
          <Path Data="M3.3820179,7.7910166 C3.9343026,7.7910166 4.3820181,8.2387314 4.3820181,8.7910166 C4.3820181,9.3433018 3.9343026,9.7910166 3.3820179,9.7910166 C2.8297331,9.7910166 2.3820179,9.3433018 2.3820179,8.7910166 C2.3820179,8.2387314 2.8297331,7.7910166 3.3820179,7.7910166 z M3.4866922,0 C4.5602031,0 5.4141321,0.28477871 6.0484791,0.8543362 C6.682826,1.423894 6.9999995,2.0868769 7.0000005,2.8432846 C6.9999995,3.2620106 6.8835549,3.6582246 6.6506658,4.0319262 C6.4177752,4.4056277 5.9253707,4.9212208 5.1568441,5.55825 C4.366394,6.2134514 4.350769,6.7758508 4.350769,6.7758508 C4.350769,6.7758508 2.382019,6.776 2.382019,6.776 C2.382019,6.776 2.460144,5.5571427 3.9524715,4.4033766 C4.511868,3.97089 4.8241448,3.6582246 4.9306087,3.5186491 C5.0947404,3.2980301 5.1768064,3.0548987 5.1768064,2.7892554 C5.1768064,2.4200568 5.0315275,2.103761 4.7409697,1.8403683 C4.4504123,1.5769768 4.0589356,1.4452807 3.56654,1.4452801 C3.0918882,1.4452807 2.6948667,1.5826048 2.3754754,1.8572525 C2.0560837,2.1319013 1.836502,2.5506272 1.7167301,3.1134305 L0,2.8973138 C0.048795935,2.0913794 0.38704056,1.40701 1.0147338,0.84420568 C1.6424271,0.28140187 2.4664133,0 3.4866922,0 z" Margin="4.618,3.209,4.382,3" RenderTransformOrigin="0.499999968851403,0.346031483547006" Stretch="Fill">
            <Path.Fill>
              <SolidColorBrush Color="White">
                <SolidColorBrush.RelativeTransform>
                  <MatrixTransform Matrix="Identity" />
                </SolidColorBrush.RelativeTransform>
                <SolidColorBrush.Transform>
                  <MatrixTransform Matrix="Identity" />
                </SolidColorBrush.Transform>
              </SolidColorBrush>
            </Path.Fill>
            <Path.RenderTransform>
              <TransformGroup>
                <ScaleTransform />
                <SkewTransform />
                <RotateTransform />
                <TranslateTransform />
              </TransformGroup>
            </Path.RenderTransform>
          </Path>
        </Grid>
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="CollectionNavigatorTemplate" TargetType="dataForm:CollectionNavigator">
    <Border x:Name="PART_RootElement" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
      <Grid x:Name="PART_CollectionNavigatorGrid">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto" />
          <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Grid.Column="0">
          <telerik:RadButton x:Name="MoveCurrentToFirst" Visibility="{Binding NavigationButtonsVisibility}" Command="controls:RadDataFormCommands.MoveCurrentToFirst" Height="18" Margin="4,4,2,4" Width="18">
            <ToolTipService.ToolTip>
              <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_MoveCurrentToFirst" />
            </ToolTipService.ToolTip>
            <StackPanel Orientation="Horizontal">
              <Rectangle Fill="{StaticResource NagigatorIconColor}" HorizontalAlignment="Center" Height="7" VerticalAlignment="Center" Width="1" SnapsToDevicePixels="True" />
              <Path Data="M0,0 L3.5,3.5 0,7 Z" Fill="{StaticResource NagigatorIconColor}" HorizontalAlignment="Center" Height="7" RenderTransformOrigin="0.5, 0.5" VerticalAlignment="Center" Width="4" SnapsToDevicePixels="True">
                <Path.RenderTransform>
                  <TransformGroup>
                    <ScaleTransform ScaleY="1" ScaleX="-1" />
                    <SkewTransform AngleY="0" AngleX="0" />
                    <RotateTransform Angle="0" />
                    <TranslateTransform />
                  </TransformGroup>
                </Path.RenderTransform>
              </Path>
            </StackPanel>
          </telerik:RadButton>
          <telerik:RadButton x:Name="MoveCurrentToPrevious" Visibility="{Binding NavigationButtonsVisibility}" Command="controls:RadDataFormCommands.MoveCurrentToPrevious" Height="18" Margin="2,4,2,4" Width="18">
            <ToolTipService.ToolTip>
              <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_MoveCurrentToPrevious" />
            </ToolTipService.ToolTip>
            <Path Data="M0,0 L3.5,3.5 0,7 Z" Fill="{StaticResource NagigatorIconColor}" HorizontalAlignment="Center" Height="7" RenderTransformOrigin="0.5, 0.5" VerticalAlignment="Center" Width="4" SnapsToDevicePixels="True">
              <Path.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleY="1" ScaleX="-1" />
                  <SkewTransform AngleY="0" AngleX="0" />
                  <RotateTransform Angle="0" />
                  <TranslateTransform />
                </TransformGroup>
              </Path.RenderTransform>
            </Path>
          </telerik:RadButton>
          <telerik:RadButton x:Name="MoveCurrentToNext" Visibility="{Binding NavigationButtonsVisibility}" Command="controls:RadDataFormCommands.MoveCurrentToNext" Height="18" Margin="2,4,2,4" Width="18">
            <ToolTipService.ToolTip>
              <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_MoveCurrentToNext" />
            </ToolTipService.ToolTip>
            <Path Data="M0,0 L3.5,3.5 0,7 Z" Fill="{StaticResource NagigatorIconColor}" HorizontalAlignment="Center" Height="7" VerticalAlignment="Center" Width="4" SnapsToDevicePixels="True" />
          </telerik:RadButton>
          <telerik:RadButton x:Name="MoveCurrentToLast" Visibility="{Binding NavigationButtonsVisibility}" Command="controls:RadDataFormCommands.MoveCurrentToLast" Height="18" Margin="2,4,2,4" Width="18">
            <ToolTipService.ToolTip>
              <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_MoveCurrentToLast" />
            </ToolTipService.ToolTip>
            <StackPanel Orientation="Horizontal">
              <Path Data="M0,0 L3.5,3.5 0,7 Z" Fill="{StaticResource NagigatorIconColor}" HorizontalAlignment="Center" Height="7" VerticalAlignment="Center" Width="4" SnapsToDevicePixels="True" />
              <Rectangle Fill="{StaticResource NagigatorIconColor}" HorizontalAlignment="Center" Height="7" VerticalAlignment="Center" Width="1" SnapsToDevicePixels="True" />
            </StackPanel>
          </telerik:RadButton>
        </StackPanel>
        <StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right">
          <telerik:RadButton x:Name="AddNew" Visibility="{Binding AddNewButtonVisibility}" Command="controls:RadDataFormCommands.AddNew" Height="18" Margin="2,4,2,4" Width="18">
            <ToolTipService.ToolTip>
              <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_AddNew" />
            </ToolTipService.ToolTip>
            <Path Data="F1M8.334,13.301L4.889,13.301L4.889,2.699L12.599,2.699L12.599,9.037L12.559,9.077L8.346,9.078L8.346,13.29z M13.74,9.442L13.74,1.602L3.747,1.602L3.747,14.397L8.784,14.397z" Stretch="Fill" Width="8" Height="11" Fill="{StaticResource NagigatorIconColor}" RenderTransformOrigin="0.5,0.5" SnapsToDevicePixels="True">
              <Path.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="-1" />
                </TransformGroup>
              </Path.RenderTransform>
            </Path>
          </telerik:RadButton>
          <telerik:RadButton x:Name="BeginEdit" Visibility="{Binding EditButtonVisibility}" Command="controls:RadDataFormCommands.BeginEdit" Height="18" Margin="2,4,2,4" Width="18">
            <ToolTipService.ToolTip>
              <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_BeginEdit" />
            </ToolTipService.ToolTip>
            <Path Data="M3.6943,11.9199L4.1323,9.5549C4.1443,9.4019,4.1953,9.2459,4.2973,9.1289L9.4233,4.0049L11.8853,6.4669L6.7593,11.5919C6.7043,11.6469,6.4893,11.7749,6.4183,11.7869L4.0083,12.2339C3.7943,12.2749,3.6533,12.1349,3.6943,11.9199 M4.8903,11.4789L6.2383,11.2519L10.9273,6.5619L10.3673,6.0059L5.7093,10.6679L4.8153,9.7169L4.5693,11.1329C4.7253,11.1989,4.8253,11.3219,4.8903,11.4789 M12.4513,5.9019L9.9893,3.4399L10.7863,2.6439C11.0063,2.4229,11.3643,2.4229,11.5853,2.6439L13.2483,4.3069C13.4683,4.5269,13.4683,4.8849,13.2483,5.1059z" Fill="{StaticResource NagigatorIconColor}" Stretch="Fill" Width="10" Height="11" SnapsToDevicePixels="True" />
          </telerik:RadButton>
          <telerik:RadButton x:Name="Delete" Visibility="{Binding DeleteButtonVisibility}" Command="controls:RadDataFormCommands.Delete" Height="18" Margin="2,4,4,4" Width="19" Padding="0">
            <ToolTipService.ToolTip>
              <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_Delete" />
            </ToolTipService.ToolTip>
            <Path Data="M1,3 L2,3 L2,9 L3,9 L3,3 L4,3 L4,9 L5,9 L5,3 L6,3 L6,9 L7,9 L7,3 L8,3 L8,10 L1,10 z M2,0 L7,0 L7,0.99999994 L9,0.99999994 L9,2 L0,2 L0,0.99999994 L2,0.99999994 z" Fill="{StaticResource NagigatorIconColor}" Stretch="Fill" Width="9" Height="11" SnapsToDevicePixels="True" />
          </telerik:RadButton>
        </StackPanel>
      </Grid>
    </Border>
  </ControlTemplate>
  <Style x:Key="RadDataFormStyle" TargetType="controls:RadDataForm">
    <Setter Property="Template" Value="{StaticResource RadDataFormTemplate}" />
    <Setter Property="Foreground" Value="{StaticResource DataField_Foreground}" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}" />
    <Setter Property="Background" Value="{StaticResource ControlBackground}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>
  <Style TargetType="controls:RadDataForm" BasedOn="{StaticResource RadDataFormStyle}" />
  <Style x:Key="AutoGeneratedFieldsPresenterStyle" TargetType="dataForm:AutoGeneratedFieldsPresenter">
    <Setter Property="Template" Value="{StaticResource AutoGeneratedFieldsPresenterTemplate}" />
    <Setter Property="IsTabStop" Value="False" />
  </Style>
  <Style TargetType="dataForm:AutoGeneratedFieldsPresenter" BasedOn="{StaticResource AutoGeneratedFieldsPresenterStyle}" />
  <Style x:Key="DataFormDataFieldStyle" TargetType="controls:DataFormDataField">
    <Setter Property="Template" Value="{StaticResource DataFormDataFieldTemplate}" />
    <Setter Property="Background" Value="{StaticResource DataField_Background}" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="BorderBrush" Value="{StaticResource DataField_BorderBrush}" />
    <Setter Property="Padding" Value="4" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
  </Style>
  <Style TargetType="controls:DataFormDataField" BasedOn="{StaticResource DataFormDataFieldStyle}" />
  <Style x:Key="CollectionNavigatorStyle" TargetType="dataForm:CollectionNavigator">
    <Setter Property="Template" Value="{StaticResource CollectionNavigatorTemplate}" />
    <Setter Property="BorderBrush" Value="{StaticResource DataForm_CollectionNavigator_Border}" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Background" Value="{StaticResource DataForm_CollectionNavigatorBackground}" />
    <Setter Property="BorderThickness" Value="0,0,0,1" />
  </Style>
  <Style TargetType="dataForm:CollectionNavigator" BasedOn="{StaticResource CollectionNavigatorStyle}" />
  <Style x:Key="DataFormValidationSummaryStyle" TargetType="dataForm:DataFormValidationSummary">
    <Setter Property="Template" Value="{StaticResource DataFormValidationSummaryTemplate}" />
  </Style>
  <Style TargetType="dataForm:DataFormValidationSummary" BasedOn="{StaticResource DataFormValidationSummaryStyle}" />
  <Style TargetType="controls:DataFormCheckBoxField" BasedOn="{StaticResource DataFormDataFieldStyle}" />
  <Style TargetType="controls:DataFormComboBoxField" BasedOn="{StaticResource DataFormDataFieldStyle}" />
  <Style TargetType="controls:DataFormDateField" BasedOn="{StaticResource DataFormDataFieldStyle}" />
  <!--RadPropertyGrid-->
  <ControlTemplate x:Key="ToggleButtonTemplate" TargetType="telerik:RadToggleButton">
    <Border Background="Transparent" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
      <Border Width="9" Height="9" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
        <Grid>
          <Path x:Name="plus" Fill="{StaticResource GridView_ToggleButtonStroke}" Stretch="Fill" Stroke="{x:Null}" Margin="{TemplateBinding Padding}" Data="M1.937,0 L2.937,0 2.937,2.0209999 5,2.0209999 5,3.0209999 2.937,3.0209999 2.937,5 1.937,5 1.937,3.0209999 0,3.0209999 0,2.0209999 1.937,2.0209999 z" Width="5" Height="5" />
          <Rectangle x:Name="minus" Fill="{StaticResource GridView_ToggleButtonStroke}" Stroke="{x:Null}" RadiusX="0" RadiusY="0" Margin="{TemplateBinding Padding}" VerticalAlignment="Center" Height="1" HorizontalAlignment="Center" Width="5" Opacity="0" />
        </Grid>
      </Border>
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="plus" Property="Opacity" Value="0" />
        <Setter TargetName="minus" Property="Opacity" Value="1" />
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="PropertyGridNestedToggleButtonStyle" TargetType="telerik:RadToggleButton">
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Foreground" Value="{StaticResource GridView_ToggleButtonForeground}" />
    <Setter Property="BorderBrush" Value="{StaticResource GridView_ToggleButtonBorder}" />
    <Setter Property="Background" Value="{StaticResource GridView_ToggleButtonBackground}" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="Padding" Value="0" />
    <Setter Property="Template" Value="{StaticResource ToggleButtonTemplate}" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>
  <Style x:Key="GripperStyle" TargetType="Thumb">
    <Setter Property="Width" Value="8" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="BorderThickness" Value="0" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Stretch" />
    <Setter Property="Padding" Value="0" />
    <Setter Property="Cursor" Value="SizeWE" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Thumb">
          <Border Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ItemsControlStyle" TargetType="ItemsControl">
    <Setter Property="BorderBrush" Value="#FF848484" />
    <Setter Property="BorderThickness" Value="0,0,0,1" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ItemsControl">
          <Border BorderBrush="{TemplateBinding BorderBrush}" VerticalAlignment="Top" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
            <ItemsPresenter />
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <ControlTemplate x:Key="PropertyGridFieldTemplate" TargetType="propertyGrid:PropertyGridField">
    <Border x:Name="PART_RootElement" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
      <StackPanel>
        <Grid Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ParentPropertyGrid.NestedPropertiesVisibility}">
          <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
          </Grid.RowDefinitions>
          <Grid x:Name="PART_PropertyGridFieldGridN" MinHeight="25" Height="{TemplateBinding Height}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" />
              <ColumnDefinition Width="{Binding LabelColumnWidth, ElementName=PropertyGridPresenter}" />
              <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Border x:Name="SelectionBackground" BorderBrush="{StaticResource ItemOuterBorder_Selected}" BorderThickness="1" Grid.Column="1" CornerRadius="1" HorizontalAlignment="Stretch" Margin="1,1,1,2" Visibility="{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Stretch">
              <Border BorderBrush="{StaticResource ItemInnerBorder_Selected}" BorderThickness="1" Background="{StaticResource ItemBackground_Selected}" CornerRadius="1" />
            </Border>
            <Border x:Name="Background_Over" BorderBrush="{StaticResource ItemOuterBorder_Over}" BorderThickness="1" Grid.Column="1" Grid.ColumnSpan="2" CornerRadius="1" HorizontalAlignment="Stretch" Margin="1,1,1,2" Visibility="{Binding IsMouseOver, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Stretch">
              <Border BorderBrush="{StaticResource ItemInnerBorder_Over}" BorderThickness="1" Background="{StaticResource ItemBackground_Over}" CornerRadius="1" />
            </Border>
            <Border BorderBrush="{StaticResource ControlOuterBorder}" BorderThickness="0,0,1,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="25">
              <Border BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="1,0,1,0" Background="{StaticResource PropertyGrid_IndentCellBackground}" />
            </Border>
            <Border BorderBrush="{StaticResource PropertyGrid_TemplatesBorderBrush}" BorderThickness="1,0,0,1" Grid.Column="4">
              <ContentPresenter Margin="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
            </Border>
            <Border BorderBrush="{StaticResource PropertyGrid_TemplatesBorderBrush}" BorderThickness="0,0,0,1" Grid.Column="1">
              <StackPanel Orientation="Horizontal">
                <propertyGrid:PropertyGridIndentPresenter IndentLevel="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IndentLevel}">
                  <propertyGrid:PropertyGridIndentPresenter.ItemsPanel>
                    <ItemsPanelTemplate>
                      <StackPanel Orientation="Horizontal" />
                    </ItemsPanelTemplate>
                  </propertyGrid:PropertyGridIndentPresenter.ItemsPanel>
                  <propertyGrid:PropertyGridIndentPresenter.ItemTemplate>
                    <DataTemplate>
                      <propertyGrid:PropertyGridIndentCell />
                    </DataTemplate>
                  </propertyGrid:PropertyGridIndentPresenter.ItemTemplate>
                  <propertyGrid:PropertyGridIndentPresenter.Template>
                    <ControlTemplate>
                      <ItemsPresenter />
                    </ControlTemplate>
                  </propertyGrid:PropertyGridIndentPresenter.Template>
                </propertyGrid:PropertyGridIndentPresenter>
                <telerik:RadToggleButton x:Name="PART_NestedPropertiesButton" Style="{StaticResource PropertyGridNestedToggleButtonStyle}" Background="Transparent" Width="25" Visibility="{Binding HasNestedProperties, Converter={StaticResource BooleanToVisibilityConverter}}" IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsExpanded, Mode=TwoWay}" />
                <TextBlock VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="4,2,0,2" Text="{Binding DisplayName}" />
              </StackPanel>
            </Border>
            <propertyGrid:PropertyGridColumnResizer x:Name="ColumnResizer" Grid.Column="1" Margin="0,0,-4,0" HorizontalAlignment="Right" />
          </Grid>
          <ItemsControl Grid.Row="1" ItemsSource="{Binding NestedProperties, Converter={StaticResource FlatItemSourceConverter}}" Visibility="{Binding ElementName=PART_NestedPropertiesButton, Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}">
            <ItemsControl.ItemTemplate>
              <DataTemplate>
                <propertyGrid:PropertyGridField Content="{Binding}" Visibility="{Binding Visibility}" />
              </DataTemplate>
            </ItemsControl.ItemTemplate>
          </ItemsControl>
        </Grid>
        <Grid x:Name="PART_PropertyGridFieldGrid" Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedVisibilityConverter}, Path=ParentPropertyGrid.NestedPropertiesVisibility}" MinHeight="25" Height="{TemplateBinding Height}">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="{Binding LabelColumnWidth, ElementName=PropertyGridPresenter}" />
            <ColumnDefinition Width="*" />
          </Grid.ColumnDefinitions>
          <Border BorderBrush="{StaticResource ItemOuterBorder_Selected}" BorderThickness="1" Grid.Column="1" CornerRadius="1" HorizontalAlignment="Stretch" Margin="1,1,1,2" Visibility="{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Stretch">
            <Border BorderBrush="{StaticResource ItemInnerBorder_Selected}" BorderThickness="1" Background="{StaticResource ItemBackground_Selected}" CornerRadius="1" />
          </Border>
          <Border BorderBrush="{StaticResource ItemOuterBorder_Over}" BorderThickness="1" Grid.Column="1" Grid.ColumnSpan="2" CornerRadius="1" HorizontalAlignment="Stretch" Margin="1,1,1,2" Visibility="{Binding IsMouseOver, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Stretch">
            <Border BorderBrush="{StaticResource ItemInnerBorder_Over}" BorderThickness="1" Background="{StaticResource ItemBackground_Over}" CornerRadius="1" />
          </Border>
          <Border BorderBrush="{StaticResource ControlOuterBorder}" BorderThickness="0,0,1,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="25">
            <Border BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="1,0,1,0" Background="{StaticResource PropertyGrid_IndentCellBackground}" />
          </Border>
          <Border BorderBrush="{StaticResource PropertyGrid_TemplatesBorderBrush}" BorderThickness="0,0,0,1" Grid.Column="1">
            <TextBlock VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="4,2,0,2" Text="{Binding DisplayName}" />
          </Border>
          <Border BorderBrush="{StaticResource PropertyGrid_TemplatesBorderBrush}" BorderThickness="1,0,0,1" Grid.Column="2">
            <ContentPresenter Margin="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
          </Border>
          <propertyGrid:PropertyGridColumnResizer Grid.Column="1" Margin="0,0,-4,0" HorizontalAlignment="Right" />
        </Grid>
      </StackPanel>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="PropertyGridColumnResizerTemplate" TargetType="propertyGrid:PropertyGridColumnResizer">
    <Border VerticalAlignment="Stretch" Background="{TemplateBinding Background}">
      <Thumb HorizontalAlignment="Right" Style="{StaticResource GripperStyle}" />
    </Border>
  </ControlTemplate>
  <Style x:Key="PropertyGridToggleButtonStyle" TargetType="telerik:RadToggleButton">
    <Setter Property="VerticalContentAlignment" Value="Stretch" />
    <Setter Property="HorizontalContentAlignment" Value="Left" />
    <Setter Property="Height" Value="25" />
    <Setter Property="FontWeight" Value="Bold" />
    <Setter Property="Foreground" Value="#FF000000" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" />
              <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Border x:Name="IconOuterBorder" BorderBrush="{StaticResource ControlOuterBorder}" BorderThickness="0,0,0,1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="25">
              <Border x:Name="IconInnerBorder" BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="1,1,0,1" Background="{StaticResource PropertyGrid_IndentCellBackground}">
                <Path x:Name="ExpanderButton" Data="M0,0L1,0 2,0 2,0.99999991 3,0.99999991 3,2 4,2 4,0.99999991 5,0.99999991 5,0 5.9999999,0 7,0 7,0.99999991 5.9999999,0.99999991 5.9999999,2 5,2 5,3 4,3 4,4 3,4 3,3 2,3 2,2 1,2 1,0.99999991 0,0.99999991z" Fill="{StaticResource ToggleButton_Indicator}" HorizontalAlignment="Center" Height="5" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Center" Width="7" SnapsToDevicePixels="True">
                  <Path.RenderTransform>
                    <RotateTransform />
                  </Path.RenderTransform>
                </Path>
              </Border>
            </Border>
            <Border BorderBrush="{StaticResource ControlOuterBorder}" BorderThickness="0,0,0,1" Grid.ColumnSpan="2" Grid.Column="1">
              <Border BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="0,1,1,1" Background="{StaticResource PropertyGrid_IndentCellBackground}">
                <ContentPresenter x:Name="PART_ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
              </Border>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsChecked" Value="True">
              <Trigger.EnterActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)" Storyboard.TargetName="ExpanderButton">
                      <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="180" />
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </BeginStoryboard>
              </Trigger.EnterActions>
              <Trigger.ExitActions>
                <BeginStoryboard>
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)" Storyboard.TargetName="ExpanderButton">
                      <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0" />
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </BeginStoryboard>
              </Trigger.ExitActions>
              <Setter Property="BorderThickness" TargetName="IconOuterBorder" Value="0" />
              <Setter Property="BorderThickness" TargetName="IconInnerBorder" Value="1,1,0,0" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <DataTemplate x:Key="flatTemplate">
    <ItemsControl ItemsSource="{Binding Converter={StaticResource FlatItemSourceConverter}}" Style="{StaticResource ItemsControlStyle}">
      <ItemsControl.ItemTemplate>
        <DataTemplate>
          <propertyGrid:PropertyGridField Content="{Binding}" Visibility="{Binding Visibility}" />
        </DataTemplate>
      </ItemsControl.ItemTemplate>
    </ItemsControl>
  </DataTemplate>
  <propertyGrid:GroupingItemsSourceConverter x:Key="GroupingItemsSourceConverter" />
  <DataTemplate x:Key="groupTemplate">
    <ItemsControl ItemsSource="{Binding ., Converter={StaticResource GroupingItemsSourceConverter}}">
      <ItemsControl.ItemTemplate>
        <DataTemplate>
          <Border BorderThickness="0,1,0,0" BorderBrush="{StaticResource ControlOuterBorder}" Margin="0,-1,0,0">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
              </Grid.RowDefinitions>
              <telerik:RadToggleButton Content="{Binding Key}" x:Name="expandCollapseButton" BorderBrush="{x:Null}" Style="{StaticResource PropertyGridToggleButtonStyle}" IsChecked="True" />
              <ContentPresenter x:Name="PART_ContentPresenter" Grid.Row="1" ContentTemplate="{StaticResource flatTemplate}" Content="{Binding Items}" Visibility="{Binding IsChecked, Converter={StaticResource BooleanToVisibilityConverter}, ElementName=expandCollapseButton}" />
            </Grid>
          </Border>
        </DataTemplate>
      </ItemsControl.ItemTemplate>
    </ItemsControl>
  </DataTemplate>
  <propertyGrid:ItemTemplateConverter x:Key="ItemTemplateConverter" FlatTemplate="{StaticResource flatTemplate}" GroupTemplate="{StaticResource groupTemplate}" />
  <ControlTemplate x:Key="RadPropertyGridTemplate" TargetType="controls:RadPropertyGrid">
    <Border x:Name="PART_RootElement" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
      <Grid x:Name="PART_PropertyGridContainer" Background="{TemplateBinding Background}">
        <Grid.RowDefinitions>
          <RowDefinition Height="auto" />
          <RowDefinition Height="*" />
          <RowDefinition Height="auto" />
        </Grid.RowDefinitions>
        <Border x:Name="Header" BorderBrush="{StaticResource ControlOuterBorder}" BorderThickness="0,0,0,1" Margin="0,0,0,-1">
          <Border BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="1" Background="{StaticResource PropertyGrid_HeaderBackground}">
            <Grid Margin="1">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
              </Grid.ColumnDefinitions>
              <telerik:RadRadioButton x:Name="groupButton" Visibility="{TemplateBinding SortAndGroupButtonsVisibility}" Margin="0,0,3,0" Width="28" IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsGrouped, Mode=TwoWay}">
                <ToolTipService.ToolTip>
                  <ToolTip telerik:LocalizationManager.ResourceKey="Categorize" />
                </ToolTipService.ToolTip>
                <Path Data="M7.0000019,8.9999981 L16.999998,8.9999981 L16.999998,9.9999981 L7.0000019,9.9999981 z M7.0000019,6.9999995 L16.999998,6.9999995 L16.999998,7.9999995 L7.0000019,7.9999995 z M0,6 L3.9999998,8.5 L0,11 z M6.999999,3.0000055 L16.999996,3.0000055 L16.999996,4.0000052 L6.999999,4.0000052 z M7.0000019,0.99999905 L16.999998,0.99999905 L16.999998,1.9999989 L7.0000019,1.9999989 z M0,0 L4,2.5000002 L0,5.0000005 z" Fill="{StaticResource RadioButton_Indicator}" Height="11" Stretch="Fill" StrokeThickness="0" Width="17" SnapsToDevicePixels="True" />
              </telerik:RadRadioButton>
              <telerik:RadRadioButton x:Name="sortButton" Content="A-Z" Grid.Column="1" Visibility="{TemplateBinding SortAndGroupButtonsVisibility}" Width="28" IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsGrouped, Mode=TwoWay, Converter={StaticResource InvertedBooleanConverter}}">
                <ToolTipService.ToolTip>
                  <ToolTip telerik:LocalizationManager.ResourceKey="Alphabetical" />
                </ToolTipService.ToolTip>
              </telerik:RadRadioButton>
              <TextBox x:Name="searchAsYouTypeTextBox" Visibility="{TemplateBinding SearchBoxVisibility}" Grid.Column="2" HorizontalAlignment="Stretch" Margin="2,0,0,0" telerik:TextBoxBehavior.SelectAllOnGotFocus="True" Text="{Binding FilterText, ElementName=PropertyGridPresenter, Mode=TwoWay}" telerik:TextBoxBehavior.UpdateTextOnEnter="True" telerik:TextBoxBehavior.UpdateTextOnTextChanged="True" />
              <Path Grid.Column="2" Visibility="{TemplateBinding SearchBoxVisibility}" Data="M8.4939966,1.9999999 C6.5610008,1.9999999 4.9939971,3.5670033 4.9939971,5.5 C4.9939971,7.4329967 6.5610008,9 8.4939966,9 C10.426993,9 11.993997,7.4329967 11.993997,5.5 C11.993997,3.5670033 10.426993,1.9999999 8.4939966,1.9999999 z M8.4939976,0 C11.531564,-8.7786177E-08 13.993998,2.4624338 13.993998,5.5 C13.993998,8.5375662 11.531564,11 8.4939976,11 C7.3549109,11 6.2967014,10.65372 5.4188957,10.060686 L5.3678761,10.025319 L1.4142134,13.978982 L0,12.564768 L3.9563832,8.6083851 L3.9333115,8.5751028 C3.3402777,7.6972966 2.9939978,6.6390872 2.9939978,5.5 C2.9939978,2.4624338 5.4564314,-8.7786177E-08 8.4939976,0 z" Fill="{StaticResource PropertyGrid_SearchIndicator_Background}" HorizontalAlignment="Right" Height="14" Margin="4" Stretch="Fill" StrokeThickness="2" Width="14" SnapsToDevicePixels="True" />
            </Grid>
          </Border>
        </Border>
        <Border Grid.Row="1" BorderThickness="0,1,0,1" BorderBrush="{StaticResource ControlOuterBorder}">
          <ScrollViewer x:Name="PART_ItemsScrollViewer" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto">
            <propertyGrid:PropertyGridPresenter x:Name="PropertyGridPresenter" LabelColumnWidth="{Binding LabelColumnWidth, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" PropertyDefinitions="{Binding PropertyDefinitions, RelativeSource={RelativeSource TemplatedParent}}" SearchInNestedProperties="{Binding SearchInNestedProperties, RelativeSource={RelativeSource TemplatedParent}}" ContentTemplate="{Binding IsGrouped, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ItemTemplateConverter}}" />
          </ScrollViewer>
        </Border>
        <Border x:Name="PART_DescriptionPanel" Visibility="{TemplateBinding DescriptionPanelVisibility}" MinHeight="75" Grid.Row="2" BorderBrush="{StaticResource PropertyGrid_DescriptionBorderBrush}" BorderThickness="0,1,0,0" Background="{StaticResource PropertyGrid_DescriptionBackground}">
          <StackPanel Orientation="Vertical">
            <TextBlock Text="{Binding SelectedPropertyDefinition.DisplayName,ElementName=PropertyGridPresenter}" Margin="5" FontWeight="Bold" />
            <TextBlock Text="{Binding SelectedPropertyDefinition.Description,ElementName=PropertyGridPresenter}" Margin="5" TextWrapping="Wrap" />
          </StackPanel>
        </Border>
      </Grid>
    </Border>
  </ControlTemplate>
  <Style x:Key="PropertyGridIndentCellStyle" TargetType="propertyGrid:PropertyGridIndentCell">
    <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}" />
    <Setter Property="BorderThickness" Value="0,0,1,0" />
    <Setter Property="VerticalContentAlignment" Value="Stretch" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="Padding" Value="0" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="propertyGrid:PropertyGridIndentCell">
          <Border Background="Transparent" Width="25" />
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="propertyGrid:PropertyGridIndentCell" BasedOn="{StaticResource PropertyGridIndentCellStyle}" />
  <Style x:Key="RadPropertyGridStyle" TargetType="controls:RadPropertyGrid">
    <Setter Property="Template" Value="{StaticResource RadPropertyGridTemplate}" />
    <Setter Property="Background" Value="{StaticResource ControlBackground}" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}" />
    <Setter Property="Foreground" Value="{StaticResource ControlForeground}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>
  <Style TargetType="controls:RadPropertyGrid" BasedOn="{StaticResource RadPropertyGridStyle}" />
  <Style x:Key="PropertyGridColumnResizerStyle" TargetType="propertyGrid:PropertyGridColumnResizer">
    <Setter Property="Template" Value="{StaticResource PropertyGridColumnResizerTemplate}" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>
  <Style TargetType="propertyGrid:PropertyGridColumnResizer" BasedOn="{StaticResource PropertyGridColumnResizerStyle}" />
  <Style x:Key="PropertyGridFieldStyle" TargetType="propertyGrid:PropertyGridField">
    <Setter Property="Template" Value="{StaticResource PropertyGridFieldTemplate}" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Background" Value="{StaticResource PropertyGridField_Background}" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>
  <Style TargetType="propertyGrid:PropertyGridField" BasedOn="{StaticResource PropertyGridFieldStyle}" />
</ResourceDictionary>