<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">
  <telerik:MetroColors x:Key="MetroColors" />
  <SolidColorBrush x:Key="MarkerBrush" Color="{Binding Path=Palette.MarkerColor, Source={StaticResource MetroColors}}" telerik:MetroColors.Color="BoundColor" />
  <SolidColorBrush x:Key="BasicBrush" Color="{Binding Path=Palette.BasicColor, Source={StaticResource MetroColors}}" telerik:MetroColors.Color="BoundColor" />
  <SolidColorBrush x:Key="MainBrush" Color="{Binding Path=Palette.MainColor, Source={StaticResource MetroColors}}" telerik:MetroColors.Color="BoundColor" />
  <SolidColorBrush x:Key="AccentBrush" Color="{Binding Path=Palette.AccentColor, Source={StaticResource MetroColors}}" telerik:MetroColors.Color="BoundColor" />
  <SolidColorBrush x:Key="StrongBrush" Color="{Binding Path=Palette.StrongColor, Source={StaticResource MetroColors}}" telerik:MetroColors.Color="BoundColor" />
  <telerikData:FilterOperatorConverter x:Key="FilterOperatorConverter" />
  <SolidColorBrush x:Key="ValidationBrush" Color="{Binding Path=Palette.ValidationColor, Source={StaticResource MetroColors}}" telerik:MetroColors.Color="BoundColor" />
  <telerik:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
  <dataFilter:LogicalOperatorToCheckedConverter x:Key="LogicalOperatorToCheckedConverter" />
  <telerikData:FilterCompositionLogicalOperatorConverter x:Key="LogicalOperatorConverter" />
  <telerik:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter" />
  <dataFilter:FilterOperatorToSelectedItemConverter x:Key="FilterOperatorToSelectedItemConverter" />
  <dataFilter:FilterMemberToEnabledConverter x:Key="FilterMemberToEnabledConverter" />
  <dataForm:DescriptionVisibilityConverter x:Key="DescriptionVisibilityConverter" />
  <propertyGrid:FlatItemSourceConverter x:Key="FlatItemSourceConverter" />
  <propertyGrid:GroupingItemsSourceConverter x:Key="GroupingItemsSourceConverter" />
  <propertyGrid:InvertedVisibilityConverter x:Key="InvertedVisibilityConverter" />
  <telerik:InvertedBooleanConverter x:Key="InvertedBooleanConverter" />
  <!--RadDataPager-->
  <!--PageButton Style-->
  <ControlTemplate TargetType="telerik:RadButton" x:Key="PageButtonTemplate">
    <Grid SnapsToDevicePixels="True">
      <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="11" />
      <!-- Content -->
      <Grid x:Name="ContentGrid">
        <ContentPresenter x:Name="Content" Opacity="0.5" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
          <ContentPresenter.RenderTransform>
            <TransformGroup>
              <ScaleTransform />
              <SkewTransform />
              <RotateTransform />
              <TranslateTransform />
            </TransformGroup>
          </ContentPresenter.RenderTransform>
        </ContentPresenter>
      </Grid>
      <!-- Focus -->
      <Border x:Name="CommonStatesWrapper">
        <Border x:Name="FocusVisual" Visibility="Collapsed" Opacity="0" CornerRadius="11" BorderThickness="1" BorderBrush="{StaticResource MarkerBrush}" />
      </Border>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="true">
        <Setter TargetName="Border" Property="Background" Value="{StaticResource BasicBrush}" />
        <Setter TargetName="Content" Property="Opacity" Value="1" />
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter TargetName="Border" Property="Background" Value="{StaticResource BasicBrush}" />
        <Setter TargetName="Content" Property="Opacity" Value="1" />
        <Setter TargetName="Content" Property="RenderTransform">
          <Setter.Value>
            <TranslateTransform X="1" />
          </Setter.Value>
        </Setter>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="0.3" />
        <Setter TargetName="Border" Property="Opacity" Value="0.3" />
      </Trigger>
      <Trigger Property="IsFocused" Value="True">
        <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible" />
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0.2" />
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="telerik:RadButton" x:Key="PageButtonStyle">
    <Setter Property="Template" Value="{StaticResource PageButtonTemplate}" />
    <Setter Property="Background" Value="{StaticResource MainBrush}" />
    <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="MinWidth" Value="22" />
    <Setter Property="MinHeight" Value="22" />
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Margin" Value="1,0" />
  </Style>
  <!--PageStyle-->
  <ControlTemplate TargetType="telerik:RadRadioButton" x:Key="RadPageTemplate">
    <Grid SnapsToDevicePixels="True">
      <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="11" />
      <!-- Checked -->
      <Border x:Name="CheckedVisual" Opacity="0" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource AccentBrush}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="11" />
      <!-- Content -->
      <Grid x:Name="ContentGrid">
        <ContentControl x:Name="Content" IsTabStop="False" Foreground="{TemplateBinding Foreground}" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
          <ContentControl.RenderTransform>
            <TransformGroup>
              <ScaleTransform />
              <SkewTransform />
              <RotateTransform />
              <TranslateTransform />
            </TransformGroup>
          </ContentControl.RenderTransform>
        </ContentControl>
      </Grid>
      <!-- Focus -->
      <Border x:Name="CommonStatesWrapper">
        <Border x:Name="FocusVisual" Visibility="Collapsed" Opacity="0" CornerRadius="11" BorderThickness="1" BorderBrush="{StaticResource MarkerBrush}" />
      </Border>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="CheckedVisual" Property="Opacity" Value="1" />
        <Setter TargetName="Content" Property="Foreground" Value="{StaticResource MainBrush}" />
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False" />
          <Condition Property="IsChecked" Value="True" />
        </MultiTrigger.Conditions>
        <Setter TargetName="CheckedVisual" Property="Opacity" Value="0" />
        <Setter TargetName="Content" Property="Opacity" Value="0.5" />
      </MultiTrigger>
      <Trigger Property="IsMouseOver" Value="true">
        <Setter TargetName="Border" Property="Background" Value="{StaticResource BasicBrush}" />
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter TargetName="CommonStatesWrapper" Property="Opacity" Value="0" />
        <Setter TargetName="Border" Property="Background" Value="{StaticResource BasicBrush}" />
        <Setter TargetName="Content" Property="RenderTransform">
          <Setter.Value>
            <TranslateTransform Y="1" />
          </Setter.Value>
        </Setter>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Border" Property="Opacity" Value="0.3" />
        <Setter TargetName="Content" Property="Opacity" Value="0.3" />
      </Trigger>
      <Trigger Property="IsFocused" Value="True">
        <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible" />
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0.2" />
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsChecked" Value="True" />
          <Condition Property="IsMouseOver" Value="True" />
          <Condition Property="IsPressed" Value="False" />
        </MultiTrigger.Conditions>
        <Setter TargetName="CheckedVisual" Property="Background" Value="{StaticResource AccentBrush}" />
        <Setter TargetName="Content" Property="Foreground" Value="{StaticResource MainBrush}" />
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="telerik:RadRadioButton" x:Key="RadPageStyle">
    <Setter Property="Template" Value="{StaticResource RadPageTemplate}" />
    <Setter Property="Background" Value="{StaticResource MainBrush}" />
    <Setter Property="Foreground" Value="{StaticResource MarkerBrush}" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="BorderThickness" Value="0" />
    <Setter Property="MinWidth" Value="22" />
    <Setter Property="MinHeight" Value="22" />
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Padding" Value="3,0" />
    <Setter Property="Margin" Value="1,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}" Margin="2,0,0,0">
          <!--FirstPage Button-->
          <telerik:RadButton Name="MoveToFirstPageButton" Visibility="{Binding PagerControlsVisibility.MoveToFirstPageControlVisibility,RelativeSource={RelativeSource TemplatedParent}}" Command="controls:RadDataPagerCommands.MoveToFirstPage" RenderTransformOrigin="0.5,0.5" Style="{StaticResource PageButtonStyle}">
            <Path Data="M3.5,0.99999994 L7,4 L0,4 z M0,0 L7,0 L7,0.99999994 L3.5,0.99999994 L0,0.99999994 z" Stretch="Fill" Width="6" Height="4" Fill="{StaticResource MarkerBrush}" RenderTransformOrigin="0.5,0.5">
              <Path.RenderTransform>
                <TransformGroup>
                  <ScaleTransform />
                  <SkewTransform />
                  <RotateTransform Angle="90" />
                  <TranslateTransform />
                </TransformGroup>
              </Path.RenderTransform>
            </Path>
            <telerik:RadButton.RenderTransform>
              <TransformGroup>
                <ScaleTransform ScaleX="-1" />
                <SkewTransform />
                <RotateTransform />
                <TranslateTransform />
              </TransformGroup>
            </telerik:RadButton.RenderTransform>
          </telerik:RadButton>
          <!--PreviousPage Button-->
          <telerik:RadButton Name="MoveToPreviousPageButton" Visibility="{Binding PagerControlsVisibility.MoveToPreviousPageControlVisibility,RelativeSource={RelativeSource TemplatedParent}}" Command="controls:RadDataPagerCommands.MoveToPreviousPage" RenderTransformOrigin="0.5,0.5" Style="{StaticResource PageButtonStyle}">
            <Path Data="M10.000001,0 L20.000002,20 L2.3395899E-08,20 z" Stretch="Fill" Width="6" Height="3" Fill="{StaticResource MarkerBrush}" RenderTransformOrigin="0.5,0.5">
              <Path.RenderTransform>
                <TransformGroup>
                  <ScaleTransform />
                  <SkewTransform />
                  <RotateTransform Angle="90" />
                  <TranslateTransform />
                </TransformGroup>
              </Path.RenderTransform>
            </Path>
            <telerik:RadButton.RenderTransform>
              <TransformGroup>
                <ScaleTransform ScaleX="-1" />
                <SkewTransform />
                <RotateTransform />
                <TranslateTransform />
              </TransformGroup>
            </telerik:RadButton.RenderTransform>
          </telerik:RadButton>
          <!--NumericPresenter-->
          <Border Background="{StaticResource MainBrush}" Height="22" 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" Style="{StaticResource PageButtonStyle}">
            <Path Data="M10.000001,0 L20.000002,20 L2.3395899E-08,20 z" Stretch="Fill" Width="6" Height="3" Fill="{StaticResource MarkerBrush}" RenderTransformOrigin="0.5,0.5">
              <Path.RenderTransform>
                <TransformGroup>
                  <ScaleTransform />
                  <SkewTransform />
                  <RotateTransform Angle="90" />
                  <TranslateTransform />
                </TransformGroup>
              </Path.RenderTransform>
            </Path>
          </telerik:RadButton>
          <!--LastPage Button-->
          <telerik:RadButton Name="MoveToLastPageButton" Visibility="{Binding PagerControlsVisibility.MoveToLastPageControlVisibility,RelativeSource={RelativeSource TemplatedParent}}" Command="controls:RadDataPagerCommands.MoveToLastPage" Style="{StaticResource PageButtonStyle}">
            <Path Data="M3.5,0.99999994 L7,4 L0,4 z M0,0 L7,0 L7,0.99999994 L3.5,0.99999994 L0,0.99999994 z" Stretch="Fill" Width="6" Height="4" Fill="{StaticResource MarkerBrush}" RenderTransformOrigin="0.5,0.5">
              <Path.RenderTransform>
                <TransformGroup>
                  <ScaleTransform />
                  <SkewTransform />
                  <RotateTransform Angle="90" />
                  <TranslateTransform />
                </TransformGroup>
              </Path.RenderTransform>
            </Path>
          </telerik:RadButton>
        </StackPanel>
        <!--TextPager-->
        <StackPanel Orientation="Horizontal" Grid.Column="1" Visibility="{Binding PagerControlsVisibility.TextControlVisibility,RelativeSource={RelativeSource TemplatedParent}}" Margin="5,0">
          <TextBlock telerik:LocalizationManager.ResourceKey="RadDataPagerPage" VerticalAlignment="Center" Margin="2,0" />
          <dataPager:DataPagerTextBox BorderBrush="Transparent" Command="controls:RadDataPagerCommands.MoveToPage" Height="20" Margin="2,0" 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="Background" Value="{StaticResource MainBrush}" />
    <Setter Property="Foreground" Value="{StaticResource StrongBrush}" />
    <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="NumericButtonStyle" Value="{StaticResource RadPageStyle}" />
    <Setter Property="Height" Value="30" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="FontFamily" Value="Segoe UI Semibold" />
    <Setter Property="FontSize" Value="12" />
    <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_MouseDown">
    <DoubleAnimation Duration="0:0:0.1" To="1" Storyboard.TargetName="path_pressed" Storyboard.TargetProperty="Opacity" />
  </Storyboard>
  <Storyboard x:Key="FilterButton_MouseUp" FillBehavior="Stop">
    <DoubleAnimation Duration="0:0:0.1" To="0" Storyboard.TargetName="path_pressed" Storyboard.TargetProperty="Opacity" />
  </Storyboard>
  <!--ToggleFilterButton-->
  <ControlTemplate TargetType="telerik:RadToggleButton" x:Key="ToggleFilterButtonTemplate">
    <Grid SnapsToDevicePixels="True">
      <ContentControl x:Name="Content" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"></ContentControl>
    </Grid>
  </ControlTemplate>
  <Style TargetType="telerik:RadToggleButton" x:Key="ToggleFilterButtonStyle">
    <Setter Property="Template" Value="{StaticResource ToggleFilterButtonTemplate}" />
    <Setter Property="Background" Value="{StaticResource MainBrush}" />
    <Setter Property="Foreground" Value="{StaticResource MarkerBrush}" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="BorderThickness" Value="0" />
    <Setter Property="FontFamily" Value="Segoe UI Semibold" />
    <Setter Property="FontSize" Value="12" />
    <Setter Property="Width" Value="45" />
    <Setter Property="Height" Value="22" />
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Padding" Value="3" />
  </Style>
  <!--RemoveFilterButton-->
  <ControlTemplate x:Key="RemoveFilterButtonTemplate" TargetType="telerik:RadButton">
    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
      <Grid>
        <Path x:Name="path" Stretch="Fill" Height="8" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" 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 BasicBrush}" Opacity="1" StrokeThickness="1">
          <Path.RenderTransform>
            <TransformGroup>
              <ScaleTransform />
              <SkewTransform />
              <RotateTransform Angle="-45" />
              <TranslateTransform />
            </TransformGroup>
          </Path.RenderTransform>
        </Path>
        <Path x:Name="path_pressed" Stretch="Fill" Height="8" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" 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 ValidationBrush}" Opacity="0" StrokeThickness="1">
          <Path.RenderTransform>
            <TransformGroup>
              <ScaleTransform />
              <SkewTransform />
              <RotateTransform Angle="-45" />
              <TranslateTransform />
            </TransformGroup>
          </Path.RenderTransform>
        </Path>
      </Grid>
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseDown}" />
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseUp}" />
        </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 MainBrush}" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="BorderThickness" Value="0" />
    <Setter Property="Width" Value="16" />
    <Setter Property="Height" Value="16" />
  </Style>
  <!--AddFilterButton-->
  <ControlTemplate x:Key="AddFilterButtonTemplate" TargetType="telerik:RadButton">
    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
      <Grid>
        <Path x:Name="path" Stretch="Fill" Height="8" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" 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 BasicBrush}" Opacity="1" StrokeThickness="1">
          <Path.RenderTransform>
            <TransformGroup>
              <ScaleTransform />
              <SkewTransform />
              <RotateTransform />
              <TranslateTransform />
            </TransformGroup>
          </Path.RenderTransform>
        </Path>
        <Path x:Name="path_pressed" Stretch="Fill" Height="8" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" 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 AccentBrush}" Opacity="0" StrokeThickness="1">
          <Path.RenderTransform>
            <TransformGroup>
              <ScaleTransform />
              <SkewTransform />
              <RotateTransform />
              <TranslateTransform />
            </TransformGroup>
          </Path.RenderTransform>
        </Path>
      </Grid>
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseDown}" />
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource FilterButton_MouseUp}" />
        </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 MainBrush}" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="BorderThickness" Value="0" />
    <Setter Property="Width" Value="16" />
    <Setter Property="Height" Value="16" />
  </Style>
  <!--FilterControl-->
  <ControlTemplate x:Key="FilterControlTemplate" TargetType="dataFilter:FilterControl">
    <Border x:Name="OuterBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
      <StackPanel Orientation="Horizontal">
        <telerik:RadButton x:Name="PART_RemoveFilterButton" Command="{Binding RemoveFilter}" Style="{StaticResource RemoveFilterButtonStyle}" />
        <StackPanel Orientation="Horizontal" Visibility="{Binding IsComposite, Converter={StaticResource BooleanToVisibilityConverter}}">
          <telerik:RadToggleButton Name="PART_CompositeFilterLogicalOperatorToggleButton" Style="{StaticResource ToggleFilterButtonStyle}" IsChecked="{Binding CompositeFilter.LogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToCheckedConverter}}" Content="{Binding CompositeFilter.LogicalOperator, Converter={StaticResource LogicalOperatorConverter}}" />
          <telerik:RadButton x:Name="PART_AddFilterButton" Command="{Binding AddFilter}" Style="{StaticResource AddFilterButtonStyle}" />
        </StackPanel>
        <StackPanel Orientation="Horizontal" Visibility="{Binding IsComposite, Converter={StaticResource InvertedBooleanToVisibilityConverter}}">
          <telerik:RadComboBox Name="PART_SimpleFilterMemberComboBox" Margin="0,0,2,0" MinWidth="100" VerticalAlignment="Center" ItemsSource="{Binding SimpleFilter.AvailableMembers}" SelectedItem="{Binding SimpleFilter.SelectedMember, Mode=TwoWay}" />
          <telerik:RadComboBox Name="PART_SimpleFilterOperatorComboBox" Margin="0,0,2,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}" />
          <!-- 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 x:Name="PART_ToCompositeFilterButton" Command="{Binding ToCompositeFilter}" Style="{StaticResource AddFilterButtonStyle}" Visibility="{Binding CanUserCreateCompositeFilters, Converter={StaticResource BooleanToVisibilityConverter}}" />
        </StackPanel>
      </StackPanel>
    </Border>
  </ControlTemplate>
  <Style x:Key="FilterControlStyle" TargetType="dataFilter:FilterControl">
    <Setter Property="Template" Value="{StaticResource FilterControlTemplate}" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="BorderThickness" Value="0" />
    <Setter Property="Padding" Value="0" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <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" BorderThickness="0" 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">
    <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" Background="{StaticResource BasicBrush}" 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 ValidationBrush}" Margin="5,5,0,5" FontWeight="Bold" Text="{Binding SourceFieldDisplayName}" />
                  <TextBlock Foreground="{StaticResource ValidationBrush}" FontWeight="Bold" FontFamily="Segoe WP" 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>
  </ControlTemplate>
  <ControlTemplate TargetType="telerik:RadButton" x:Key="CollectionNavigatorButtonTemplate">
    <Grid SnapsToDevicePixels="True">
      <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
      <!-- Content -->
      <Grid x:Name="ContentGrid">
        <ContentPresenter x:Name="Content" Opacity="0.5" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
          <ContentPresenter.RenderTransform>
            <TransformGroup>
              <ScaleTransform />
              <SkewTransform />
              <RotateTransform />
              <TranslateTransform />
            </TransformGroup>
          </ContentPresenter.RenderTransform>
        </ContentPresenter>
      </Grid>
      <!-- Focus -->
      <Border x:Name="CommonStatesWrapper">
        <Border x:Name="FocusVisual" Visibility="Collapsed" Opacity="0" BorderThickness="1" BorderBrush="{StaticResource MarkerBrush}" />
      </Border>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="true">
        <Setter TargetName="Content" Property="Opacity" Value="1" />
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter TargetName="Content" Property="Opacity" Value="1" />
        <Setter TargetName="Content" Property="RenderTransform">
          <Setter.Value>
            <TranslateTransform X="-1" />
          </Setter.Value>
        </Setter>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Content" Property="Opacity" Value="0.3" />
        <Setter TargetName="Border" Property="Opacity" Value="0.3" />
      </Trigger>
      <Trigger Property="IsFocused" Value="True">
        <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible" />
        <Setter TargetName="FocusVisual" Property="Opacity" Value="0.2" />
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="telerik:RadButton" x:Key="CollectionNavigatorButtonStyle">
    <Setter Property="Template" Value="{StaticResource CollectionNavigatorButtonTemplate}" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="BorderThickness" Value="0" />
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Width" Value="18" />
    <Setter Property="Height" Value="18" />
    <Setter Property="Margin" Value="5" />
  </Style>
  <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" Style="{StaticResource CollectionNavigatorButtonStyle}" Visibility="{Binding NavigationButtonsVisibility}" Command="controls:RadDataFormCommands.MoveCurrentToFirst" RenderTransformOrigin="0.5,0.5">
            <ToolTipService.ToolTip>
              <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_MoveCurrentToFirst" />
            </ToolTipService.ToolTip>
            <Path Data="M5,0.50000024 L5,7.5 L1,4 z M0,0 L1,0 L1,4 L1,8 L0,8 z" Fill="{StaticResource MarkerBrush}" Stretch="Fill" RenderTransformOrigin="0.5,0.5" Width="5" Height="8">
              <Path.RenderTransform>
                <TransformGroup>
                  <ScaleTransform />
                  <SkewTransform />
                  <RotateTransform />
                  <TranslateTransform />
                </TransformGroup>
              </Path.RenderTransform>
            </Path>
          </telerik:RadButton>
          <telerik:RadButton x:Name="MoveCurrentToPrevious" Style="{StaticResource CollectionNavigatorButtonStyle}" Visibility="{Binding NavigationButtonsVisibility}" Command="controls:RadDataFormCommands.MoveCurrentToPrevious" RenderTransformOrigin="0.5,0.5">
            <ToolTipService.ToolTip>
              <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_MoveCurrentToPrevious" />
            </ToolTipService.ToolTip>
            <Path Fill="{StaticResource MarkerBrush}" Stretch="Fill" Data="M0,0 L7,0 L3.4999998,4 z" RenderTransformOrigin="0.5,0.5" Width="7" Height="4">
              <Path.RenderTransform>
                <TransformGroup>
                  <ScaleTransform />
                  <SkewTransform />
                  <RotateTransform Angle="90" />
                  <TranslateTransform />
                </TransformGroup>
              </Path.RenderTransform>
            </Path>
          </telerik:RadButton>
          <telerik:RadButton x:Name="MoveCurrentToNext" Style="{StaticResource CollectionNavigatorButtonStyle}" Visibility="{Binding NavigationButtonsVisibility}" Command="controls:RadDataFormCommands.MoveCurrentToNext" RenderTransformOrigin="0.5,0.5">
            <ToolTipService.ToolTip>
              <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_MoveCurrentToNext" />
            </ToolTipService.ToolTip>
            <Path Fill="{StaticResource MarkerBrush}" Stretch="Fill" Data="M0,0 L7,0 L3.4999998,4 z" RenderTransformOrigin="0.5,0.5" Width="7" Height="4">
              <Path.RenderTransform>
                <TransformGroup>
                  <ScaleTransform />
                  <SkewTransform />
                  <RotateTransform Angle="90" />
                  <TranslateTransform />
                </TransformGroup>
              </Path.RenderTransform>
            </Path>
            <telerik:RadButton.RenderTransform>
              <TransformGroup>
                <ScaleTransform ScaleX="-1" />
                <SkewTransform />
                <RotateTransform />
                <TranslateTransform />
              </TransformGroup>
            </telerik:RadButton.RenderTransform>
          </telerik:RadButton>
          <telerik:RadButton x:Name="MoveCurrentToLast" Style="{StaticResource CollectionNavigatorButtonStyle}" Visibility="{Binding NavigationButtonsVisibility}" Command="controls:RadDataFormCommands.MoveCurrentToLast" RenderTransformOrigin="0.5,0.5">
            <ToolTipService.ToolTip>
              <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_MoveCurrentToLast" />
            </ToolTipService.ToolTip>
            <Path Data="M5,0.50000024 L5,7.5 L1,4 z M0,0 L1,0 L1,4 L1,8 L0,8 z" Fill="{StaticResource MarkerBrush}" Stretch="Fill" RenderTransformOrigin="0.5,0.5" Width="5" Height="8">
              <Path.RenderTransform>
                <TransformGroup>
                  <ScaleTransform />
                  <SkewTransform />
                  <RotateTransform />
                  <TranslateTransform />
                </TransformGroup>
              </Path.RenderTransform>
            </Path>
            <telerik:RadButton.RenderTransform>
              <TransformGroup>
                <ScaleTransform ScaleX="-1" />
                <SkewTransform />
                <RotateTransform />
                <TranslateTransform />
              </TransformGroup>
            </telerik:RadButton.RenderTransform>
          </telerik:RadButton>
        </StackPanel>
        <StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right">
          <telerik:RadButton x:Name="AddNew" Style="{StaticResource CollectionNavigatorButtonStyle}" Visibility="{Binding AddNewButtonVisibility}" Command="controls:RadDataFormCommands.AddNew" RenderTransformOrigin="0.5,0.5">
            <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="10" Height="12" Fill="{StaticResource MarkerBrush}" RenderTransformOrigin="0.5,0.5">
              <Path.RenderTransform>
                <TransformGroup>
                  <ScaleTransform />
                  <SkewTransform />
                  <RotateTransform Angle="-90" />
                  <TranslateTransform />
                </TransformGroup>
              </Path.RenderTransform>
            </Path>
            <telerik:RadButton.RenderTransform>
              <TransformGroup>
                <ScaleTransform />
                <SkewTransform />
                <RotateTransform Angle="-90" />
                <TranslateTransform />
              </TransformGroup>
            </telerik:RadButton.RenderTransform>
          </telerik:RadButton>
          <telerik:RadButton x:Name="BeginEdit" Style="{StaticResource CollectionNavigatorButtonStyle}" Visibility="{Binding EditButtonVisibility}" Command="controls:RadDataFormCommands.BeginEdit" RenderTransformOrigin="0.5,0.5">
            <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 MarkerBrush}" Stretch="Fill" RenderTransformOrigin="0.5,0.5" Width="12" Height="12">
              <Path.RenderTransform>
                <TransformGroup>
                  <ScaleTransform />
                  <SkewTransform />
                  <RotateTransform Angle="90" />
                  <TranslateTransform />
                </TransformGroup>
              </Path.RenderTransform>
            </Path>
            <telerik:RadButton.RenderTransform>
              <TransformGroup>
                <ScaleTransform />
                <SkewTransform />
                <RotateTransform Angle="-90" />
                <TranslateTransform />
              </TransformGroup>
            </telerik:RadButton.RenderTransform>
          </telerik:RadButton>
          <telerik:RadButton x:Name="Delete" Style="{StaticResource CollectionNavigatorButtonStyle}" Visibility="{Binding DeleteButtonVisibility}" Command="controls:RadDataFormCommands.Delete" RenderTransformOrigin="0.5,0.5">
            <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 MarkerBrush}" Width="11" Height="12" Stretch="Fill" RenderTransformOrigin="0.5,0.5">
              <Path.RenderTransform>
                <TransformGroup>
                  <ScaleTransform />
                  <SkewTransform />
                  <RotateTransform Angle="90" />
                  <TranslateTransform />
                </TransformGroup>
              </Path.RenderTransform>
            </Path>
            <telerik:RadButton.RenderTransform>
              <TransformGroup>
                <ScaleTransform />
                <SkewTransform />
                <RotateTransform Angle="-90" />
                <TranslateTransform />
              </TransformGroup>
            </telerik:RadButton.RenderTransform>
          </telerik:RadButton>
        </StackPanel>
      </Grid>
    </Border>
  </ControlTemplate>
  <Style x:Key="CollectionNavigatorStyle" TargetType="dataForm:CollectionNavigator">
    <Setter Property="Template" Value="{StaticResource CollectionNavigatorTemplate}" />
    <Setter Property="Background" Value="{StaticResource MainBrush}" />
    <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
    <Setter Property="IsTabStop" Value="False" />
  </Style>
  <Style TargetType="dataForm:CollectionNavigator" BasedOn="{StaticResource CollectionNavigatorStyle}" />
  <ControlTemplate x:Key="AutoGeneratedFieldsPresenterTemplate" TargetType="dataForm:AutoGeneratedFieldsPresenter">
    <ItemsControl IsTabStop="False" ItemsSource="{TemplateBinding Fields}">
      <ItemsControl.ItemsPanel>
        <ItemsPanelTemplate>
          <VirtualizingStackPanel Orientation="Vertical" />
        </ItemsPanelTemplate>
      </ItemsControl.ItemsPanel>
    </ItemsControl>
  </ControlTemplate>
  <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}" />
  <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}" ContentTemplate="{TemplateBinding LabelTemplate}" Margin="5,0" />
        <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 Fill="{StaticResource MainBrush}" Stroke="{StaticResource BasicBrush}" />
          <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" Fill="{StaticResource StrongBrush}">
            <Path.RenderTransform>
              <TransformGroup>
                <ScaleTransform />
                <SkewTransform />
                <RotateTransform />
                <TranslateTransform />
              </TransformGroup>
            </Path.RenderTransform>
          </Path>
        </Grid>
      </Grid>
    </Border>
  </ControlTemplate>
  <Style x:Key="DataFormDataFieldStyle" TargetType="controls:DataFormDataField">
    <Setter Property="Template" Value="{StaticResource DataFormDataFieldTemplate}" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="Foreground" Value="{StaticResource StrongBrush}" />
    <Setter Property="FontFamily" Value="Segoe UI Semibold" />
    <Setter Property="FontSize" Value="12" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Padding" Value="4" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
  </Style>
  <Style TargetType="controls:DataFormDataField" BasedOn="{StaticResource DataFormDataFieldStyle}" />
  <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}}" Background="{StaticResource AccentBrush}" Margin="-1,-1,-1,0">
          <ContentControl x:Name="PART_ContentPresenter" Margin="8,4" Foreground="{StaticResource MainBrush}" FontFamily="Segoe UI Light" FontSize="16" VerticalContentAlignment="Top" HorizontalContentAlignment="Stretch" Content="{TemplateBinding Header}" VerticalAlignment="Center" />
        </Border>
        <dataForm:CollectionNavigator x:Name="CollectionNavigator" Grid.Row="1" />
        <ScrollViewer x:Name="PART_ItemsScrollViewer" Grid.Row="2" IsTabStop="False" BorderBrush="Transparent" 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>
        <dataForm:DataFormValidationSummary x:Name="PART_ValidationSummary" Grid.Row="3" Visibility="{TemplateBinding ValidationSummaryVisibility}" />
        <Border x:Name="FooterPanel_Background" Background="{StaticResource MainBrush}" BorderBrush="{StaticResource BasicBrush}" BorderThickness="0,1,0,0" Grid.Row="4">
          <StackPanel x:Name="PART_FooterPanel" Orientation="Horizontal" HorizontalAlignment="Right">
            <telerik:RadButton x:Name="PART_CommitButton" Visibility="{Binding CommitButtonVisibility}" MinWidth="50" MinHeight="22" Margin="2,4,4,4" Command="controls:RadDataFormCommands.CommitEdit" Content="{TemplateBinding CommitButtonContent}" />
            <telerik:RadButton x:Name="PART_CancelButton" Visibility="{Binding CancelButtonVisibility}" MinWidth="50" MinHeight="22" 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 MainBrush}" Opacity="0.5" IsHitTestVisible="False" />
      </Grid>
    </Border>
  </ControlTemplate>
  <Style x:Key="RadDataFormStyle" TargetType="controls:RadDataForm">
    <Setter Property="Template" Value="{StaticResource RadDataFormTemplate}" />
    <Setter Property="Foreground" Value="{StaticResource MarkerBrush}" />
    <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
    <Setter Property="Background" Value="{StaticResource MainBrush}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="FontSize" Value="12" />
    <Setter Property="FontFamily" Value="Segoe UI" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>
  <Style TargetType="controls:RadDataForm" BasedOn="{StaticResource RadDataFormStyle}" />
  <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">
      <Grid>
        <Path x:Name="plus" Fill="{StaticResource StrongBrush}" 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="9" Height="9" />
        <Rectangle x:Name="minus" Fill="{StaticResource StrongBrush}" Stroke="{x:Null}" RadiusX="0" RadiusY="0" Margin="{TemplateBinding Padding}" VerticalAlignment="Center" Height="2" HorizontalAlignment="Center" Width="9" Opacity="0" />
      </Grid>
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="plus" Property="Opacity" Value="0" />
        <Setter TargetName="minus" Property="Opacity" Value="1" />
        <Setter TargetName="minus" Property="Fill" Value="{StaticResource AccentBrush}" />
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="telerik:RadToggleButton" x:Key="PropertyGridNestedToggleButtonStyle">
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Foreground" Value="{StaticResource MarkerBrush}" />
    <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
    <Setter Property="Background" Value="{StaticResource MainBrush}" />
    <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>
  <ControlTemplate TargetType="telerik:RadToggleButton" x:Key="PropertyGridToggleButtonTemplate">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="*" />
      </Grid.ColumnDefinitions>
      <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="25">
        <Path x:Name="path" Data="M10.000001,0 L20.000002,20 L2.3395899E-08,20 z" Fill="{StaticResource StrongBrush}" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Width="6" Height="4" HorizontalAlignment="Center" VerticalAlignment="Center">
          <Path.RenderTransform>
            <TransformGroup>
              <ScaleTransform />
              <SkewTransform />
              <RotateTransform Angle="180" />
              <TranslateTransform />
            </TransformGroup>
          </Path.RenderTransform>
        </Path>
      </Border>
      <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.Column="1">
        <ContentPresenter x:Name="PART_ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
      </Border>
      <Border x:Name="ExpandBorder" Visibility="Collapsed" BorderBrush="{TemplateBinding BorderBrush}" Background="Transparent" Grid.ColumnSpan="2" Grid.Column="1" BorderThickness="0,0,0,1" />
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsChecked" Value="True">
        <Setter TargetName="path" Property="RenderTransform">
          <Setter.Value>
            <RotateTransform Angle="0" />
          </Setter.Value>
        </Setter>
        <Setter TargetName="ExpandBorder" Property="Visibility" Value="Visible" />
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="telerik:RadToggleButton" x:Key="PropertyGridToggleButtonStyle">
    <Setter Property="Template" Value="{StaticResource PropertyGridToggleButtonTemplate}" />
    <Setter Property="Background" Value="{StaticResource MainBrush}" />
    <Setter Property="Foreground" Value="{StaticResource AccentBrush}" />
    <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
    <Setter Property="BorderThickness" Value="0" />
    <Setter Property="VerticalContentAlignment" Value="Stretch" />
    <Setter Property="HorizontalContentAlignment" Value="Left" />
    <Setter Property="FontFamily" Value="Segoe UI" />
    <Setter Property="FontSize" Value="12" />
    <Setter Property="FontWeight" Value="Bold" />
    <Setter Property="Height" Value="25" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>
  <DataTemplate x:Key="flatTemplate">
    <ItemsControl ItemsSource="{Binding Converter={StaticResource FlatItemSourceConverter}}">
      <ItemsControl.ItemTemplate>
        <DataTemplate>
          <propertyGrid:PropertyGridField Content="{Binding}" Visibility="{Binding Visibility}" />
        </DataTemplate>
      </ItemsControl.ItemTemplate>
    </ItemsControl>
  </DataTemplate>
  <DataTemplate x:Key="groupTemplate">
    <ItemsControl ItemsSource="{Binding ., Converter={StaticResource GroupingItemsSourceConverter}}">
      <ItemsControl.ItemTemplate>
        <DataTemplate>
          <Border BorderBrush="{StaticResource BasicBrush}" BorderThickness="0,0,0,1">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
              </Grid.RowDefinitions>
              <telerik:RadToggleButton x:Name="expandCollapseButton" Content="{Binding Key}" IsChecked="True" Style="{StaticResource PropertyGridToggleButtonStyle}" Foreground="{StaticResource AccentBrush}" />
              <Border BorderBrush="{StaticResource BasicBrush}" BorderThickness="1,0,0,0" Margin="25,0,0,0" Grid.Row="1">
                <ContentPresenter x:Name="PART_ContentPresenter" ContentTemplate="{StaticResource flatTemplate}" Content="{Binding Items}" Visibility="{Binding IsChecked, Converter={StaticResource BooleanToVisibilityConverter}, ElementName=expandCollapseButton}" />
              </Border>
            </Grid>
          </Border>
        </DataTemplate>
      </ItemsControl.ItemTemplate>
    </ItemsControl>
  </DataTemplate>
  <propertyGrid:ItemTemplateConverter x:Key="ItemTemplateConverter" FlatTemplate="{StaticResource flatTemplate}" GroupTemplate="{StaticResource groupTemplate}" />
  <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>
  <ControlTemplate x:Key="PropertyGridColumnResizerTemplate" TargetType="propertyGrid:PropertyGridColumnResizer">
    <Border VerticalAlignment="Stretch" Background="{TemplateBinding Background}">
      <Thumb HorizontalAlignment="Right" Style="{StaticResource GripperStyle}" />
    </Border>
  </ControlTemplate>
  <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}" />
  <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="{Binding LabelColumnWidth, ElementName=PropertyGridPresenter}" />
              <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Rectangle x:Name="SelectionBackground" Grid.Column="0" Fill="{StaticResource BasicBrush}" HorizontalAlignment="Stretch" Visibility="{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="Background_Over" Grid.Column="0" Grid.ColumnSpan="2" Fill="{StaticResource StrongBrush}" Opacity="0.1" HorizontalAlignment="Stretch" Visibility="{Binding IsMouseOver, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Stretch" />
            <Border BorderBrush="{StaticResource BasicBrush}" BorderThickness="0">
              <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}" />
                <Grid Margin="5,0,0,0">
                  <TextBlock FontFamily="Segoe UI Semibold" FontSize="12" Foreground="{StaticResource StrongBrush}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="4,2,0,2" Text="{Binding DisplayName}" Visibility="{Binding IsSelected, Converter={StaticResource InvertedBooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}" />
                  <TextBlock FontFamily="Segoe UI Semibold" FontSize="12" Foreground="{StaticResource MarkerBrush}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="4,2,0,2" Text="{Binding DisplayName}" Visibility="{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}" />
                </Grid>
              </StackPanel>
            </Border>
            <Border BorderBrush="{StaticResource BasicBrush}" BorderThickness="0" Grid.Column="1">
              <ContentPresenter Margin="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
            </Border>
            <propertyGrid:PropertyGridColumnResizer x:Name="ColumnResizer" Grid.Column="0" 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" MinHeight="25" Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedVisibilityConverter}, Path=ParentPropertyGrid.NestedPropertiesVisibility}" Height="{TemplateBinding Height}">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="{Binding LabelColumnWidth, ElementName=PropertyGridPresenter}" />
            <ColumnDefinition Width="*" />
          </Grid.ColumnDefinitions>
          <Rectangle Grid.Column="0" Fill="{StaticResource BasicBrush}" HorizontalAlignment="Stretch" Visibility="{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Stretch" />
          <Rectangle Grid.Column="0" Grid.ColumnSpan="2" Fill="{StaticResource StrongBrush}" Opacity="0.1" HorizontalAlignment="Stretch" Visibility="{Binding IsMouseOver, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Stretch" />
          <Border BorderBrush="{StaticResource BasicBrush}" BorderThickness="0">
            <Grid Margin="5,0,0,0">
              <TextBlock FontFamily="Segoe UI Semibold" FontSize="12" Foreground="{StaticResource StrongBrush}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="4,2,0,2" Text="{Binding DisplayName}" Visibility="{Binding IsSelected, Converter={StaticResource InvertedBooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}" />
              <TextBlock FontFamily="Segoe UI Semibold" FontSize="12" Foreground="{StaticResource MarkerBrush}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="4,2,0,2" Text="{Binding DisplayName}" Visibility="{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}" />
            </Grid>
          </Border>
          <Border BorderBrush="{StaticResource BasicBrush}" BorderThickness="0" Grid.Column="1">
            <ContentPresenter Margin="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
          </Border>
          <propertyGrid:PropertyGridColumnResizer Grid.Column="0" Margin="0,0,-4,0" HorizontalAlignment="Right" />
        </Grid>
      </StackPanel>
    </Border>
  </ControlTemplate>
  <Style x:Key="PropertyGridFieldStyle" TargetType="propertyGrid:PropertyGridField">
    <Setter Property="Template" Value="{StaticResource PropertyGridFieldTemplate}" />
    <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
    <Setter Property="Background" Value="{StaticResource MainBrush}" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>
  <Style TargetType="propertyGrid:PropertyGridField" BasedOn="{StaticResource PropertyGridFieldStyle}" />
  <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}" SnapsToDevicePixels="True">
        <Grid.RowDefinitions>
          <RowDefinition Height="auto" />
          <RowDefinition Height="*" />
          <RowDefinition Height="auto" />
        </Grid.RowDefinitions>
        <Border x:Name="Header" BorderBrush="{StaticResource BasicBrush}" BorderThickness="0,0,0,1">
          <Grid Margin="1,1,2,1" Background="{StaticResource MainBrush}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" />
              <ColumnDefinition Width="Auto" />
              <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <telerik:RadRadioButton x:Name="groupButton" Visibility="{TemplateBinding SortAndGroupButtonsVisibility}" BorderBrush="Transparent" BorderThickness="0,0,0,0" Margin="1,0,3,0" Height="22" Width="28" IsChecked="{Binding Path=IsGrouped, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}">
              <ToolTipService.ToolTip>
                <ToolTip telerik:LocalizationManager.ResourceKey="Categorize" />
              </ToolTipService.ToolTip>
              <Grid>
                <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 StrongBrush}" Stretch="Fill" Width="17" Height="11" Visibility="{Binding IsChecked, Converter={StaticResource InvertedBooleanToVisibilityConverter},ElementName=groupButton}" SnapsToDevicePixels="True" />
                <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 MainBrush}" Stretch="Fill" Width="17" Height="11" Visibility="{Binding IsChecked, Converter={StaticResource BooleanToVisibilityConverter},ElementName=groupButton}" SnapsToDevicePixels="True" />
              </Grid>
            </telerik:RadRadioButton>
            <telerik:RadRadioButton x:Name="sortButton" Foreground="{StaticResource StrongBrush}" Content="A-Z" BorderBrush="Transparent" BorderThickness="0,0,0,0" Visibility="{TemplateBinding SortAndGroupButtonsVisibility}" Grid.Column="1" IsChecked="{Binding Path=IsGrouped, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Converter={StaticResource InvertedBooleanConverter}}" Height="22" Width="28">
              <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" Text="{Binding FilterText, ElementName=PropertyGridPresenter, Mode=TwoWay}" telerik:TextBoxBehavior.SelectAllOnGotFocus="True" 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 StrongBrush}" HorizontalAlignment="Right" Height="14" Margin="4" Stretch="Fill" StrokeThickness="2" Width="14" SnapsToDevicePixels="True" />
          </Grid>
        </Border>
        <Border Grid.Row="1" Background="{StaticResource MainBrush}" Margin="0,0,0,1">
          <ScrollViewer Grid.Row="1" x:Name="PART_ItemsScrollViewer" BorderBrush="Transparent" BorderThickness="0,0,0,0" 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 Path=IsGrouped, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ItemTemplateConverter}}" />
          </ScrollViewer>
        </Border>
        <StackPanel x:Name="PART_DescriptionPanel" Visibility="{TemplateBinding DescriptionPanelVisibility}" Orientation="Vertical" Grid.Row="2" MinHeight="75" Background="{StaticResource BasicBrush}">
          <TextBlock Text="{Binding SelectedPropertyDefinition.DisplayName,ElementName=PropertyGridPresenter}" Margin="9,10,20,5" FontWeight="Bold" />
          <TextBlock Text="{Binding SelectedPropertyDefinition.Description,ElementName=PropertyGridPresenter}" Margin="9,0,20,5" TextWrapping="Wrap" />
        </StackPanel>
      </Grid>
    </Border>
  </ControlTemplate>
  <Style x:Key="RadPropertyGridStyle" TargetType="controls:RadPropertyGrid">
    <Setter Property="Template" Value="{StaticResource RadPropertyGridTemplate}" />
    <Setter Property="Background" Value="{StaticResource MainBrush}" />
    <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
    <Setter Property="Foreground" Value="{StaticResource MarkerBrush}" />
    <Setter Property="FontSize" Value="12" />
    <Setter Property="FontFamily" Value="Segoe UI" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>
  <Style TargetType="controls:RadPropertyGrid" BasedOn="{StaticResource RadPropertyGridStyle}" />
  <Style x:Key="PropertyGridIndentCellStyle" TargetType="propertyGrid:PropertyGridIndentCell">
    <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}" />
</ResourceDictionary>