<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:grid="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"
        xmlns:treelist="clr-namespace:Telerik.Windows.Controls.TreeListView;assembly=Telerik.Windows.Controls.GridView"
        xmlns:input="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
        xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="c">
    <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
    <telerik:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
    <telerik:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
    <telerik:UppercaseConverter x:Key="UppercaseConverter"/>
    <grid:GridLineWidthToThicknessConverter x:Key="GridLineWidthToThicknessConverter"/>
    <grid:FilterOperatorConverter x:Key="FilterOperatorConverter"/>
    <grid:FilterCompositionLogicalOperatorConverter x:Key="FilterCompositionLogicalOperatorConverter"/>
    <grid:DistinctValueConverter x:Key="DistinctValueConverter"/>
    <grid:FilterOperatorToFilterEditorIsEnabledConverter x:Key="FilterOperatorToFilterEditorIsEnabledConverter"/>
    <grid:SortingIndexConverter x:Key="SortingIndexConverter"/>
    <grid:SortingIndexToVisibilityConverter x:Key="SortingIndexToVisibilityConverter"/>
    <grid:ControlPanelItemButtonTooltipToVisibilityConverter x:Key="ControlPanelItemButtonTooltipToVisibilityConverter"/>
    <SolidColorBrush x:Key="GridView_InvalidEditIndicatorBackground1" Color="#7FFD0000"/>
    <SolidColorBrush x:Key="GridView_InvalidEditIndicatorBackground2" Color="#FFFCC1C1"/>
    <SolidColorBrush x:Key="GridView_InvalidEditIndicatorBackground3" Color="Red"/>
    <SolidColorBrush x:Key="GridView_InvalidEditIndicatorBackground4" Color="White"/>
    <SolidColorBrush x:Key="GridView_ValidationTooltipForeground" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="GridView_ValidationTooltipOuterBorder" Color="#FFDC000C"/>
    <SolidColorBrush x:Key="GridView_ValidationTooltipInnerBorder" Color="#FFFFFFFF"/>
    <LinearGradientBrush x:Key="GridView_ValidationTooltipBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFF424C" Offset="1"/>
        <GradientStop Color="#FFC92931"/>
    </LinearGradientBrush>
    <CornerRadius x:Key="GridView_ValidationTooltipCornerRadius">1</CornerRadius>
    <SolidColorBrush x:Key="DropDownButtonForeground" Color="#FF000000"/>
    <SolidColorBrush x:Key="DropDownButtonOuterBorder" Color="#FF848484"/>
    <LinearGradientBrush x:Key="DropDownButtonBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFFFF" Offset="0"/>
        <GradientStop Color="#FFDCDCDC" Offset="0.50"/>
        <GradientStop Color="#FFADADAD" Offset="0.50"/>
        <GradientStop Color="#FFD4D4D4" Offset="1"/>
    </LinearGradientBrush>
    <CornerRadius x:Key="DropDownButton_CornerRadius">1</CornerRadius>
    <LinearGradientBrush x:Key="ControlBackground_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFBDA" Offset="0"/>
        <GradientStop Color="#FFFEEBAE" Offset="0.50"/>
        <GradientStop Color="#FFFFD25A" Offset="0.50"/>
        <GradientStop Color="#FFFFFBA3" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlElement_MouseOver" Color="#FF000000"/>
    <SolidColorBrush x:Key="ControlOuterBorder_MouseOver" Color="#FFFFC92B"/>
    <SolidColorBrush x:Key="ControlInnerBorder_MouseOver" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="ControlElement_Active" Color="#FF000000"/>
    <SolidColorBrush x:Key="ControlInnerBorder_Normal" Color="#FFFFFFFF"/>
    <LinearGradientBrush x:Key="ControlInnerBorder_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB69A78"/>
        <GradientStop Color="#FFFFE17A" Offset="0.126"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ControlBackground_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFDCAB" Offset="0"/>
        <GradientStop Color="#FFFFD18F" Offset="0.5"/>
        <GradientStop Color="#FFFE9227" Offset="0.5"/>
        <GradientStop Color="#FFFFBA74" Offset="0"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlInnerBorder_Disabled" Color="Transparent"/>
    <SolidColorBrush x:Key="ControlBackground_Disabled" Color="#FFE0E0E0"/>
    <SolidColorBrush x:Key="ControlOuterBorder_Checked" Color="#FFFFC92B"/>
    <SolidColorBrush x:Key="ControlInnerBorder_Checked" Color="#FFFFFFFF"/>
    <LinearGradientBrush x:Key="ControlBackground_Checked" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFDCAB" Offset="0"/>
        <GradientStop Color="#FFFFD18F" Offset="0.5"/>
        <GradientStop Color="#FFFE9227" Offset="0.5"/>
        <GradientStop Color="#FFFFD74E" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlOuterBorder_Focused" Color="#FFFFC92B"/>
    <SolidColorBrush x:Key="ControlInnerBorder_Focused" Color="Transparent"/>
    <SolidColorBrush x:Key="ControlBackground_Focused" Color="Transparent"/>
    <SolidColorBrush x:Key="GridViewCell_CurrentBorder" Color="#FF848484"/>
    <SolidColorBrush x:Key="GridViewCommonHeader_Background" Color="#FF3B3B3B"/>
    <SolidColorBrush x:Key="GridViewCommonHeader_BorderBrush" Color="#FF848484"/>
    <SolidColorBrush x:Key="GridViewCommonHeader_Foreground" Color="White"/>
    <SolidColorBrush x:Key="ControlOuterBorder" Color="#FF848484"/>
    <LinearGradientBrush x:Key="GridView_RowDetailsBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFC2C2C2"/>
        <GradientStop Color="#FFF0F0F0" Offset="0.3"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlInnerBorder" Color="White"/>
    <SolidColorBrush x:Key="GridView_FilterIconOuterBorder" Color="Black"/>
    <SolidColorBrush x:Key="GridView_FilterIconTopBorder" Color="White"/>
    <LinearGradientBrush x:Key="GridView_FilterIconBackground" EndPoint="0,0.5" StartPoint="1,0.5">
        <GradientStop Color="#FF353535" Offset="0"/>
        <GradientStop Color="White" Offset="0.8"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="GridView_FilterIconBackground_Filtered" EndPoint="0,0.5" StartPoint="1,0.5">
        <GradientStop Color="#FFFF7300" Offset="0"/>
        <GradientStop Color="#FFFFF400" Offset="0.8"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="GridView_FilterIconInnerBorder" Color="#FF5B5B5B"/>
    <SolidColorBrush x:Key="GridView_IndicatorPrimaryColor" Color="Black"/>
    <SolidColorBrush x:Key="GridView_FilteringControlBackground" Color="#FFE4E4E4"/>
    <SolidColorBrush x:Key="GridView_FilteringControlOuterBorder" Color="#FF848484"/>
    <SolidColorBrush x:Key="ControlForeground" Color="Black"/>
    <LinearGradientBrush x:Key="GridView_FrozenColumnBackground" EndPoint="1,0.5" StartPoint="0,0.5">
        <GradientStop Color="#99000000"/>
        <GradientStop Offset="1" Color="#00000000"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="GridView_FrozenColumnBorder" Color="White"/>
    <SolidColorBrush x:Key="GridView_CellBackground_Edited" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="ItemOuterBorder_Over" Color="#FFFFC92B"/>
    <SolidColorBrush x:Key="ItemInnerBorder_Over" Color="White"/>
    <LinearGradientBrush x:Key="ItemBackground_Over" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFBA3" Offset="1"/>
        <GradientStop Color="#FFFFFBDA" Offset="0"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ItemOuterBorder_Selected" Color="#FFFFC92B"/>
    <SolidColorBrush x:Key="ItemInnerBorder_Selected" Color="White"/>
    <LinearGradientBrush x:Key="ItemBackground_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFCE79F" Offset="1"/>
        <GradientStop Color="#FFFDD3A8"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ItemBackground" Color="White"/>
    <SolidColorBrush x:Key="ControlOuterBorder_Invalid" Color="#FFDB000C"/>
    <SolidColorBrush x:Key="ControlInnerBorder_Invalid" Color="White"/>
    <SolidColorBrush x:Key="ItemOuterBorder_Invalid" Color="#FFCE7D7D"/>
    <LinearGradientBrush x:Key="ItemInnerBorder_Invalid" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFEBF4FD"/>
        <GradientStop Color="#FFDBEAFD" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ItemBackground_Invalid" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFCDCDC"/>
        <GradientStop Color="#FFFCC1C1" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ItemBackground_Disabled" Color="#FFE0E0E0"/>
    <SolidColorBrush x:Key="ItemInnerBorder_Disabled" Color="#FFF8F8F8"/>
    <SolidColorBrush x:Key="GridView_GridLinesItemBorder" Color="#FFCBCBCB"/>
    <SolidColorBrush x:Key="GridView_HeaderForeground_Selected" Color="Black"/>
    <SolidColorBrush x:Key="GridView_HeaderInnerBorder" Color="#FF4B4B4B"/>
    <SolidColorBrush x:Key="GridView_HeaderOuterBorder_Over" Color="#FFFFC92B"/>
    <SolidColorBrush x:Key="GridView_HeaderInnerBorder_Over" Color="White"/>
    <LinearGradientBrush x:Key="GridView_HeaderBackground_Over" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFBA3" Offset="1"/>
        <GradientStop Color="#FFFFFBDA" Offset="0"/>
        <GradientStop Color="#FFFFD25A" Offset="0.43"/>
        <GradientStop Color="#FFFEEBAE" Offset="0.42"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="GridView_HeaderOuterBorder_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF616161" Offset="0"/>
        <GradientStop Color="#FF989898" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="GridView_HeaderInnerBorder_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB69A78"/>
        <GradientStop Color="#FFFFE17A" Offset="0.126"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="GridView_HeaderBackground_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFD74E" Offset="0.996"/>
        <GradientStop Color="#FFFFDCAB" Offset="0.17"/>
        <GradientStop Color="#FFFFB062" Offset="0.57"/>
        <GradientStop Color="#FFFFD18F" Offset="0.56"/>
        <GradientStop Color="#FFFFBA74"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="GridView_SortIndicatorColor" Color="Black"/>
    <LinearGradientBrush x:Key="GridView_HeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF5B5B5B" Offset="1"/>
        <GradientStop Color="#FF868686"/>
        <GradientStop Color="#FF4F4F4F" Offset="0.42"/>
        <GradientStop Color="#FF0E0E0E" Offset="0.43"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="GridView_HeaderOuterBorder" Color="#FF848484"/>
    <SolidColorBrush x:Key="GridViewHeaderCellDropMarkerPenBrush" Color="White"/>
    <SolidColorBrush x:Key="GridView_HeaderForeground" Color="White"/>
    <SolidColorBrush x:Key="GridView_IndentCellBackground" Color="#FFE4E4E4"/>
    <SolidColorBrush x:Key="GridView_HeaderRowOuterBorder" Color="#FF848484"/>
    <LinearGradientBrush x:Key="GridView_HeaderRowBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF5B5B5B" Offset="1"/>
        <GradientStop Color="#FF868686"/>
        <GradientStop Color="#FF4F4F4F" Offset="0.42"/>
        <GradientStop Color="#FF0E0E0E" Offset="0.43"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ItemOuterBorder_SelectedUnfocused" Color="#FFC8C8C8"/>
    <SolidColorBrush x:Key="ItemBackground_SelectedUnfocused" Color="#FFF0F0F0"/>
    <SolidColorBrush x:Key="ItemInnerBorder_SelectedUnfocused" Color="White"/>
    <LinearGradientBrush x:Key="GridView_RowIndicatorCellBackground_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="White" Offset="0"/>
        <GradientStop Color="#FFE4E4E4" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="GridView_HierarchyBackground" Color="#FFBBBBBB"/>
    <SolidColorBrush x:Key="GridView_RowIndicatorCellBackground" Color="#FFE4E4E4"/>
    <SolidColorBrush x:Key="GridView_NavigatorIndicatorBackground" Color="#FF848484"/>
    <LinearGradientBrush x:Key="GridView_NavigatorIndicatorBorder" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF12A500" Offset="1"/>
        <GradientStop Color="#FF5AAA50"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="GridView_EditIndicatorBackground1" Color="#7F848484"/>
    <SolidColorBrush x:Key="GridView_EditIndicatorBackground2" Color="#FFCBCBCB"/>
    <SolidColorBrush x:Key="GridView_EditIndicatorBackground3" Color="#FF848484"/>
    <SolidColorBrush x:Key="GridView_EditIndicatorBackground4" Color="White"/>
    <LinearGradientBrush x:Key="GridView_ErrorIndicatorBackground1" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFC9999" Offset="0"/>
        <GradientStop Color="#FFC26666" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="GridView_ErrorIndicatorBackground2" Color="White"/>
    <LinearGradientBrush x:Key="GridView_ErrorIndicatorBackground3" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="Red" Offset="0"/>
        <GradientStop Color="#FF990000" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="GridView_NewRowIndicatorBackground1" Color="White"/>
    <SolidColorBrush x:Key="GridView_NewRowIndicatorBackground2" Color="#FF848484"/>
    <LinearGradientBrush x:Key="GridView_NewRowIndicatorBackground3" EndPoint="1,1" StartPoint="0,0">
        <GradientStop Color="#FF92CC89" Offset="0"/>
        <GradientStop Color="#FF288A1C" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="GridView_NewRowBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF888888"/>
        <GradientStop Color="White" Offset="0.33"/>
        <GradientStop Color="#FFD0D0D0" Offset="0.66"/>
        <GradientStop Color="White" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="GridView_GroupRowIndicator" Color="Black"/>
    <SolidColorBrush x:Key="GridView_GroupRowBackground" Color="#FFE4E4E4"/>
    <SolidColorBrush x:Key="GridView_HeaderRowInnerBorder" Color="#FF4B4B4B"/>
    <LinearGradientBrush x:Key="GridView_FooterBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB5B5B5"/>
        <GradientStop Color="#FFF0F0F0" Offset="0.5"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="GridView_GroupPanelOuterBorder" Color="#FF848484"/>
    <LinearGradientBrush x:Key="Background_Disabled" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#E5000000"/>
        <GradientStop Color="#E5000000" Offset="1"/>
        <GradientStop Color="#4C000000" Offset="0.5"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlBackground" Color="White"/>
    <SolidColorBrush x:Key="Item_AlternateBackground" Color="#FFF4F4F4"/>
    <LinearGradientBrush x:Key="GridView_GroupPanelBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFDFDFDF" Offset="1"/>
        <GradientStop Color="#FFBABABA"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="GridView_GroupPanelForeground" Color="Black"/>
    <SolidColorBrush x:Key="GridView_ToggleButtonStroke" Color="Black"/>
    <SolidColorBrush x:Key="GridView_ToggleButtonForeground_Arrow" Color="White"/>
    <SolidColorBrush x:Key="GridView_ToggleButtonStroke_Arrow" Color="#FF9D9D9D"/>
    <SolidColorBrush x:Key="GridView_ToggleButtonForeground_Checked" Color="#FF595959"/>
    <SolidColorBrush x:Key="GridView_ToggleButtonStroke_Checked" Color="Black"/>
    <SolidColorBrush x:Key="GridView_ToggleButtonForeground" Color="#FF9D9D9D"/>
    <LinearGradientBrush x:Key="GridView_ToggleButtonBorder" EndPoint="0.854,0.854" StartPoint="0.146,0.146">
        <GradientStop Color="#FF282828" Offset="1"/>
        <GradientStop Color="#FFBFBFBF"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="GridView_ToggleButtonBackground" EndPoint="0.854,0.854" StartPoint="0.146,0.146">
        <GradientStop Color="#FFD1D1D1" Offset="1"/>
        <GradientStop Color="White"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="GridView_GroupPanelInnerBorder" Color="#FFEFF6FF"/>
    <SolidColorBrush x:Key="GridView_SortIndicatorColor_Sorted" Color="White"/>
    <SolidColorBrush x:Key="GridView_IndicatorSecondaryColor" Color="White"/>
    <LinearGradientBrush x:Key="GridView_LoadingBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#E5000000"/>
        <GradientStop Color="#E5000000" Offset="1"/>
        <GradientStop Color="#4C000000" Offset="0.5"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="GridView_LoadingIndicatorBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFBE00"/>
        <GradientStop Color="#FFFFFBA3" Offset="0.5"/>
        <GradientStop Offset="1" Color="#99FFFFFF"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="GridView_LoadingIndicatorBorder" Color="#4C000000"/>
    <RadialGradientBrush x:Key="GridView_ScrollViewerIntersectionRectangleBackground" GradientOrigin="0 0" Center="0 0" RadiusX="1" RadiusY="1">
        <GradientStop Color="#FF848484" Offset="0.066"/>
        <GradientStop Color="#FFBFBFBF" Offset="0.066"/>
        <GradientStop Color="#FFF0F0F0" Offset="0.29"/>
    </RadialGradientBrush>
    <SolidColorBrush x:Key="TreeListView_DragCue_Foreground" Color="Black"/>
    <SolidColorBrush x:Key="TreeListView_DragCue_OuterBorder" Color="#FFFFC92B"/>
    <LinearGradientBrush x:Key="TreeListView_DragCue_Background" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFCE79F" Offset="1"/>
        <GradientStop Color="#FFFDD3A8"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="TreeListView_DragCue_InnerBorder" Color="White"/>
    <SolidColorBrush x:Key="TreeListView_DragCue_DraggedItemsCount_Border" Color="#FF848484"/>
    <LinearGradientBrush x:Key="TreeListView_DragCue_DraggedItemsCount_Background" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="White" Offset="0"/>
        <GradientStop Color="#FFDEDEDE" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="TreeListView_DragCue_ImpossibleIconFill" Color="#FFFF2B2B"/>
    <SolidColorBrush x:Key="TreeListView_DragCue_PossibleIconFill" Color="#FF848484"/>
    <SolidColorBrush x:Key="TreeListView_DragCue_EllipseStroke" Color="#FFFFC92B"/>
    <SolidColorBrush x:Key="TreeListView_DragCue_RectangleFill" Color="#FFFFC92B"/>
    <LinearGradientBrush x:Key="GridView_ScrollIndicatorBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFFFF" Offset="0"/>
        <GradientStop Color="#FFDEDEDE" Offset="1"/>
    </LinearGradientBrush>
    <Style x:Key="AggregateResultsListStyle" TargetType="grid:AggregateResultsList">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <ItemsPresenter/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemTemplate">
            <Setter.Value>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="{Binding Caption}"/>
                        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="{Binding FormattedValue}"/>
                    </StackPanel>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <StackPanel Orientation="Vertical"/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:AggregateResultsList" BasedOn="{StaticResource AggregateResultsListStyle}"/>
    <ControlTemplate x:Key="ChildDataControlsPresenterTemplate" TargetType="grid:ChildDataControlsPresenter">
        <ItemsControl x:Name="PART_ChildDataItemsControl" ItemsSource="{Binding}" IsTabStop="{TemplateBinding IsTabStop}">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <controls:RadGridView MaxHeight="300" IsTabStop="{Binding IsTabStop, ElementName=PART_ChildDataItemsControl}"/>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </ControlTemplate>
    <Style x:Key="ChildDataControlsPresenterStyle" TargetType="grid:ChildDataControlsPresenter">
        <Setter Property="Template" Value="{StaticResource ChildDataControlsPresenterTemplate}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:ChildDataControlsPresenter" BasedOn="{StaticResource ChildDataControlsPresenterStyle}"/>
    <ControlTemplate x:Key="AutoCompleteStringFilterEditorTemplate" TargetType="grid:AutoCompleteStringFilterEditor">
        <Grid MinWidth="100">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <input:RadAutoCompleteBox x:Name="PART_RadAutoCompleteBox" AutoCompleteMode="Suggest" SelectionMode="Single" ItemsSource="{Binding RawDistinctValues}" VerticalAlignment="Stretch"/>
            <telerik:RadToggleButton
                    Grid.Column="1"
                    MinWidth="20"
                    IsChecked="{Binding IsCaseSensitive, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                    Visibility="{Binding MatchCaseVisibility, RelativeSource={RelativeSource TemplatedParent}}"
                    FontSize="{Binding FontSize,RelativeSource={RelativeSource TemplatedParent}}"
                    Content="aA"
                    Margin="2,0,0,0">
                <ToolTipService.ToolTip>
                    <ToolTip telerik:LocalizationManager.ResourceKey="GridViewFilterMatchCase"/>
                </ToolTipService.ToolTip>
            </telerik:RadToggleButton>
        </Grid>
    </ControlTemplate>
    <Style x:Key="AutoCompleteStringFilterEditorStyle" TargetType="grid:AutoCompleteStringFilterEditor">
        <Setter Property="Template" Value="{StaticResource AutoCompleteStringFilterEditorTemplate}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:AutoCompleteStringFilterEditor" BasedOn="{StaticResource AutoCompleteStringFilterEditorStyle}"/>
    <Style x:Key="ControlPanelItem_DropDownButtonStyle" TargetType="telerik:RadDropDownButton">
        <Setter Property="IsOpen" Value="false"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="{StaticResource DropDownButtonOuterBorder}"/>
        <Setter Property="Background" Value="{StaticResource DropDownButtonBackground}"/>
        <Setter Property="Foreground" Value="{StaticResource DropDownButtonForeground}"/>
        <Setter Property="CornerRadius" Value="{StaticResource DropDownButton_CornerRadius}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadDropDownButton">
                    <Grid SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterMouseOverBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="CommonStatesWrapper" Storyboard.TargetProperty="Opacity" To="0"/>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterPressedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="disabledBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="BackgroundVisibility">
                                <VisualState x:Name="BackgroundIsHidden">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Opacity" To="0"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="disabledBorder" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="BackgroundIsVisible"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="IsOpenState">
                                <VisualState x:Name="Closed"/>
                                <VisualState x:Name="Opened">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Opacity" To="1"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStatesGroup">
                                <VisualState x:Name="Unfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00.150">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity">
                                            <LinearDoubleKeyFrame KeyTime="00:00:00.150" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity">
                                            <LinearDoubleKeyFrame KeyTime="00:00:00.115" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="OuterBorder"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding CornerRadius}">
                            <Border
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{x:Null}"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"
                                    BorderBrush="{StaticResource ControlInnerBorder_Normal}"/>
                        </Border>
                        <Border x:Name="OuterMouseOverBorder"
                                Visibility="Collapsed"
                                Background="{StaticResource ControlBackground_MouseOver}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                BorderBrush="{StaticResource ControlOuterBorder_MouseOver}"
                                BorderThickness="{TemplateBinding BorderThickness}">
                            <Border
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{x:Null}"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"
                                    BorderBrush="{StaticResource ControlInnerBorder_MouseOver}"/>
                        </Border>
                        <Border x:Name="OuterPressedBorder"
                                Visibility="Collapsed"
                                Background="{StaticResource ControlBackground_Pressed}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                BorderBrush="{StaticResource ControlOuterBorder_MouseOver}"
                                BorderThickness="{TemplateBinding BorderThickness}">
                            <Border
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{x:Null}"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"
                                    BorderBrush="{StaticResource ControlInnerBorder_Pressed}"/>
                        </Border>
                        <Border x:Name="disabledBorder"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{StaticResource ControlInnerBorder_Disabled}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{StaticResource ControlBackground_Disabled}"
                                Visibility="Collapsed"/>
                        <Border x:Name="CheckedVisual"
                                Opacity="0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{StaticResource ControlOuterBorder_Checked}"
                                Background="{StaticResource ControlBackground_Checked}"
                                CornerRadius="{TemplateBinding CornerRadius}">
                            <Border x:Name="InnerCheckedVisual"
                                    Background="{x:Null}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"
                                    BorderBrush="{StaticResource ControlInnerBorder_Checked}"/>
                        </Border>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <ContentPresenter x:Name="Content"
                                    Grid.Row="1"
                                    Grid.Column="1"
                                    TextBlock.Foreground="{TemplateBinding Foreground}"
                                    Margin="{TemplateBinding Padding}"
                                    Content="{TemplateBinding Content}"
                                    ContentTemplate="{TemplateBinding ContentTemplate}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                    RecognizesAccessKey="True"/>
                        </Grid>
                        <Popup x:Name="DropDownPopup" SnapsToDevicePixels="True" AllowsTransparency="True" StaysOpen="False" Focusable="False" Placement="Bottom">
                            <Grid>
                                <Border x:Name="DropDownPopupBorder"
                                        BorderBrush="{StaticResource ControlOuterBorder}"
                                        Background="{StaticResource ControlBackground}"
                                        BorderThickness="1"
                                        Visibility="{Binding DropDownContent,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ControlPanelItemButtonTooltipToVisibilityConverter}}"
                                        CornerRadius="0"
                                        MinWidth="3"
                                        MinHeight="3"
                                        Width="{TemplateBinding DropDownWidth}"
                                        Height="{TemplateBinding DropDownHeight}"
                                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                                        MaxHeight="{TemplateBinding DropDownMaxHeight}"
                                        SnapsToDevicePixels="True">
                                    <ContentControl x:Name="DropDownPopupContent"
                                            Content="{TemplateBinding DropDownContent}"
                                            HorizontalContentAlignment="Stretch"
                                            VerticalContentAlignment="Stretch"
                                            ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                                            HorizontalAlignment="Stretch"
                                            VerticalAlignment="Stretch"
                                            DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                                </Border>
                            </Grid>
                        </Popup>
                        <Border x:Name="CommonStatesWrapper">
                            <Border x:Name="FocusVisual"
                                    Opacity="0"
                                    BorderThickness="1"
                                    CornerRadius="{TemplateBinding CornerRadius}"
                                    BorderBrush="{StaticResource ControlOuterBorder_Focused}"
                                    Visibility="Collapsed"
                                    Background="{StaticResource ControlBackground_Focused}">
                                <Border x:Name="FocusInnerVisual" BorderThickness="1" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Focused}"/>
                            </Border>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="ControlPanelItemControlTemplate" TargetType="grid:ControlPanelItemControl">
        <telerik:RadDropDownButton x:Name="PART_ControlPanelItemControlDropDownButton"
                DropDownContent="{Binding Content}"
                Style="{StaticResource ControlPanelItem_DropDownButtonStyle}"
                MinWidth="22"
                MinHeight="22"
                Margin="0,4,4,4"
                VerticalAlignment="Center"
                HorizontalAlignment="Center">
            <ToolTipService.ToolTip>
                <ToolTip Visibility="{Binding ButtonTooltip,Converter={StaticResource ControlPanelItemButtonTooltipToVisibilityConverter}}" Placement="Right" Content="{Binding ButtonTooltip}"/>
            </ToolTipService.ToolTip>
            <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="10" Width="10" SnapsToDevicePixels="True">
                <Rectangle Height="2" VerticalAlignment="Top" Fill="{StaticResource ControlForeground}" StrokeThickness="0"/>
                <Rectangle Margin="0,4" Height="2" Fill="{StaticResource ControlForeground}" StrokeThickness="0"/>
                <Rectangle Height="2" VerticalAlignment="Bottom" Fill="{StaticResource ControlForeground}" StrokeThickness="0"/>
            </Grid>
        </telerik:RadDropDownButton>
    </ControlTemplate>
    <Style x:Key="ControlPanelItemControlStyle" TargetType="grid:ControlPanelItemControl">
        <Setter Property="Template" Value="{StaticResource ControlPanelItemControlTemplate}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:ControlPanelItemControl" BasedOn="{StaticResource ControlPanelItemControlStyle}"/>
    <ControlTemplate x:Key="CommonColumnHeaderTemplate" TargetType="grid:CommonColumnHeader">
        <Grid x:Name="PART_HeaderCellGrid">
            <Border x:Name="GridViewHeaderCell"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <ContentPresenter x:Name="ContentPresenter"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="CommonColumnHeaderStyle" TargetType="grid:CommonColumnHeader">
        <Setter Property="Template" Value="{StaticResource CommonColumnHeaderTemplate}"/>
        <Setter Property="Background" Value="{StaticResource GridViewCommonHeader_Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridViewCommonHeader_BorderBrush}"/>
        <Setter Property="Foreground" Value="{StaticResource GridViewCommonHeader_Foreground}"/>
        <Setter Property="BorderThickness" Value="0 0 1 1"/>
        <Setter Property="MinHeight" Value="30"/>
        <Setter Property="Padding" Value="5 0 3 0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:CommonColumnHeader" BasedOn="{StaticResource CommonColumnHeaderStyle}"/>
    <ControlTemplate x:Key="CommonHeaderPresenterTemplate" TargetType="grid:CommonHeaderPresenter">
        <Border
                Visibility="{TemplateBinding Visibility}"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                HorizontalAlignment="Stretch">
            <Grid x:Name="PART_CommonHeadersContainer" Margin="0 0 0 -1" HorizontalAlignment="Left"/>
        </Border>
    </ControlTemplate>
    <Style x:Key="CommonHeaderPresenterStyle" TargetType="grid:CommonHeaderPresenter">
        <Setter Property="Template" Value="{StaticResource CommonHeaderPresenterTemplate}"/>
        <Setter Property="Background" Value="{StaticResource GridViewCommonHeader_Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridViewCommonHeader_BorderBrush}"/>
        <Setter Property="BorderThickness" Value="0 0 0 1"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:CommonHeaderPresenter" BasedOn="{StaticResource CommonHeaderPresenterStyle}"/>
    <ControlTemplate x:Key="DataCellsPresenterTemplate" TargetType="grid:DataCellsPresenter">
        <Grid>
            <ItemsPresenter/>
            <grid:FrozenColumnsSplitter HorizontalAlignment="Left" x:Name="PART_FrozenColumnsSplitter"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="DataCellsPresenterStyle" TargetType="grid:DataCellsPresenter">
        <Setter Property="Template" Value="{StaticResource DataCellsPresenterTemplate}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <grid:GridViewCellsPanel/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:DataCellsPresenter" BasedOn="{StaticResource DataCellsPresenterStyle}"/>
    <ControlTemplate x:Key="DetailsPresenterTemplate" TargetType="grid:DetailsPresenter">
        <Border x:Name="DetailsBorder" BorderThickness="0 1" BorderBrush="{StaticResource ControlOuterBorder}">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="DetailsStates">
                    <VisualState x:Name="DetailsVisible">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsBorder" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="DetailsCollapsed"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
                <ContentPresenter x:Name="PART_ContentPresenter"
                        Margin="{TemplateBinding Padding}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
            </Border>
        </Border>
    </ControlTemplate>
    <Style x:Key="DetailsPresenterStyle" TargetType="grid:DetailsPresenter">
        <Setter Property="Template" Value="{StaticResource DetailsPresenterTemplate}"/>
        <Setter Property="Visibility" Value="Collapsed"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background" Value="{StaticResource GridView_RowDetailsBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlInnerBorder}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:DetailsPresenter" BasedOn="{StaticResource DetailsPresenterStyle}"/>
    <ControlTemplate TargetType="grid:FilteringDropDown" x:Key="DistinctFilterControlTemplate">
        <Grid>
            <Button x:Name="PART_DropDownButton">
                <Button.Template>
                    <ControlTemplate TargetType="Button">
                        <ContentPresenter/>
                    </ControlTemplate>
                </Button.Template>
                <Border Cursor="Hand" Background="Transparent" Padding="3 0 0 0">
                    <Grid Width="12" Height="13" Cursor="Hand">
                        <Path
                                Fill="{StaticResource GridView_FilterIconOuterBorder}"
                                Stretch="Fill"
                                Margin="0 1 0 0"
                                Data="M5,9 L6,9 6,10 5,10 z M4,4 L5,4 5,5 5,6 5,7 5,8 5,9 4,9 4,8 4,7 4,6 4,5 z M7.9850001,3 L8.985,3 8.985,4 8,4 8,5 8,6 8,7 8,8 8,9 8,10 8,11 7.9999997,12 6.9999998,12 6.9999998,11 6,11 6,10 6.9999999,10 6.9999999,9 6.9999999,8 6.9999999,7 6.9999999,6 6.9999999,5 6.9999999,4 7.9850001,4 z M3,3 L4,3 4,4 3,4 z M9,2 L10,2 10,3 9,3 z M2,2 L3,2 3,3 2,3 z M7.9999999,0 L9,0 10,0 11,0 12,0 12,1 11,1 11,2 10,2 10,1 9,1 7.9999999,1 z M0,0 L1,0 2,0 3,0 4,0 5,0 6,0 6.9999998,0 7.9999997,0 7.9999997,1 6.9999998,1 6,1 5,1 4,1 3,1 2,1 2,2 1,2 1,1 0,1 z"/>
                        <Path
                                Fill="{StaticResource GridView_FilterIconTopBorder}"
                                Stretch="Fill"
                                Margin="2 1 2 0"
                                VerticalAlignment="Top"
                                Height="1"
                                Data="M0,0 L1,0 2,0 3.0000002,0 4.0000002,0 5.0000001,0 5.9850001,0 6.0000001,0 6.9850001,0 7.9850001,0 7.9850001,1 6.9850001,1 6.0000001,1 5.9850001,1 5.0000001,1 4.0000002,1 3.0000002,1 2,1 1,1 0,1 z"/>
                        <Path
                                Fill="{StaticResource GridView_FilterIconBackground}"
                                Stretch="Fill"
                                Margin="3 2 3 3"
                                Data="M0,0 L1,0 2,0 3,0 4,0 5,0 6,0 6,1 5,1 4.985,1 4.985,2 4,2 4,3 4,4 4,5 4,6 4,7 4,8 3,8 3,7 2,7 2,6 2,5 2,4 2,3 2,2 1,2 1,1 0,1 z"/>
                        <Path
                                Fill="{StaticResource GridView_FilterIconBackground_Filtered}"
                                Visibility="{TemplateBinding FunnelFillVisibility}"
                                Stretch="Fill"
                                Margin="3,2,3,3"
                                Data="M0,0 L1,0 2,0 3,0 4,0 5,0 6,0 6,1 5,1 4.985,1 4.985,2 4,2 4,3 4,4 4,5 4,6 4,7 4,8 3,8 3,7 2,7 2,6 2,5 2,4 2,3 2,2 1,2 1,1 0,1 z"/>
                        <Path
                                Fill="{StaticResource GridView_FilterIconInnerBorder}"
                                Stretch="Fill"
                                Margin="0 0 0 1"
                                Data="M5,9 L6,9 6,10 5,10 z M4,4 L5,4 5,5 5,6 5,7 5,8 5,9 4,9 4,8 4,7 4,6 4,5 z M7.9850001,3 L8.985,3 8.985,4 8,4 8,5 8,6 8,7 8,8 8,9 8,10 8,11 7.9999997,12 6.9999998,12 6.9999998,11 6,11 6,10 6.9999999,10 6.9999999,9 6.9999999,8 6.9999999,7 6.9999999,6 6.9999999,5 6.9999999,4 7.9850001,4 z M3,3 L4,3 4,4 3,4 z M9,2 L10,2 10,3 9,3 z M2,2 L3,2 3,3 2,3 z M7.9999999,0 L9,0 10,0 11,0 12,0 12,1 11,1 11,2 10,2 10,1 9,1 7.9999999,1 z M0,0 L1,0 2,0 3,0 4,0 5,0 6,0 6.9999998,0 7.9999997,0 7.9999997,1 6.9999998,1 6,1 5,1 4,1 3,1 2,1 2,2 1,2 1,1 0,1 z"/>
                    </Grid>
                </Border>
            </Button>
            <Popup x:Name="PART_DropDownPopup" StaysOpen="True" AllowsTransparency="True" PopupAnimation="Slide"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="FilteringDropDownStyle" TargetType="grid:FilteringDropDown">
        <Setter Property="Template" Value="{StaticResource DistinctFilterControlTemplate}"/>
    </Style>
    <Style TargetType="grid:FilteringDropDown" BasedOn="{StaticResource FilteringDropDownStyle}"/>
    <Style x:Key="DraggedElementStyle" TargetType="controls:DraggedElement">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:DraggedElement">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid>
                            <ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}"/>
                            <Grid x:Name="PART_NoCursor" Width="18" Height="18" Visibility="Collapsed" VerticalAlignment="Bottom" HorizontalAlignment="Left">
                                <Ellipse Fill="#FFFFFFFF" Stroke="#FF535353"/>
                                <Path Fill="{x:Null}" Stretch="Fill" Stroke="#FF000000" Margin="4.565 4.462 3.517 3.418" Data="M6.5000155,0.5 L0.5,6.5000704" StrokeThickness="3"/>
                                <Path Fill="{x:Null}" Stretch="Fill" Stroke="#FFCE3527" Margin="3.002 2.876 2.832 2.708" Data="M6.5000155,0.5 L0.5,6.5000704" StrokeThickness="3"/>
                                <Ellipse Fill="{x:Null}" Stroke="#FFCE3527" Margin="1.831 1.832 1.833 1.832" StrokeThickness="2"/>
                                <Path
                                        Stretch="Fill"
                                        Stroke="{x:Null}"
                                        Margin="0.999 1 1.001 8.134"
                                        Data="M16,8 C8.127,4.9999293 6.627,10.999763 0,8 0,3.581722 3.581722,0 8,0 12.418278,0 16,3.581722 16,8 z">
                                    <Path.Fill>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#99FFFFFF" Offset="0"/>
                                            <GradientStop Color="#33FFFFFF" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Path.Fill>
                                </Path>
                            </Grid>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="VerticalContentAlignment" Value="Top"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="controls:DraggedElement" BasedOn="{StaticResource DraggedElementStyle}"/>
    <Style x:Key="DistinctValueListBoxItemStyle" TargetType="ListBoxItem">
        <Setter Property="Padding" Value="3"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Top"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBoxItem">
                    <ContentPresenter x:Name="contentPresenter"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <DataTemplate x:Key="ActionTemplate">
        <TextBlock Text="{Binding Converter={StaticResource FilterOperatorConverter}}"/>
    </DataTemplate>
    <DataTemplate x:Key="LogicalOperatorTemplate">
        <TextBlock Text="{Binding Converter={StaticResource FilterCompositionLogicalOperatorConverter}}"/>
    </DataTemplate>
    <ControlTemplate x:Key="FilteringControlTemplate" TargetType="grid:FilteringControl">
        <Border BorderThickness="{TemplateBinding BorderThickness}" Margin="{TemplateBinding Margin}" CornerRadius="1" BorderBrush="{TemplateBinding BorderBrush}">
            <Border BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="1" Background="{TemplateBinding Background}">
                <Grid>
                    <StackPanel Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
                        <StackPanel x:Name="PART_DistinctFilter" Visibility="{TemplateBinding DistinctFiltersVisibility}">
                            <CheckBox x:Name="PART_SelectAllCheckBox" IsChecked="{Binding SelectAll, Mode=TwoWay}" Margin="0 2" telerik:LocalizationManager.ResourceKey="GridViewFilterSelectAll"/>
                            <ListBox x:Name="PART_DistinctValuesList"
                                    ItemsSource="{Binding DistinctValues}"
                                    ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                    SelectionMode="Multiple"
                                    ItemContainerStyle="{StaticResource DistinctValueListBoxItemStyle}">
                                <ListBox.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <VirtualizingStackPanel MaxHeight="242"/>
                                    </ItemsPanelTemplate>
                                </ListBox.ItemsPanel>
                                <ListBox.ItemTemplate>
                                    <DataTemplate>
                                        <CheckBox IsChecked="{Binding IsActive, Mode=TwoWay}">
                                            <TextBlock Text="{Binding ConvertedValue, Converter={StaticResource DistinctValueConverter}}" Foreground="{StaticResource ControlForeground}" VerticalAlignment="Center"/>
                                        </CheckBox>
                                    </DataTemplate>
                                </ListBox.ItemTemplate>
                            </ListBox>
                        </StackPanel>
                        <StackPanel Margin="0 2" Visibility="{TemplateBinding FieldFiltersVisibility}">
                            <TextBlock telerik:LocalizationManager.ResourceKey="GridViewFilterShowRowsWithValueThat" Margin="0 2 0 0"/>
                            <input:RadComboBox x:Name="PART_Filter1ComboBox"
                                    Margin="0 2 0 2"
                                    ItemTemplate="{StaticResource ActionTemplate}"
                                    ItemsSource="{Binding AvailableActions}"
                                    SelectedItem="{Binding Filter1.Operator, Mode=TwoWay}"/>
                            <ContentControl x:Name="PART_Filter1ContentControl"
                                    DataContext="{Binding Filter1}"
                                    Margin="0 2"
                                    IsEnabled="{Binding Operator, Converter={StaticResource FilterOperatorToFilterEditorIsEnabledConverter}}"
                                    HorizontalContentAlignment="Stretch"
                                    VerticalContentAlignment="Stretch"/>
                            <input:RadComboBox x:Name="PART_LogicalOperatorsComboBox"
                                    Margin="0 2"
                                    ItemTemplate="{StaticResource LogicalOperatorTemplate}"
                                    ItemsSource="{Binding LogicalOperators}"
                                    SelectedItem="{Binding FieldFilterLogicalOperator, Mode=TwoWay}"/>
                            <input:RadComboBox x:Name="PART_Filter2ComboBox"
                                    Margin="0 2"
                                    ItemTemplate="{StaticResource ActionTemplate}"
                                    ItemsSource="{Binding AvailableActions}"
                                    SelectedItem="{Binding Filter2.Operator, Mode=TwoWay}"/>
                            <ContentControl x:Name="PART_Filter2ContentControl"
                                    DataContext="{Binding Filter2}"
                                    Margin="0 2"
                                    IsEnabled="{Binding Operator, Converter={StaticResource FilterOperatorToFilterEditorIsEnabledConverter}}"
                                    HorizontalContentAlignment="Stretch"
                                    VerticalContentAlignment="Stretch"/>
                        </StackPanel>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <Button x:Name="PART_ApplyFilterButton"
                                    Grid.Column="0"
                                    Margin="0 2 2 2"
                                    Height="22"
                                    Visibility="{TemplateBinding FilterButtonVisibility}"
                                    telerik:LocalizationManager.ResourceKey="GridViewFilter"/>
                            <Button x:Name="PART_ClearFilterButton" Grid.Column="1" Margin="2 2 0 2" Height="22" telerik:LocalizationManager.ResourceKey="GridViewClearFilter"/>
                        </Grid>
                    </StackPanel>
                    <telerik:RadButton x:Name="PART_FilterCloseButton" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="{TemplateBinding Padding}" Height="13" Width="13">
                        <Path
                                Data="M4,4L5,4 5,5 4,5z M0,4L1,4 1,5 0,5z M3,3L4,3 4,4 3,4z M1,3L2,3 2,4 1,4z M2,2L3,2 3,3 2,3z M4,0L5,0 5,1 4,1 4,2 3,2 3,0.99999994 4,0.99999994z M0,0L1,0 1,0.99999994 2,0.99999994 2,2 1,2 1,1 0,1z"
                                Fill="{StaticResource GridView_IndicatorPrimaryColor}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                Height="6"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Width="6"/>
                    </telerik:RadButton>
                </Grid>
            </Border>
        </Border>
    </ControlTemplate>
    <Style x:Key="FilteringControlStyle" TargetType="grid:FilteringControl">
        <Setter Property="Template" Value="{StaticResource FilteringControlTemplate}"/>
        <Setter Property="Background" Value="{StaticResource GridView_FilteringControlBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_FilteringControlOuterBorder}"/>
        <Setter Property="Padding" Value="5"/>
        <Setter Property="Width" Value="200"/>
        <Setter Property="Margin" Value="0 2 0 0"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Foreground" Value="{StaticResource ControlForeground}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:FilteringControl" BasedOn="{StaticResource FilteringControlStyle}"/>
    <DataTemplate x:Key="FilterOperatorItemTemplate">
        <TextBlock Text="{Binding Converter={StaticResource FilterOperatorConverter}}"/>
    </DataTemplate>
    <Style x:Key="FieldFilterDropDownButtonStyle" TargetType="telerik:RadDropDownButton">
        <Setter Property="IsOpen" Value="false"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadDropDownButton">
                    <Grid>
                        <ContentPresenter x:Name="Content"
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                Content="{TemplateBinding Content}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                Margin="{TemplateBinding Padding}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        <Popup x:Name="DropDownPopup">
                            <ContentPresenter x:Name="DropDownPopupContent"
                                    ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                                    Content="{TemplateBinding DropDownContent}"
                                    DataContext="{Binding DataContext, RelativeSource={RelativeSource TemplatedParent}}"
                                    HorizontalAlignment="Stretch"
                                    VerticalAlignment="Stretch"/>
                        </Popup>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="FieldFilterControlTemplate" TargetType="grid:FieldFilterControl">
        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid x:Name="PART_MainGrid">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <ContentControl x:Name="PART_FilterEditorContentControl"
                        Grid.Column="0"
                        IsEnabled="{Binding EditorIsEnabled}"
                        HorizontalContentAlignment="Stretch"
                        VerticalContentAlignment="Stretch"
                        Margin="2 1 0 2"/>
                <telerik:RadDropDownButton x:Name="PART_DropDownButton" Grid.Column="1" KeepOpen="False" Style="{StaticResource FieldFilterDropDownButtonStyle}" DropDownIndicatorVisibility="Collapsed">
                    <Border Cursor="Hand" Background="Transparent" Padding="3 0 0 0">
                        <Grid Width="12" Height="13" Cursor="Hand">
                            <Path
                                    Fill="{StaticResource GridView_FilterIconOuterBorder}"
                                    Stretch="Fill"
                                    Margin="0 1 0 0"
                                    Data="M5,9 L6,9 6,10 5,10 z M4,4 L5,4 5,5 5,6 5,7 5,8 5,9 4,9 4,8 4,7 4,6 4,5 z M7.9850001,3 L8.985,3 8.985,4 8,4 8,5 8,6 8,7 8,8 8,9 8,10 8,11 7.9999997,12 6.9999998,12 6.9999998,11 6,11 6,10 6.9999999,10 6.9999999,9 6.9999999,8 6.9999999,7 6.9999999,6 6.9999999,5 6.9999999,4 7.9850001,4 z M3,3 L4,3 4,4 3,4 z M9,2 L10,2 10,3 9,3 z M2,2 L3,2 3,3 2,3 z M7.9999999,0 L9,0 10,0 11,0 12,0 12,1 11,1 11,2 10,2 10,1 9,1 7.9999999,1 z M0,0 L1,0 2,0 3,0 4,0 5,0 6,0 6.9999998,0 7.9999997,0 7.9999997,1 6.9999998,1 6,1 5,1 4,1 3,1 2,1 2,2 1,2 1,1 0,1 z"/>
                            <Path
                                    Fill="{StaticResource GridView_FilterIconTopBorder}"
                                    Stretch="Fill"
                                    Margin="2 1 2 0"
                                    VerticalAlignment="Top"
                                    Height="1"
                                    Data="M0,0 L1,0 2,0 3.0000002,0 4.0000002,0 5.0000001,0 5.9850001,0 6.0000001,0 6.9850001,0 7.9850001,0 7.9850001,1 6.9850001,1 6.0000001,1 5.9850001,1 5.0000001,1 4.0000002,1 3.0000002,1 2,1 1,1 0,1 z"/>
                            <Path
                                    Fill="{StaticResource GridView_FilterIconBackground}"
                                    Stretch="Fill"
                                    Margin="3 2 3 3"
                                    Data="M0,0 L1,0 2,0 3,0 4,0 5,0 6,0 6,1 5,1 4.985,1 4.985,2 4,2 4,3 4,4 4,5 4,6 4,7 4,8 3,8 3,7 2,7 2,6 2,5 2,4 2,3 2,2 1,2 1,1 0,1 z"/>
                            <Path
                                    Fill="{StaticResource GridView_FilterIconBackground_Filtered}"
                                    Visibility="{Binding FunnelFillVisibility}"
                                    Stretch="Fill"
                                    Margin="3,2,3,3"
                                    Data="M0,0 L1,0 2,0 3,0 4,0 5,0 6,0 6,1 5,1 4.985,1 4.985,2 4,2 4,3 4,4 4,5 4,6 4,7 4,8 3,8 3,7 2,7 2,6 2,5 2,4 2,3 2,2 1,2 1,1 0,1 z"/>
                            <Path
                                    Fill="{StaticResource GridView_FilterIconInnerBorder}"
                                    Stretch="Fill"
                                    Margin="0 0 0 1"
                                    Data="M5,9 L6,9 6,10 5,10 z M4,4 L5,4 5,5 5,6 5,7 5,8 5,9 4,9 4,8 4,7 4,6 4,5 z M7.9850001,3 L8.985,3 8.985,4 8,4 8,5 8,6 8,7 8,8 8,9 8,10 8,11 7.9999997,12 6.9999998,12 6.9999998,11 6,11 6,10 6.9999999,10 6.9999999,9 6.9999999,8 6.9999999,7 6.9999999,6 6.9999999,5 6.9999999,4 7.9850001,4 z M3,3 L4,3 4,4 3,4 z M9,2 L10,2 10,3 9,3 z M2,2 L3,2 3,3 2,3 z M7.9999999,0 L9,0 10,0 11,0 12,0 12,1 11,1 11,2 10,2 10,1 9,1 7.9999999,1 z M0,0 L1,0 2,0 3,0 4,0 5,0 6,0 6.9999998,0 7.9999997,0 7.9999997,1 6.9999998,1 6,1 5,1 4,1 3,1 2,1 2,2 1,2 1,1 0,1 z"/>
                        </Grid>
                    </Border>
                    <telerik:RadDropDownButton.DropDownContent>
                        <ListBox x:Name="PART_FilterOperatorsListBox" ItemsSource="{Binding AvailableOperatorViewModels}" SelectedItem="{Binding SelectedOperatorViewModel, Mode=TwoWay}"/>
                    </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="FieldFilterControlStyle" TargetType="grid:FieldFilterControl">
        <Setter Property="Template" Value="{StaticResource FieldFilterControlTemplate}"/>
        <Setter Property="BorderThickness" Value="0 0 1 0"/>
        <Setter Property="MinHeight" Value="26"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:FieldFilterControl" BasedOn="{StaticResource FieldFilterControlStyle}"/>
    <ControlTemplate x:Key="FrozenColumnsSplitterTemplate" TargetType="grid:FrozenColumnsSplitter">
        <Border Width="6" BorderThickness="1 0 0 0" BorderBrush="{TemplateBinding BorderBrush}">
            <Border Margin="0" BorderThickness="0 0 2 0" Background="{TemplateBinding Background}"/>
        </Border>
    </ControlTemplate>
    <Style x:Key="FrozenColumnsSplitterStyle" TargetType="grid:FrozenColumnsSplitter">
        <Setter Property="Template" Value="{StaticResource FrozenColumnsSplitterTemplate}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background" Value="{StaticResource GridView_FrozenColumnBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_FrozenColumnBorder}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:FrozenColumnsSplitter" BasedOn="{StaticResource FrozenColumnsSplitterStyle}"/>
    <ControlTemplate x:Key="GridViewAggregateResultCellTemplate" TargetType="grid:GridViewAggregateResultCell">
        <StackPanel
                Orientation="Horizontal"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                Margin="{TemplateBinding Padding}"
                Background="{TemplateBinding Background}">
            <TextBlock Margin="10 0 0 0" TextAlignment="Right" VerticalAlignment="Center" Text="{Binding Caption}"/>
            <TextBlock Margin="3 0" TextAlignment="Right" VerticalAlignment="Center" Text="{Binding FormattedValue}"/>
        </StackPanel>
    </ControlTemplate>
    <Style x:Key="GridViewAggregateResultCellStyle" TargetType="grid:GridViewAggregateResultCell">
        <Setter Property="Template" Value="{StaticResource GridViewAggregateResultCellTemplate}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewAggregateResultCell" BasedOn="{StaticResource GridViewAggregateResultCellStyle}"/>
    <Style x:Key="FocusVisualStyle">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border Margin="1 1 2 2" BorderThickness="1" CornerRadius="1" BorderBrush="{StaticResource ControlOuterBorder}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="GridViewCell_ValidationToolTipTemplate" TargetType="ToolTip">
        <Grid x:Name="Root" Margin="5 0" Opacity="0" RenderTransformOrigin="0,0">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0"/>
                        <VisualTransition GeneratedDuration="0:0:0.2" To="Open">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualTransition>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Closed">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Open">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RenderTransform>
                <TranslateTransform x:Name="xform" X="-25"/>
            </Grid.RenderTransform>
            <ItemsControl ItemsSource="{TemplateBinding Content}">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Border
                                MinHeight="22"
                                Background="{StaticResource GridView_ValidationTooltipBackground}"
                                BorderBrush="{StaticResource GridView_ValidationTooltipOuterBorder}"
                                BorderThickness="1"
                                CornerRadius="{StaticResource GridView_ValidationTooltipCornerRadius}">
                            <Border BorderBrush="{StaticResource GridView_ValidationTooltipInnerBorder}" BorderThickness="1">
                                <TextBlock Margin="4 1" MaxWidth="250" Foreground="{StaticResource GridView_ValidationTooltipForeground}" Text="{Binding}" TextWrapping="Wrap"/>
                            </Border>
                        </Border>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="GridViewCellTemplate" TargetType="grid:GridViewCell">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="SelectionStates">
                    <VisualState x:Name="Unselected"/>
                    <VisualState x:Name="Selected">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Selected" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="Current">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Current" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Over" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="EditingStates">
                    <VisualState x:Name="Edited">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter" Storyboard.TargetProperty="VerticalAlignment">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <VerticalAlignment>Stretch</VerticalAlignment>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_CellBorder" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource GridView_CellBackground_Edited}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Display"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="DisabledStates">
                    <VisualState x:Name="Enabled"/>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_CellBorder" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.4"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.7"/>
                            </DoubleAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Disabled" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ValueStates">
                    <VisualState x:Name="CellValid"/>
                    <VisualState x:Name="CellInvalid">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Invalid" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="CellInvalidUnfocused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Invalid_Unfocused" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="PART_CellBorder"
                    Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"
                    BorderBrush="{TemplateBinding VerticalGridLinesBrush}"
                    BorderThickness="{Binding VerticalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Right}"/>
            <Border x:Name="Background_Over"
                    Margin="1 1 2 2"
                    BorderThickness="1"
                    CornerRadius="1"
                    BorderBrush="{StaticResource ItemOuterBorder_Over}"
                    Grid.Column="2"
                    Grid.ColumnSpan="2"
                    Visibility="Collapsed">
                <Border BorderThickness="1" BorderBrush="{StaticResource ItemInnerBorder_Over}" Background="{StaticResource ItemBackground_Over}"/>
            </Border>
            <Border x:Name="Background_Selected"
                    Margin="1 1 2 2"
                    BorderThickness="1"
                    CornerRadius="1"
                    BorderBrush="{StaticResource ItemOuterBorder_Selected}"
                    Grid.Column="2"
                    Grid.ColumnSpan="2"
                    Visibility="Collapsed">
                <Border BorderThickness="1" BorderBrush="{StaticResource ItemInnerBorder_Selected}" Background="{StaticResource ItemBackground_Selected}"/>
            </Border>
            <Border x:Name="Background_Current"
                    Margin="1 1 2 2"
                    BorderThickness="1"
                    CornerRadius="1"
                    BorderBrush="{StaticResource ControlOuterBorder}"
                    Grid.Column="2"
                    Grid.ColumnSpan="2"
                    Visibility="Collapsed"/>
            <Border x:Name="Background_Invalid"
                    Background="{StaticResource ItemBackground}"
                    Margin="1 1 2 2"
                    BorderThickness="1"
                    CornerRadius="1"
                    BorderBrush="{StaticResource ControlOuterBorder_Invalid}"
                    Grid.Column="2"
                    Grid.ColumnSpan="2"
                    Visibility="Collapsed">
                <ToolTipService.ToolTip>
                    <ToolTip x:Name="validationTooltip" Placement="Right" Content="{TemplateBinding Errors}" Template="{StaticResource GridViewCell_ValidationToolTipTemplate}"/>
                </ToolTipService.ToolTip>
                <Grid Height="12" HorizontalAlignment="Right" Margin="1 -4 -4 0" VerticalAlignment="Top" Width="12" Background="Transparent">
                    <Path Fill="{StaticResource ControlOuterBorder_Invalid}" Margin="1 3 0 0" Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z"/>
                    <Path Fill="{StaticResource ControlInnerBorder_Invalid}" Margin="1 3 0 0" Data="M 0,0 L2,0 L 8,6 L8,8"/>
                </Grid>
            </Border>
            <Border x:Name="Background_Invalid_Unfocused"
                    Margin="1 1 1 2"
                    BorderThickness="1"
                    CornerRadius="1"
                    Visibility="Collapsed"
                    BorderBrush="{StaticResource ItemOuterBorder_Invalid}"
                    Grid.Column="2"
                    Grid.ColumnSpan="2"
                    Opacity="1">
                <Border BorderThickness="1" BorderBrush="{StaticResource ItemInnerBorder_Invalid}" Background="{StaticResource ItemBackground_Invalid}"/>
            </Border>
            <Border x:Name="Background_Disabled"
                    BorderThickness="1"
                    Margin="0 0 1 1"
                    Background="{StaticResource ItemBackground_Disabled}"
                    BorderBrush="{StaticResource ItemInnerBorder_Disabled}"
                    Grid.Column="2"
                    Grid.ColumnSpan="2"
                    Visibility="Collapsed"/>
            <ContentPresenter x:Name="PART_ContentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Content="{TemplateBinding Content}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="GridViewCellStyle" TargetType="grid:GridViewCell">
        <Setter Property="Template" Value="{StaticResource GridViewCellTemplate}"/>
        <Setter Property="Padding" Value="5 0 3 0"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
        <Setter Property="BorderThickness" Value="0 0 1 0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisualStyle}"/>
    </Style>
    <Style TargetType="grid:GridViewCell" BasedOn="{StaticResource GridViewCellStyle}"/>
    <Style x:Key="ColumnHeaderGripperStyle" 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 TargetType="ContentControl" x:Key="StretchedContentControl">
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    </Style>
    <ControlTemplate x:Key="GridViewHeaderCellTemplate" TargetType="grid:GridViewHeaderCell">
        <Grid x:Name="PART_OuterGrid">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="00:00:00.2000000" To="Normal"/>
                        <VisualTransition GeneratedDuration="00:00:00.2000000" To="MouseOver"/>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="GridViewHeaderCell_Over" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource GridView_HeaderForeground_Selected}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Ascending">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource GridView_HeaderForeground_Selected}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_SortIndicator" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="GridViewHeaderCell_Selected" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Descending">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource GridView_HeaderForeground_Selected}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_SortIndicator" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_SortIndicator" Storyboard.TargetProperty="RenderTransform">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <ScaleTransform ScaleX="1" ScaleY="-1"/>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="GridViewHeaderCell_Selected" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid x:Name="PART_HeaderCellGrid" MinHeight="26">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="GridViewHeaderCell" Grid.ColumnSpan="2" Margin="1 0 0 0" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                    <Border BorderBrush="{StaticResource GridView_HeaderInnerBorder}" Background="{TemplateBinding Background}" BorderThickness="1"/>
                </Border>
                <Border x:Name="GridViewHeaderCell_Over"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource GridView_HeaderOuterBorder_Over}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Opacity="0">
                    <Border BorderBrush="{StaticResource GridView_HeaderInnerBorder_Over}" Background="{StaticResource GridView_HeaderBackground_Over}" BorderThickness="1"/>
                </Border>
                <Border x:Name="GridViewHeaderCell_Selected"
                        Grid.ColumnSpan="2"
                        BorderBrush="{StaticResource GridView_HeaderOuterBorder_Selected}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Opacity="0">
                    <Border BorderBrush="{StaticResource GridView_HeaderInnerBorder_Selected}" Background="{StaticResource GridView_HeaderBackground_Selected}" BorderThickness="1"/>
                </Border>
                <ContentControl x:Name="ContentPresenter"
                        Grid.Column="0"
                        Foreground="{TemplateBinding Foreground}"
                        Style="{StaticResource StretchedContentControl}"
                        Margin="{TemplateBinding Padding}"
                        IsTabStop="{TemplateBinding IsTabStop}"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
                <Path x:Name="PART_SortIndicator"
                        Grid.ColumnSpan="2"
                        Fill="{StaticResource GridView_SortIndicatorColor}"
                        Stretch="Fill"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Top"
                        Margin="0 3 0 0"
                        Data="M256,328 L248,336 264,336"
                        Width="5"
                        Height="3"
                        RenderTransformOrigin=".5,.5"
                        Opacity="0"
                        SnapsToDevicePixels="True">
                    <Path.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform ScaleX="1" ScaleY="1"/>
                            <SkewTransform AngleX="0" AngleY="0"/>
                            <RotateTransform Angle="0"/>
                            <TranslateTransform X="0" Y="0"/>
                        </TransformGroup>
                    </Path.RenderTransform>
                </Path>
                <ContentControl
                        Content="{Binding SortingIndex, Converter={StaticResource SortingIndexConverter},RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding SortingIndex, Converter={StaticResource SortingIndexToVisibilityConverter},RelativeSource={RelativeSource TemplatedParent}}"
                        Grid.ColumnSpan="2"
                        FontSize="7"
                        IsTabStop="{TemplateBinding IsTabStop}"
                        Foreground="{StaticResource GridView_SortIndicatorColor}"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Top"
                        Margin="14,0,0,0"/>
                <grid:FilteringDropDown x:Name="PART_DistinctFilterControl" Grid.Column="1" Visibility="{TemplateBinding FilteringUIVisibility}" Margin="0 0 4 0"/>
                <Thumb x:Name="PART_LeftHeaderGripper"
                        HorizontalAlignment="Left"
                        IsTabStop="{TemplateBinding IsTabStop}"
                        Style="{StaticResource ColumnHeaderGripperStyle}"
                        Grid.ColumnSpan="2"/>
                <Thumb x:Name="PART_RightHeaderGripper"
                        HorizontalAlignment="Right"
                        IsTabStop="{TemplateBinding IsTabStop}"
                        Style="{StaticResource ColumnHeaderGripperStyle}"
                        Grid.ColumnSpan="2"/>
            </Grid>
            <grid:FieldFilterControl x:Name="PART_FieldFilterControl" Visibility="{TemplateBinding FieldFilterControlVisibility}" Grid.Row="1"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="GridViewHeaderCellStyle" TargetType="grid:GridViewHeaderCell">
        <Setter Property="Template" Value="{StaticResource GridViewHeaderCellTemplate}"/>
        <Setter Property="Background" Value="{StaticResource GridView_HeaderBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_HeaderOuterBorder}"/>
        <Setter Property="BorderThickness" Value="0 0 1 1"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Padding" Value="5 0 3 0"/>
        <Setter Property="DropIndicatorBrush" Value="{StaticResource GridViewHeaderCellDropMarkerPenBrush}"/>
        <Setter Property="DropIndicatorThickness" Value="2"/>
        <Setter Property="Foreground" Value="{StaticResource GridView_HeaderForeground}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewHeaderCell" BasedOn="{StaticResource GridViewHeaderCellStyle}"/>
    <ControlTemplate x:Key="GridViewFooterCellTemplate" TargetType="grid:GridViewFooterCell">
        <Border x:Name="PART_FooterCellBorder"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter
                    Margin="{TemplateBinding Padding}"
                    Content="{TemplateBinding Content}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
        </Border>
    </ControlTemplate>
    <Style x:Key="GridViewFooterCellStyle" TargetType="grid:GridViewFooterCell">
        <Setter Property="Template" Value="{StaticResource GridViewFooterCellTemplate}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="BorderThickness" Value="0 0 1 0"/>
        <Setter Property="Padding" Value="5 0 2 0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewFooterCell" BasedOn="{StaticResource GridViewFooterCellStyle}"/>
    <ControlTemplate x:Key="GridViewGroupFooterCellTemplate" TargetType="grid:GridViewGroupFooterCell">
        <Border x:Name="PART_FooterCellBorder"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter
                    Margin="{TemplateBinding Padding}"
                    Content="{TemplateBinding Content}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
        </Border>
    </ControlTemplate>
    <Style x:Key="GridViewGroupFooterCellStyle" TargetType="grid:GridViewGroupFooterCell">
        <Setter Property="Template" Value="{StaticResource GridViewGroupFooterCellTemplate}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="BorderThickness" Value="0 0 1 0"/>
        <Setter Property="Padding" Value="5 0 2 0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewGroupFooterCell" BasedOn="{StaticResource GridViewGroupFooterCellStyle}"/>
    <Style x:Key="GridViewIndentCellStyle" TargetType="grid:GridViewIndentCell">
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="Background" Value="{StaticResource GridView_IndentCellBackground}"/>
        <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="grid:GridViewIndentCell">
                    <Border
                            BorderBrush="{TemplateBinding BorderBrush}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Width="25">
                        <Border BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="1 0" Background="{TemplateBinding Background}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="grid:GridViewIndentCell" BasedOn="{StaticResource GridViewIndentCellStyle}"/>
    <Style x:Key="GridViewFooterIndentCellStyle" TargetType="grid:GridViewFooterIndentCell">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="grid:GridViewFooterIndentCell">
                    <Border
                            Width="25"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Background="{TemplateBinding Background}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Margin="{TemplateBinding Margin}"
                            Padding="{TemplateBinding Padding}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderThickness" Value="0 0 1 0"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewFooterIndentCell" BasedOn="{StaticResource GridViewFooterIndentCellStyle}"/>
    <Style x:Key="GridViewGroupFooterIndentCellStyle" TargetType="grid:GridViewGroupFooterIndentCell">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="grid:GridViewGroupFooterIndentCell">
                    <Border
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Padding="{TemplateBinding Padding}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Width="25">
                        <Border BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="1 0" Background="{TemplateBinding Background}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="BorderThickness" Value="0 0 1 0"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    </Style>
    <Style TargetType="grid:GridViewGroupFooterIndentCell" BasedOn="{StaticResource GridViewGroupFooterIndentCellStyle}"/>
    <Style x:Key="GridViewHeaderIndentCellStyle" TargetType="grid:GridViewHeaderIndentCell">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="grid:GridViewHeaderIndentCell">
                    <Border x:Name="OuterBorder"
                            Width="25"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <Border x:Name="InnerBorder" BorderBrush="{StaticResource GridView_HeaderInnerBorder}" Background="{TemplateBinding Background}" BorderThickness="1"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderThickness" Value="0 0 1 1"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_HeaderRowOuterBorder}"/>
        <Setter Property="Background" Value="{StaticResource GridView_HeaderRowBackground}"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewHeaderIndentCell" BasedOn="{StaticResource GridViewHeaderIndentCellStyle}"/>
    <ControlTemplate x:Key="GridViewRow_ValidationToolTipTemplate" TargetType="ToolTip">
        <Grid x:Name="Root" Margin="5 0" Opacity="0" RenderTransformOrigin="0,0">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0"/>
                        <VisualTransition GeneratedDuration="0:0:0.2" To="Open">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualTransition>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Closed">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Open">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RenderTransform>
                <TranslateTransform x:Name="xform" X="-25"/>
            </Grid.RenderTransform>
            <ItemsControl ItemsSource="{TemplateBinding Content}">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Border
                                MinHeight="22"
                                Background="{StaticResource GridView_ValidationTooltipBackground}"
                                BorderBrush="{StaticResource GridView_ValidationTooltipOuterBorder}"
                                BorderThickness="1"
                                CornerRadius="{StaticResource GridView_ValidationTooltipCornerRadius}">
                            <Border BorderBrush="{StaticResource GridView_ValidationTooltipInnerBorder}" BorderThickness="1">
                                <TextBlock Margin="4 1" MaxWidth="250" Foreground="{StaticResource GridView_ValidationTooltipForeground}" Text="{Binding}" TextWrapping="Wrap"/>
                            </Border>
                        </Border>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="GridViewRowTemplate" TargetType="grid:GridViewRow">
        <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Unfocused"/>
                    <VisualState x:Name="Focused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NavigatorIndicator" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="SelectionStates">
                    <VisualState x:Name="Unselected"/>
                    <VisualState x:Name="SelectedUnfocused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Over" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Over" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ItemOuterBorder_SelectedUnfocused}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundInner_Over" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ItemBackground_SelectedUnfocused}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundInner_Over" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ItemInnerBorder_SelectedUnfocused}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Over" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Selected">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Selected" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NavigatorIndicatorBackground" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource GridView_RowIndicatorCellBackground_Selected}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ValueStates">
                    <VisualState x:Name="RowValid"/>
                    <VisualState x:Name="RowInvalid">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Invalid" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ErrorIndicator" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="EditStates">
                    <VisualState x:Name="ReadOnlyMode"/>
                    <VisualState x:Name="EditMode">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="EditIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="InvalidEditMode">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Invalid" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InvalidEditableIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <grid:SelectiveScrollingGrid x:Name="grid">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Border x:Name="SelectionBackground"
                        Grid.Column="2"
                        Grid.ColumnSpan="2"
                        Background="{TemplateBinding Background}"
                        Margin="{TemplateBinding Margin}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        Padding="{TemplateBinding Padding}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"/>
                <Border x:Name="Background_Over"
                        Margin="1 1 1 2"
                        BorderThickness="1"
                        CornerRadius="1"
                        BorderBrush="{StaticResource ItemOuterBorder_Over}"
                        Grid.Column="2"
                        Grid.ColumnSpan="2"
                        Visibility="Collapsed"
                        grid:SelectiveScrollingGrid.SelectiveScrollingClip="True">
                    <Border x:Name="BackgroundInner_Over" BorderThickness="1" BorderBrush="{StaticResource ItemInnerBorder_Over}" Background="{StaticResource ItemBackground_Over}"/>
                </Border>
                <Border x:Name="Background_Selected"
                        Margin="1 1 1 2"
                        BorderThickness="1"
                        CornerRadius="1"
                        BorderBrush="{StaticResource ItemOuterBorder_Selected}"
                        Grid.Column="2"
                        Grid.ColumnSpan="2"
                        Visibility="Collapsed"
                        grid:SelectiveScrollingGrid.SelectiveScrollingClip="True">
                    <Border BorderThickness="1" BorderBrush="{StaticResource ItemInnerBorder_Selected}" Background="{StaticResource ItemBackground_Selected}"/>
                </Border>
                <Border x:Name="Background_Invalid"
                        Margin="1 1 1 2"
                        BorderThickness="1"
                        CornerRadius="1"
                        BorderBrush="{StaticResource ItemOuterBorder_Invalid}"
                        Grid.Column="2"
                        Grid.ColumnSpan="2"
                        Visibility="Collapsed"
                        grid:SelectiveScrollingGrid.SelectiveScrollingClip="True">
                    <Border BorderThickness="1" BorderBrush="{StaticResource ItemInnerBorder_Invalid}" Background="{StaticResource ItemBackground_Invalid}"/>
                </Border>
                <controls:GridViewToggleButton
                        Grid.Column="2"
                        x:Name="PART_HierarchyExpandButton"
                        Width="25"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                        Opacity="{Binding IsExpandable, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToOpacityConverter}}"
                        IsHitTestVisible="{Binding IsExpandable, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding HasHierarchy, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                        IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                        IsTabStop="{TemplateBinding IsTabStop}"/>
                <Border Grid.Column="2" grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{Binding HasHierarchy, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"/>
                <grid:DataCellsPresenter Grid.Column="3" x:Name="PART_DataCellsPresenter"/>
                <Border x:Name="PART_RowBorder"
                        BorderBrush="{TemplateBinding HorizontalGridLinesBrush}"
                        BorderThickness="{Binding HorizontalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Bottom}"
                        Grid.ColumnSpan="4"
                        Grid.Column="1"
                        Grid.RowSpan="4"
                        VerticalAlignment="Bottom"
                        grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"/>
                <Border
                        Background="{StaticResource GridView_HierarchyBackground}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                        Grid.Column="2"
                        Grid.Row="2"
                        Grid.ColumnSpan="2"
                        Padding="6"
                        BorderBrush="{StaticResource ControlOuterBorder}"
                        BorderThickness="0,1"
                        Visibility="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}">
                    <ContentPresenter x:Name="PART_HierarchyChildPresenter" grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"/>
                </Border>
                <grid:DetailsPresenter x:Name="PART_DetailsPresenter"
                        grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                        Grid.Column="2"
                        Grid.ColumnSpan="2"
                        Grid.Row="1"
                        DetailsProvider="{TemplateBinding DetailsProvider}"/>
                <grid:IndentPresenter x:Name="PART_IndentPresenter"
                        IndentLevel="{TemplateBinding IndentLevel}"
                        Grid.Column="1"
                        Grid.RowSpan="4"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
                <Border x:Name="PART_IndicatorPresenter"
                        Width="25"
                        VerticalAlignment="Stretch"
                        Grid.Column="0"
                        Visibility="{TemplateBinding RowIndicatorVisibility}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                        Grid.RowSpan="3"
                        BorderBrush="{StaticResource ControlOuterBorder}"
                        BorderThickness="0 0 1 1">
                    <Border x:Name="NavigatorIndicatorBackground"
                            Background="{StaticResource GridView_RowIndicatorCellBackground}"
                            BorderBrush="{StaticResource ControlInnerBorder}"
                            BorderThickness="1">
                        <Grid>
                            <Grid x:Name="NavigatorIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="11" Height="11" Visibility="Collapsed">
                                <Path
                                        Stretch="Fill"
                                        Data="F1 M 32.0234,6.66669L 24.2923,0.0248413L 28.3697,0.0248413L 32,3.14362L 36.1492,6.70819L 32,10.2728L 28.4664,13.3085L 24.2923,13.3085L 32.0234,6.66669 Z"
                                        Margin="0"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Width="8"
                                        Height="8"
                                        Fill="{StaticResource GridView_NavigatorIndicatorBackground}"/>
                            </Grid>
                            <Grid x:Name="EditIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="10" Visibility="Collapsed">
                                <Path Fill="{StaticResource GridView_EditIndicatorBackground1}" Stretch="Fill" Data="M14,9 L15,9 15,10 14,10 z M1,9 L2,9 2,10 1,10 z M15,8 L16,8 16,9 15,9 z M0,8 L1,8 1,9 0,9 z M15,1 L16,1 16,2 15,2 z M0,1 L1,1 1,2 0,2 z M14,0 L15,0 15,1 14,1 z M1,0 L2,0 2,1 1,1 z"/>
                                <Path
                                        Fill="{StaticResource GridView_EditIndicatorBackground2}"
                                        Stretch="Fill"
                                        Margin="1"
                                        Data="M0.99999994,6.9999995 L2,6.9999995 3,6.9999995 4,6.9999995 5,6.9999995 6,6.9999995 7,6.9999995 8,6.9999995 9,6.9999995 10,6.9999995 11,6.9999995 12,6.9999995 13,6.9999995 13,7.9999995 12,7.9999995 11,7.9999995 10,7.9999995 9,7.9999995 8,7.9999995 7,7.9999995 6,7.9999995 5,7.9999995 4,7.9999995 3,7.9999995 2,7.9999995 0.99999994,7.9999995 z M13,0.99999994 L14,0.99999994 14,1.9999999 14,2.9999995 14,3.9999995 14,4.9999995 14,5.9999995 14,6.9999995 13,6.9999995 13,5.9999995 13,4.9999995 13,3.9999995 13,2.9999995 13,1.9999999 z M0,0.99999994 L0.99999994,0.99999994 0.99999994,1.9999999 0.99999994,2.9999995 0.99999994,3.9999995 0.99999994,4.9999995 0.99999994,5.9999995 0.99999994,6.9999995 0,6.9999995 0,5.9999995 0,4.9999995 0,3.9999995 0,2.9999995 0,1.9999999 z M11,0 L12,0 13,0 13,0.99999994 12,0.99999994 11,0.99999994 10,0.99999994 9,0.99999994 8,0.99999994 7,0.99999994 6,0.99999994 5,0.99999994 4,0.99999994 3,0.99999994 2,0.99999994 0.99999994,0.99999994 0.99999994,2.3841858E-07 2,2.3841858E-07 3,2.3841858E-07 4,2.3841858E-07 5,2.3841858E-07 6,2.3841858E-07 7,2.3841858E-07 8,2.3841858E-07 9,2.3841858E-07 10,2.3841858E-07 z"/>
                                <Path Fill="{StaticResource GridView_EditIndicatorBackground3}" Stretch="Fill" Data="M2,9 L3,9 4,9 5,9 6,9 7,9 8,9 9,9 10,9 11,9 12,9 13,9 14,9 14,10 13,10 12,10 11,10 10,10 9,10 8,10 7,10 6,10 5,10 4,10 3,10 2,10 z M14,8 L15,8 15,9 14,9 z M1,8 L2,8 2,9 1,9 z M15,2 L16,2 16,3 16,4 16,5 16,6 16,7 16,8 15,8 15,7 15,6 15,5 15,4 15,3 z M3,2 L4,2 5,2 6,2 6,3 5,3 5,4 5,5 5,6 5,7 6,7 6,8 5,8 4,8 3,8 3,7 4,7 4,6 4,5 4,4 4,3 3,3 z M0,2 L1,2 1,3 1,4 1,5 1,6 1,7 1,8 0,8 0,7 0,6 0,5 0,4 0,3 z M14,1 L15,1 15,2 14,2 z M1,1 L2,1 2,2 1,2 z M2,0 L3,0 4,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 13,0 14,0 14,1 13,1 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1 3,1 2,1 z"/>
                                <Path
                                        Fill="{StaticResource GridView_EditIndicatorBackground4}"
                                        Stretch="Fill"
                                        Margin="2"
                                        Data="M4,0 L5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 12,1 12,2 12,3 12,4 12,5.0000001 12,6 11,6 10,6 9,6 8,6 7,6 6,6 5,6 4,6 4,5.0000001 3,5.0000001 3,4 3,3 3,2 3,1 4,1 z M0,0 L1,0 1,1 2,1 2,2 2,3 2,4 2,5.0000001 1,5.0000001 1,6 0,6 0,5.0000001 0,4 0,3 0,2 0,1 z"/>
                            </Grid>
                            <Grid x:Name="InvalidEditableIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="10" Visibility="Collapsed">
                                <Path Fill="{StaticResource GridView_InvalidEditIndicatorBackground1}" Stretch="Fill" Data="M14,9 L15,9 15,10 14,10 z M1,9 L2,9 2,10 1,10 z M15,8 L16,8 16,9 15,9 z M0,8 L1,8 1,9 0,9 z M15,1 L16,1 16,2 15,2 z M0,1 L1,1 1,2 0,2 z M14,0 L15,0 15,1 14,1 z M1,0 L2,0 2,1 1,1 z"/>
                                <Path
                                        Fill="{StaticResource GridView_InvalidEditIndicatorBackground2}"
                                        Stretch="Fill"
                                        Margin="1"
                                        Data="M0.99999994,6.9999995 L2,6.9999995 3,6.9999995 4,6.9999995 5,6.9999995 6,6.9999995 7,6.9999995 8,6.9999995 9,6.9999995 10,6.9999995 11,6.9999995 12,6.9999995 13,6.9999995 13,7.9999995 12,7.9999995 11,7.9999995 10,7.9999995 9,7.9999995 8,7.9999995 7,7.9999995 6,7.9999995 5,7.9999995 4,7.9999995 3,7.9999995 2,7.9999995 0.99999994,7.9999995 z M13,0.99999994 L14,0.99999994 14,1.9999999 14,2.9999995 14,3.9999995 14,4.9999995 14,5.9999995 14,6.9999995 13,6.9999995 13,5.9999995 13,4.9999995 13,3.9999995 13,2.9999995 13,1.9999999 z M0,0.99999994 L0.99999994,0.99999994 0.99999994,1.9999999 0.99999994,2.9999995 0.99999994,3.9999995 0.99999994,4.9999995 0.99999994,5.9999995 0.99999994,6.9999995 0,6.9999995 0,5.9999995 0,4.9999995 0,3.9999995 0,2.9999995 0,1.9999999 z M11,0 L12,0 13,0 13,0.99999994 12,0.99999994 11,0.99999994 10,0.99999994 9,0.99999994 8,0.99999994 7,0.99999994 6,0.99999994 5,0.99999994 4,0.99999994 3,0.99999994 2,0.99999994 0.99999994,0.99999994 0.99999994,2.3841858E-07 2,2.3841858E-07 3,2.3841858E-07 4,2.3841858E-07 5,2.3841858E-07 6,2.3841858E-07 7,2.3841858E-07 8,2.3841858E-07 9,2.3841858E-07 10,2.3841858E-07 z"/>
                                <Path Fill="{StaticResource GridView_InvalidEditIndicatorBackground3}" Stretch="Fill" Data="M2,9 L3,9 4,9 5,9 6,9 7,9 8,9 9,9 10,9 11,9 12,9 13,9 14,9 14,10 13,10 12,10 11,10 10,10 9,10 8,10 7,10 6,10 5,10 4,10 3,10 2,10 z M14,8 L15,8 15,9 14,9 z M1,8 L2,8 2,9 1,9 z M15,2 L16,2 16,3 16,4 16,5 16,6 16,7 16,8 15,8 15,7 15,6 15,5 15,4 15,3 z M3,2 L4,2 5,2 6,2 6,3 5,3 5,4 5,5 5,6 5,7 6,7 6,8 5,8 4,8 3,8 3,7 4,7 4,6 4,5 4,4 4,3 3,3 z M0,2 L1,2 1,3 1,4 1,5 1,6 1,7 1,8 0,8 0,7 0,6 0,5 0,4 0,3 z M14,1 L15,1 15,2 14,2 z M1,1 L2,1 2,2 1,2 z M2,0 L3,0 4,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 13,0 14,0 14,1 13,1 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1 3,1 2,1 z"/>
                                <Path
                                        Fill="{StaticResource GridView_InvalidEditIndicatorBackground4}"
                                        Stretch="Fill"
                                        Margin="2"
                                        Data="M4,0 L5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 12,1 12,2 12,3 12,4 12,5.0000001 12,6 11,6 10,6 9,6 8,6 7,6 6,6 5,6 4,6 4,5.0000001 3,5.0000001 3,4 3,3 3,2 3,1 4,1 z M0,0 L1,0 1,1 2,1 2,2 2,3 2,4 2,5.0000001 1,5.0000001 1,6 0,6 0,5.0000001 0,4 0,3 0,2 0,1 z"/>
                            </Grid>
                            <Grid x:Name="ErrorIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16" Visibility="Collapsed">
                                <Path
                                        Fill="{StaticResource GridView_ErrorIndicatorBackground1}"
                                        Stretch="Fill"
                                        Margin="1"
                                        Data="M3,12.999999 L4,12.999999 5,12.999999 6,12.999999 7,12.999999 8,12.999999 9,12.999999 10,12.999999 11,12.999999 11,13.999999 10,13.999999 9,13.999999 8,13.999999 7,13.999999 6,13.999999 5,13.999999 4,13.999999 3,13.999999 z M11,11.999999 L12,11.999999 12,12.999999 11,12.999999 z M2.0000001,11.999999 L3,11.999999 3,12.999999 2.0000001,12.999999 z M12,10.999999 L13,10.999999 13,11.999999 12,11.999999 z M1,10.999999 L2.0000001,10.999999 2.0000001,11.999999 1,11.999999 z M13,2.9999992 L14,2.9999992 14,3.9999992 14,4.9999992 14,5.9999992 14,6.9999992 14,7.9999992 14,8.9999992 14,9.9999992 14,10.999999 13,10.999999 13,9.9999992 13,8.9999992 13,7.9999992 13,6.9999992 13,5.9999992 13,4.9999992 13,3.9999992 z M0,2.9999992 L1,2.9999992 1,3.9999992 1,4.9999992 1,5.9999992 1,6.9999992 1,7.9999992 1,8.9999992 1,9.9999992 1,10.999999 0,10.999999 0,9.9999992 0,8.9999992 0,7.9999992 0,6.9999992 0,5.9999992 0,4.9999992 0,3.9999992 z M12,1.9999999 L13,1.9999999 13,2.9999992 12,2.9999992 z M1,1.9999999 L2.0000001,1.9999999 2.0000001,2.9999992 1,2.9999992 z M11,0.99999994 L12,0.99999994 12,1.9999999 11,1.9999999 z M2.0000001,0.99999994 L2.9999998,0.99999994 2.9999998,1.9999999 2.0000001,1.9999999 z M2.9999998,0 L3.9999998,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 11,0.99999994 10,0.99999994 9,0.99999994 8,0.99999994 7,0.99999994 6,0.99999994 5,0.99999994 3.9999998,0.99999994 2.9999998,0.99999994 z"/>
                                <Path
                                        Fill="{StaticResource GridView_ErrorIndicatorBackground2}"
                                        Stretch="Fill"
                                        Margin="7,3"
                                        Data="M1.4901161E-07,8 L1.0000001,8 2.0000002,8 2.0000002,9 2.0000002,10 1.0000003,10 1.0000003,9 1.0000001,10 1.4901161E-07,10 1.4901161E-07,9 z M1.4901161E-07,0 L1.0000001,0 2.0000002,0 2.0000002,1 2.0000002,2 2.0000002,3 2.0000002,4.0000001 2.0000002,5 2.0000002,5.9999999 2.0000002,7 1.0000001,7 1.4901161E-07,7 1.4901161E-07,5.9999999 1.4901161E-07,5 1.4901161E-07,4.0000001 1.4901161E-07,3 1.4901161E-07,2 0,1 z"/>
                                <Path Fill="{StaticResource GridView_ErrorIndicatorBackground3}" Stretch="Fill" Data="M4,15 L5,15 6,15 7,15 8,15 9,15 10,15 11,15 12,15 12,16 11,16 10,16 9,16 8,16 7,16 6,16 5,16 4,16 z M12,14 L13,14 13,15 12,15 z M3,14 L4,14 4,15 3,15 z M13,13 L14,13 14,14 13,14 z M2,13 L3,13 3,14 2,14 z M14,12 L15,12 15,13 14,13 z M1,12 L2,12 2,13 1,13 z M7,11 L7,12 7,13 8,13 9,13 9,12 9,11 8,11 z M15,4 L16,4 16,5 16,6 16,7 16,8 16,9 16,10 16,11 16,12 15,12 15,11 15,10 15,9 15,8 15,7 15,6 15,5 z M0,4 L1,4 1,5 1,6 1,7 1,8 1,9 1,10 1,11 1,12 0,12 0,11 0,10 0,9 0,8 0,7 0,6 0,5 z M14,3 L15,3 15,4 14,4 z M7,3 L7,4 7,5 7,6 7,7 7,8 7,9 7,10 8,10 9,10 9,9 9,8 9,7 9,6 9,5 9,4 9,3 8,3 z M1,3 L2,3 2,4 1,4 z M13,2 L14,2 14,3 13,3 z M4,2 L5,2 6,2 7,2 8,2 9,2 10,2 11,2 12,2 12,3 13,3 13,4 14,4 14,5 14,6 14,7 14,8 14,9 14,10 14,11 14,12 13,12 13,13 12,13 12,14 11,14 10,14 9,14 8,14 7,14 6,14 5,14 4,14 4,13 3,13 3,12 2,12 2,11 2,10 2,9 2,8 2,7 2,6 2,5 2,4 3,4 3,3 4,3 z M2,2 L3,2 3,3 2,3 z M12,1 L13,1 13,2 12,2 z M3,1 L4,1 4,2 3,2 z M4,0 L5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1 z"/>
                                <ToolTipService.ToolTip>
                                    <ToolTip x:Name="validationTooltip" Placement="Bottom" Content="{TemplateBinding Errors}" Template="{StaticResource GridViewRow_ValidationToolTipTemplate}"/>
                                </ToolTipService.ToolTip>
                            </Grid>
                            <Border x:Name="PART_RowResizer" Background="Transparent" Height="2" VerticalAlignment="Bottom" Cursor="SizeNS"/>
                        </Grid>
                    </Border>
                </Border>
            </grid:SelectiveScrollingGrid>
        </Border>
    </ControlTemplate>
    <Style x:Key="GridViewRowStyle" TargetType="grid:GridViewRow">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template" Value="{StaticResource GridViewRowTemplate}"/>
        <Setter Property="Background" Value="{StaticResource ItemBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="AllowDrop" Value="True"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewRow" BasedOn="{StaticResource GridViewRowStyle}"/>
    <ControlTemplate x:Key="GridViewNewRow_ValidationToolTipTemplate" TargetType="ToolTip">
        <Grid x:Name="Root" Margin="5 0" Opacity="0" RenderTransformOrigin="0,0">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0"/>
                        <VisualTransition GeneratedDuration="0:0:0.2" To="Open">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualTransition>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Closed">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Open">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RenderTransform>
                <TranslateTransform x:Name="xform" X="-25"/>
            </Grid.RenderTransform>
            <ItemsControl ItemsSource="{TemplateBinding Content}">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Border
                                MinHeight="22"
                                Background="{StaticResource GridView_ValidationTooltipBackground}"
                                BorderBrush="{StaticResource GridView_ValidationTooltipOuterBorder}"
                                BorderThickness="1"
                                CornerRadius="{StaticResource GridView_ValidationTooltipCornerRadius}">
                            <Border BorderBrush="{StaticResource GridView_ValidationTooltipInnerBorder}" BorderThickness="1">
                                <TextBlock Margin="4 1" MaxWidth="250" Foreground="{StaticResource GridView_ValidationTooltipForeground}" Text="{Binding}" TextWrapping="Wrap"/>
                            </Border>
                        </Border>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="GridViewNewRowTemplate" TargetType="grid:GridViewNewRow">
        <grid:SelectiveScrollingGrid x:Name="grid">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Unfocused"/>
                    <VisualState x:Name="Focused"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="SelectionStates">
                    <VisualState x:Name="Unselected"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver"/>
                    <VisualState x:Name="Selected"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ValueStates">
                    <VisualState x:Name="RowValid"/>
                    <VisualState x:Name="RowInvalid">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Invalid" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NewRowIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="EditIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ErrorIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="EditStates">
                    <VisualState x:Name="ReadOnlyMode">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DataCellsPresenter" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_AlwaysVisibleNewRow" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="EditMode">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DataCellsPresenter" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_AlwaysVisibleNewRow" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NewRowIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="EditIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_RowBorder" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource GridView_GridLinesItemBorder}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="InvalidEditMode">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Invalid" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DataCellsPresenter" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_AlwaysVisibleNewRow" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="EditIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ErrorIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NewRowIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InvalidEditableIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="SelectionBackground"
                    Grid.Column="2"
                    Grid.ColumnSpan="2"
                    Background="{StaticResource ItemBackground}"
                    Margin="{TemplateBinding Margin}"
                    Padding="{TemplateBinding Padding}"
                    BorderThickness="0"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"/>
            <Border x:Name="Background_Invalid"
                    Margin="1 1 1 2"
                    BorderThickness="1"
                    CornerRadius="1"
                    BorderBrush="{StaticResource ItemOuterBorder_Invalid}"
                    Grid.Column="2"
                    Grid.ColumnSpan="2"
                    Visibility="Collapsed"
                    grid:SelectiveScrollingGrid.SelectiveScrollingClip="True">
                <Border BorderThickness="1" BorderBrush="{StaticResource ItemInnerBorder_Invalid}" Background="{StaticResource ItemBackground_Invalid}"/>
            </Border>
            <Border
                    Grid.Column="2"
                    Width="25"
                    BorderBrush="{TemplateBinding VerticalGridLinesBrush}"
                    BorderThickness="{Binding VerticalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Right}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                    grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                    Opacity="{Binding IsExpandable, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToOpacityConverter}}"
                    IsHitTestVisible="{Binding IsExpandable, RelativeSource={RelativeSource TemplatedParent}}"
                    Visibility="{Binding HasHierarchy, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"/>
            <Border x:Name="PART_AlwaysVisibleNewRow"
                    grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                    Margin="0"
                    BorderThickness="1 1 1 2"
                    BorderBrush="{StaticResource ControlInnerBorder}"
                    Background="{TemplateBinding Background}"
                    Grid.Column="2"
                    Grid.ColumnSpan="2">
                <TextBlock
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"
                        telerik:LocalizationManager.ResourceKey="GridViewAlwaysVisibleNewRow"/>
            </Border>
            <grid:DataCellsPresenter Grid.Column="3" grid:SelectiveScrollingGrid.SelectiveScrollingClip="True" Visibility="Collapsed" x:Name="PART_DataCellsPresenter"/>
            <grid:DetailsPresenter x:Name="PART_DetailsPresenter" Grid.Column="3" Grid.Row="1" DetailsProvider="{TemplateBinding DetailsProvider}"/>
            <grid:IndentPresenter x:Name="PART_IndentPresenter"
                    BorderThickness="0 0 0 1"
                    IndentLevel="{TemplateBinding IndentLevel}"
                    Grid.Column="1"
                    Grid.RowSpan="2"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            <Border x:Name="PART_RowBorder"
                    BorderBrush="{StaticResource ControlOuterBorder}"
                    BorderThickness="0 0 0 1"
                    Grid.ColumnSpan="4"
                    Grid.Column="1"
                    Grid.RowSpan="2"
                    VerticalAlignment="Bottom"
                    grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"/>
            <Border x:Name="PART_IndicatorPresenter"
                    Width="25"
                    VerticalAlignment="Stretch"
                    Grid.Column="0"
                    Visibility="{TemplateBinding RowIndicatorVisibility}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                    Grid.RowSpan="2"
                    BorderBrush="{StaticResource ControlOuterBorder}"
                    BorderThickness="0 0 1 1">
                <Border Background="{StaticResource GridView_RowIndicatorCellBackground}" BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="1">
                    <Grid>
                        <Grid x:Name="NewRowIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="11">
                            <Path
                                    Fill="{StaticResource GridView_NewRowIndicatorBackground1}"
                                    Stretch="Fill"
                                    Margin="1 1 1 0"
                                    VerticalAlignment="Top"
                                    Height="2"
                                    Data="M0,0 L1,0 2,0 3,0 4,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 13,0 14,0 14,0.99999994 14,1.9999999 13,1.9999999 12,1.9999999 11,1.9999999 10,1.9999999 9,1.9999999 8,1.9999999 7,1.9999999 6,1.9999999 5,1.9999999 4,1.9999999 3,1.9999999 2,1.9999999 1,1.9999999 0,1.9999999 0,0.99999994 z"/>
                            <Path
                                    Fill="{StaticResource GridView_NewRowIndicatorBackground2}"
                                    Stretch="Fill"
                                    VerticalAlignment="Top"
                                    Height="4"
                                    Data="M1,1 L1,2 1,3 2,3 3,3 4,3 5,3 6,3 7,3 8,3 9,3 10,3 11,3 12,3 13,3 14,3 15,3 15,2 15,1 14,1 13,1 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1 2.9999998,1 2,1 z M0,0 L1,0 2,0 2.9999998,0 4,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 13,0 14,0 15,0 16,0 16,1 16,2 16,3 16,4 15,4 14,4 13,4 12,4 11,4 10,4 9,4 8,4 7,4 6,4 5,4 4,4 3,4 2,4 1,4 0,4 0,3 0,2 0,1 z"/>
                            <Path
                                    Fill="{StaticResource GridView_NewRowIndicatorBackground3}"
                                    Stretch="Fill"
                                    HorizontalAlignment="Right"
                                    Margin="0 5 0 0"
                                    Width="6"
                                    Data="M2,0 L3.0000001,0 4,0 4,1 4,2 5,2 6,2 6,3 6,4 5,4 4,4 4,5 4,6 3.0000001,6 3.0000001,5 3,6 2,6 2,5 2,4 1,4 0,4 0,3 0,2 1,2 2,2 2,1 z"/>
                        </Grid>
                        <Grid x:Name="EditIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="10" Visibility="Collapsed">
                            <Path Fill="{StaticResource GridView_EditIndicatorBackground1}" Stretch="Fill" Data="M14,9 L15,9 15,10 14,10 z M1,9 L2,9 2,10 1,10 z M15,8 L16,8 16,9 15,9 z M0,8 L1,8 1,9 0,9 z M15,1 L16,1 16,2 15,2 z M0,1 L1,1 1,2 0,2 z M14,0 L15,0 15,1 14,1 z M1,0 L2,0 2,1 1,1 z"/>
                            <Path
                                    Fill="{StaticResource GridView_EditIndicatorBackground2}"
                                    Stretch="Fill"
                                    Margin="1"
                                    Data="M0.99999994,6.9999995 L2,6.9999995 3,6.9999995 4,6.9999995 5,6.9999995 6,6.9999995 7,6.9999995 8,6.9999995 9,6.9999995 10,6.9999995 11,6.9999995 12,6.9999995 13,6.9999995 13,7.9999995 12,7.9999995 11,7.9999995 10,7.9999995 9,7.9999995 8,7.9999995 7,7.9999995 6,7.9999995 5,7.9999995 4,7.9999995 3,7.9999995 2,7.9999995 0.99999994,7.9999995 z M13,0.99999994 L14,0.99999994 14,1.9999999 14,2.9999995 14,3.9999995 14,4.9999995 14,5.9999995 14,6.9999995 13,6.9999995 13,5.9999995 13,4.9999995 13,3.9999995 13,2.9999995 13,1.9999999 z M0,0.99999994 L0.99999994,0.99999994 0.99999994,1.9999999 0.99999994,2.9999995 0.99999994,3.9999995 0.99999994,4.9999995 0.99999994,5.9999995 0.99999994,6.9999995 0,6.9999995 0,5.9999995 0,4.9999995 0,3.9999995 0,2.9999995 0,1.9999999 z M11,0 L12,0 13,0 13,0.99999994 12,0.99999994 11,0.99999994 10,0.99999994 9,0.99999994 8,0.99999994 7,0.99999994 6,0.99999994 5,0.99999994 4,0.99999994 3,0.99999994 2,0.99999994 0.99999994,0.99999994 0.99999994,2.3841858E-07 2,2.3841858E-07 3,2.3841858E-07 4,2.3841858E-07 5,2.3841858E-07 6,2.3841858E-07 7,2.3841858E-07 8,2.3841858E-07 9,2.3841858E-07 10,2.3841858E-07 z"/>
                            <Path Fill="{StaticResource GridView_EditIndicatorBackground3}" Stretch="Fill" Data="M2,9 L3,9 4,9 5,9 6,9 7,9 8,9 9,9 10,9 11,9 12,9 13,9 14,9 14,10 13,10 12,10 11,10 10,10 9,10 8,10 7,10 6,10 5,10 4,10 3,10 2,10 z M14,8 L15,8 15,9 14,9 z M1,8 L2,8 2,9 1,9 z M15,2 L16,2 16,3 16,4 16,5 16,6 16,7 16,8 15,8 15,7 15,6 15,5 15,4 15,3 z M3,2 L4,2 5,2 6,2 6,3 5,3 5,4 5,5 5,6 5,7 6,7 6,8 5,8 4,8 3,8 3,7 4,7 4,6 4,5 4,4 4,3 3,3 z M0,2 L1,2 1,3 1,4 1,5 1,6 1,7 1,8 0,8 0,7 0,6 0,5 0,4 0,3 z M14,1 L15,1 15,2 14,2 z M1,1 L2,1 2,2 1,2 z M2,0 L3,0 4,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 13,0 14,0 14,1 13,1 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1 3,1 2,1 z"/>
                            <Path
                                    Fill="{StaticResource GridView_EditIndicatorBackground4}"
                                    Stretch="Fill"
                                    Margin="2"
                                    Data="M4,0 L5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 12,1 12,2 12,3 12,4 12,5.0000001 12,6 11,6 10,6 9,6 8,6 7,6 6,6 5,6 4,6 4,5.0000001 3,5.0000001 3,4 3,3 3,2 3,1 4,1 z M0,0 L1,0 1,1 2,1 2,2 2,3 2,4 2,5.0000001 1,5.0000001 1,6 0,6 0,5.0000001 0,4 0,3 0,2 0,1 z"/>
                        </Grid>
                        <Grid x:Name="InvalidEditableIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="10" Visibility="Collapsed">
                            <Path Fill="{StaticResource GridView_InvalidEditIndicatorBackground1}" Stretch="Fill" Data="M14,9 L15,9 15,10 14,10 z M1,9 L2,9 2,10 1,10 z M15,8 L16,8 16,9 15,9 z M0,8 L1,8 1,9 0,9 z M15,1 L16,1 16,2 15,2 z M0,1 L1,1 1,2 0,2 z M14,0 L15,0 15,1 14,1 z M1,0 L2,0 2,1 1,1 z"/>
                            <Path
                                    Fill="{StaticResource GridView_InvalidEditIndicatorBackground2}"
                                    Stretch="Fill"
                                    Margin="1"
                                    Data="M0.99999994,6.9999995 L2,6.9999995 3,6.9999995 4,6.9999995 5,6.9999995 6,6.9999995 7,6.9999995 8,6.9999995 9,6.9999995 10,6.9999995 11,6.9999995 12,6.9999995 13,6.9999995 13,7.9999995 12,7.9999995 11,7.9999995 10,7.9999995 9,7.9999995 8,7.9999995 7,7.9999995 6,7.9999995 5,7.9999995 4,7.9999995 3,7.9999995 2,7.9999995 0.99999994,7.9999995 z M13,0.99999994 L14,0.99999994 14,1.9999999 14,2.9999995 14,3.9999995 14,4.9999995 14,5.9999995 14,6.9999995 13,6.9999995 13,5.9999995 13,4.9999995 13,3.9999995 13,2.9999995 13,1.9999999 z M0,0.99999994 L0.99999994,0.99999994 0.99999994,1.9999999 0.99999994,2.9999995 0.99999994,3.9999995 0.99999994,4.9999995 0.99999994,5.9999995 0.99999994,6.9999995 0,6.9999995 0,5.9999995 0,4.9999995 0,3.9999995 0,2.9999995 0,1.9999999 z M11,0 L12,0 13,0 13,0.99999994 12,0.99999994 11,0.99999994 10,0.99999994 9,0.99999994 8,0.99999994 7,0.99999994 6,0.99999994 5,0.99999994 4,0.99999994 3,0.99999994 2,0.99999994 0.99999994,0.99999994 0.99999994,2.3841858E-07 2,2.3841858E-07 3,2.3841858E-07 4,2.3841858E-07 5,2.3841858E-07 6,2.3841858E-07 7,2.3841858E-07 8,2.3841858E-07 9,2.3841858E-07 10,2.3841858E-07 z"/>
                            <Path Fill="{StaticResource GridView_InvalidEditIndicatorBackground3}" Stretch="Fill" Data="M2,9 L3,9 4,9 5,9 6,9 7,9 8,9 9,9 10,9 11,9 12,9 13,9 14,9 14,10 13,10 12,10 11,10 10,10 9,10 8,10 7,10 6,10 5,10 4,10 3,10 2,10 z M14,8 L15,8 15,9 14,9 z M1,8 L2,8 2,9 1,9 z M15,2 L16,2 16,3 16,4 16,5 16,6 16,7 16,8 15,8 15,7 15,6 15,5 15,4 15,3 z M3,2 L4,2 5,2 6,2 6,3 5,3 5,4 5,5 5,6 5,7 6,7 6,8 5,8 4,8 3,8 3,7 4,7 4,6 4,5 4,4 4,3 3,3 z M0,2 L1,2 1,3 1,4 1,5 1,6 1,7 1,8 0,8 0,7 0,6 0,5 0,4 0,3 z M14,1 L15,1 15,2 14,2 z M1,1 L2,1 2,2 1,2 z M2,0 L3,0 4,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 13,0 14,0 14,1 13,1 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1 3,1 2,1 z"/>
                            <Path
                                    Fill="{StaticResource GridView_InvalidEditIndicatorBackground4}"
                                    Stretch="Fill"
                                    Margin="2"
                                    Data="M4,0 L5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 12,1 12,2 12,3 12,4 12,5.0000001 12,6 11,6 10,6 9,6 8,6 7,6 6,6 5,6 4,6 4,5.0000001 3,5.0000001 3,4 3,3 3,2 3,1 4,1 z M0,0 L1,0 1,1 2,1 2,2 2,3 2,4 2,5.0000001 1,5.0000001 1,6 0,6 0,5.0000001 0,4 0,3 0,2 0,1 z"/>
                        </Grid>
                        <Grid x:Name="ErrorIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16" Visibility="Collapsed">
                            <Path
                                    Fill="{StaticResource GridView_ErrorIndicatorBackground1}"
                                    Stretch="Fill"
                                    Margin="1"
                                    Data="M3,12.999999 L4,12.999999 5,12.999999 6,12.999999 7,12.999999 8,12.999999 9,12.999999 10,12.999999 11,12.999999 11,13.999999 10,13.999999 9,13.999999 8,13.999999 7,13.999999 6,13.999999 5,13.999999 4,13.999999 3,13.999999 z M11,11.999999 L12,11.999999 12,12.999999 11,12.999999 z M2.0000001,11.999999 L3,11.999999 3,12.999999 2.0000001,12.999999 z M12,10.999999 L13,10.999999 13,11.999999 12,11.999999 z M1,10.999999 L2.0000001,10.999999 2.0000001,11.999999 1,11.999999 z M13,2.9999992 L14,2.9999992 14,3.9999992 14,4.9999992 14,5.9999992 14,6.9999992 14,7.9999992 14,8.9999992 14,9.9999992 14,10.999999 13,10.999999 13,9.9999992 13,8.9999992 13,7.9999992 13,6.9999992 13,5.9999992 13,4.9999992 13,3.9999992 z M0,2.9999992 L1,2.9999992 1,3.9999992 1,4.9999992 1,5.9999992 1,6.9999992 1,7.9999992 1,8.9999992 1,9.9999992 1,10.999999 0,10.999999 0,9.9999992 0,8.9999992 0,7.9999992 0,6.9999992 0,5.9999992 0,4.9999992 0,3.9999992 z M12,1.9999999 L13,1.9999999 13,2.9999992 12,2.9999992 z M1,1.9999999 L2.0000001,1.9999999 2.0000001,2.9999992 1,2.9999992 z M11,0.99999994 L12,0.99999994 12,1.9999999 11,1.9999999 z M2.0000001,0.99999994 L2.9999998,0.99999994 2.9999998,1.9999999 2.0000001,1.9999999 z M2.9999998,0 L3.9999998,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 11,0.99999994 10,0.99999994 9,0.99999994 8,0.99999994 7,0.99999994 6,0.99999994 5,0.99999994 3.9999998,0.99999994 2.9999998,0.99999994 z"/>
                            <Path
                                    Fill="{StaticResource GridView_ErrorIndicatorBackground2}"
                                    Stretch="Fill"
                                    Margin="7 3"
                                    Data="M1.4901161E-07,8 L1.0000001,8 2.0000002,8 2.0000002,9 2.0000002,10 1.0000003,10 1.0000003,9 1.0000001,10 1.4901161E-07,10 1.4901161E-07,9 z M1.4901161E-07,0 L1.0000001,0 2.0000002,0 2.0000002,1 2.0000002,2 2.0000002,3 2.0000002,4.0000001 2.0000002,5 2.0000002,5.9999999 2.0000002,7 1.0000001,7 1.4901161E-07,7 1.4901161E-07,5.9999999 1.4901161E-07,5 1.4901161E-07,4.0000001 1.4901161E-07,3 1.4901161E-07,2 0,1 z"/>
                            <Path Fill="{StaticResource GridView_ErrorIndicatorBackground3}" Stretch="Fill" Data="M4,15 L5,15 6,15 7,15 8,15 9,15 10,15 11,15 12,15 12,16 11,16 10,16 9,16 8,16 7,16 6,16 5,16 4,16 z M12,14 L13,14 13,15 12,15 z M3,14 L4,14 4,15 3,15 z M13,13 L14,13 14,14 13,14 z M2,13 L3,13 3,14 2,14 z M14,12 L15,12 15,13 14,13 z M1,12 L2,12 2,13 1,13 z M7,11 L7,12 7,13 8,13 9,13 9,12 9,11 8,11 z M15,4 L16,4 16,5 16,6 16,7 16,8 16,9 16,10 16,11 16,12 15,12 15,11 15,10 15,9 15,8 15,7 15,6 15,5 z M0,4 L1,4 1,5 1,6 1,7 1,8 1,9 1,10 1,11 1,12 0,12 0,11 0,10 0,9 0,8 0,7 0,6 0,5 z M14,3 L15,3 15,4 14,4 z M7,3 L7,4 7,5 7,6 7,7 7,8 7,9 7,10 8,10 9,10 9,9 9,8 9,7 9,6 9,5 9,4 9,3 8,3 z M1,3 L2,3 2,4 1,4 z M13,2 L14,2 14,3 13,3 z M4,2 L5,2 6,2 7,2 8,2 9,2 10,2 11,2 12,2 12,3 13,3 13,4 14,4 14,5 14,6 14,7 14,8 14,9 14,10 14,11 14,12 13,12 13,13 12,13 12,14 11,14 10,14 9,14 8,14 7,14 6,14 5,14 4,14 4,13 3,13 3,12 2,12 2,11 2,10 2,9 2,8 2,7 2,6 2,5 2,4 3,4 3,3 4,3 z M2,2 L3,2 3,3 2,3 z M12,1 L13,1 13,2 12,2 z M3,1 L4,1 4,2 3,2 z M4,0 L5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1 z"/>
                            <ToolTipService.ToolTip>
                                <ToolTip x:Name="validationTooltip" Placement="Bottom" Content="{TemplateBinding Errors}" Template="{StaticResource GridViewNewRow_ValidationToolTipTemplate}"/>
                            </ToolTipService.ToolTip>
                        </Grid>
                    </Grid>
                </Border>
            </Border>
        </grid:SelectiveScrollingGrid>
    </ControlTemplate>
    <Style x:Key="GridViewNewRowStyle" TargetType="grid:GridViewNewRow">
        <Setter Property="Template" Value="{StaticResource GridViewNewRowTemplate}"/>
        <Setter Property="Background" Value="{StaticResource GridView_NewRowBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
        <Setter Property="MinHeight" Value="25"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="Padding" Value="5 0 3 0"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewNewRow" BasedOn="{StaticResource GridViewNewRowStyle}"/>
    <DataTemplate x:Key="GroupHeaderTemplate">
        <ContentPresenter Content="{Binding Header}"/>
    </DataTemplate>
    <ControlTemplate x:Key="GridViewGroupToggleButtonTemplate" TargetType="ToggleButton">
        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter/>
        </Border>
    </ControlTemplate>
    <Style x:Key="GridViewGroupToggleButtonStyle" TargetType="ToggleButton">
        <Setter Property="Template" Value="{StaticResource GridViewGroupToggleButtonTemplate}"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="9 0 0 0"/>
    </Style>
    <ControlTemplate x:Key="GridViewGroupRowTemplate" TargetType="grid:GridViewGroupRow">
        <Grid x:Name="PART_GroupExpanderGrid">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition x:Name="PART_HeaderRow" MinHeight="{TemplateBinding MinHeight}"/>
                <RowDefinition x:Name="ContentRow" Height="Auto"/>
            </Grid.RowDefinitions>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="ExpandStateGroup">
                    <VisualState x:Name="Expanded">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BottomBorder" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconOuterBorder" Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconInnerBorder" Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>1 1 0 0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)">
                                <EasingDoubleKeyFrame KeyTime="00:00:00.2" Value="180"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Collapsed">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)">
                                <EasingDoubleKeyFrame KeyTime="00:00:00.2" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="ToggleButtonBorder"
                    Background="{TemplateBinding Background}"
                    Grid.Column="2"
                    Grid.ColumnSpan="2"
                    MinHeight="{TemplateBinding MinHeight}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingClip="True">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="25"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Border
                            grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                            Visibility="{Binding ShowHeaderAggregates, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Grid.Column="2">
                        <grid:AggregateResultsList ItemsSource="{TemplateBinding AggregateResults}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
                            <grid:AggregateResultsList.ItemTemplate>
                                <DataTemplate>
                                    <grid:GridViewAggregateResultCell AggregateResult="{Binding}"/>
                                </DataTemplate>
                            </grid:AggregateResultsList.ItemTemplate>
                            <grid:AggregateResultsList.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <StackPanel Orientation="Horizontal"/>
                                </ItemsPanelTemplate>
                            </grid:AggregateResultsList.ItemsPanel>
                        </grid:AggregateResultsList>
                    </Border>
                    <Border x:Name="IconOuterBorder"
                            BorderBrush="{StaticResource ControlOuterBorder}"
                            Background="Transparent"
                            BorderThickness="0 0 0 1"
                            HorizontalAlignment="Stretch"
                            grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical">
                        <Border x:Name="IconInnerBorder" BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="1 1 0 1">
                            <Path x:Name="ExpanderButton"
                                    Grid.Column="0"
                                    HorizontalAlignment="Left"
                                    Margin="{TemplateBinding Padding}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    Fill="{StaticResource GridView_GroupRowIndicator}"
                                    Width="7"
                                    Height="5"
                                    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"
                                    RenderTransformOrigin="0.5,0.5">
                                <Path.RenderTransform>
                                    <RotateTransform/>
                                </Path.RenderTransform>
                            </Path>
                        </Border>
                    </Border>
                    <ToggleButton x:Name="HeaderButton"
                            Grid.Column="0"
                            Grid.ColumnSpan="3"
                            Background="{TemplateBinding Background}"
                            grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                            IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                            Opacity="0"
                            IsTabStop="{TemplateBinding IsTabStop}"/>
                    <ToggleButton
                            Grid.Column="1"
                            Padding="0 0 10 0"
                            grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                            Background="Transparent"
                            BorderThickness="0"
                            BorderBrush="{x:Null}"
                            Style="{StaticResource GridViewGroupToggleButtonStyle}"
                            IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                            IsTabStop="{TemplateBinding IsTabStop}">
                        <ContentPresenter Grid.Column="1" Margin="0 0 10 0" Content="{TemplateBinding GroupViewModel}" VerticalAlignment="Center" ContentTemplate="{TemplateBinding GroupHeaderTemplate}"/>
                    </ToggleButton>
                    <Border
                            grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                            BorderBrush="{StaticResource ControlOuterBorder}"
                            BorderThickness="0 0 0 1"
                            Grid.Column="1"
                            Grid.ColumnSpan="2">
                        <Border BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="0 1 1 1"/>
                    </Border>
                </Grid>
            </Border>
            <Border x:Name="PART_IndicatorPresenter"
                    Width="25"
                    VerticalAlignment="Stretch"
                    Grid.Column="0"
                    Visibility="{TemplateBinding RowIndicatorVisibility}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                    BorderBrush="{StaticResource ControlOuterBorder}"
                    BorderThickness="0 0 1 1">
                <Border Background="{StaticResource GridView_RowIndicatorCellBackground}" BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="1"/>
            </Border>
            <grid:IndentPresenter
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                    IndentLevel="{TemplateBinding Level}"
                    Background="{TemplateBinding Background}"
                    Grid.Column="1"/>
            <Border x:Name="Content" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="5" Visibility="Collapsed">
                <StackPanel>
                    <grid:GridViewVirtualizingPanel x:Name="PART_GridViewVirtualizingPanel"/>
                    <grid:GridViewGroupFooterRow x:Name="Footer"/>
                </StackPanel>
            </Border>
            <Border x:Name="BottomBorder"
                    grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                    Grid.Column="2"
                    Grid.Row="1"
                    BorderThickness="0 0 0 1"
                    BorderBrush="{StaticResource ControlOuterBorder}"
                    VerticalAlignment="Bottom"
                    Visibility="Collapsed"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="GridViewGroupRowStyle" TargetType="grid:GridViewGroupRow">
        <Setter Property="Template" Value="{StaticResource GridViewGroupRowTemplate}"/>
        <Setter Property="GroupHeaderTemplate" Value="{StaticResource GroupHeaderTemplate}"/>
        <Setter Property="Background" Value="{StaticResource GridView_GroupRowBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="Padding" Value="10 0 0 0"/>
        <Setter Property="MinHeight" Value="25"/>
        <Setter Property="AllowDrop" Value="True"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewGroupRow" BasedOn="{StaticResource GridViewGroupRowStyle}"/>
    <DataTemplate x:Key="GroupHeaderRowHeaderTemplate">
        <ContentPresenter Content="{Binding Header}"/>
    </DataTemplate>
    <ControlTemplate x:Key="GroupHeaderRowToggleButtonTemplate" TargetType="ToggleButton">
        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter/>
        </Border>
    </ControlTemplate>
    <Style x:Key="GroupHeaderRowToggleButtonStyle" TargetType="ToggleButton">
        <Setter Property="Template" Value="{StaticResource GroupHeaderRowToggleButtonTemplate}"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="9 0 0 0"/>
    </Style>
    <ControlTemplate x:Key="GroupHeaderRowTemplate" TargetType="grid:GroupHeaderRow">
        <Grid x:Name="PART_GroupExpanderGrid">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition x:Name="PART_HeaderRow" MinHeight="{TemplateBinding MinHeight}"/>
                <RowDefinition x:Name="PART_HeaderAggregatesRow" Height="Auto"/>
            </Grid.RowDefinitions>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="ExpandStateGroup">
                    <VisualState x:Name="Expanded">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconOuterBorder" Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconInnerBorder" Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>1 1 0 0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)">
                                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Collapsed">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)">
                                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualStateGroup.Transitions>
                        <VisualTransition From="Expanded" To="Collapsed">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconOuterBorder" Storyboard.TargetProperty="BorderThickness">
                                    <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Thickness>0 0 0 1</Thickness>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconInnerBorder" Storyboard.TargetProperty="BorderThickness">
                                    <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Thickness>1 1 0 1</Thickness>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)">
                                    <EasingDoubleKeyFrame KeyTime="00:00:00.2" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualTransition>
                        <VisualTransition From="Collapsed" To="Expanded">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconOuterBorder" Storyboard.TargetProperty="BorderThickness">
                                    <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Thickness>0</Thickness>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconInnerBorder" Storyboard.TargetProperty="BorderThickness">
                                    <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Thickness>1 1 0 0</Thickness>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)">
                                    <EasingDoubleKeyFrame KeyTime="00:00:00.2" Value="180"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualTransition>
                    </VisualStateGroup.Transitions>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border
                    BorderThickness="0,1,0,0"
                    BorderBrush="{StaticResource ControlOuterBorder}"
                    Grid.Column="2"
                    grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                    Grid.ColumnSpan="2"
                    VerticalAlignment="Top"
                    Margin="0,-1,0,0"/>
            <Border x:Name="ToggleButtonBorder"
                    Background="{TemplateBinding Background}"
                    Grid.Column="2"
                    Grid.ColumnSpan="2"
                    grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                    MinHeight="{TemplateBinding MinHeight}">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="25"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Border
                            grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                            Visibility="{Binding ShowHeaderAggregates, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Grid.Column="2">
                        <grid:AggregateResultsList ItemsSource="{TemplateBinding AggregateResults}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
                            <grid:AggregateResultsList.ItemTemplate>
                                <DataTemplate>
                                    <grid:GridViewAggregateResultCell AggregateResult="{Binding}"/>
                                </DataTemplate>
                            </grid:AggregateResultsList.ItemTemplate>
                            <grid:AggregateResultsList.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <StackPanel Orientation="Horizontal"/>
                                </ItemsPanelTemplate>
                            </grid:AggregateResultsList.ItemsPanel>
                        </grid:AggregateResultsList>
                    </Border>
                    <Border x:Name="IconOuterBorder"
                            BorderBrush="{StaticResource ControlOuterBorder}"
                            Background="Transparent"
                            BorderThickness="0 0 0 1"
                            HorizontalAlignment="Stretch"
                            grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical">
                        <Border x:Name="IconInnerBorder" BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="1 1 0 1">
                            <Path x:Name="ExpanderButton"
                                    Grid.Column="0"
                                    HorizontalAlignment="Left"
                                    Margin="{TemplateBinding Padding}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    Fill="{StaticResource GridView_GroupRowIndicator}"
                                    Width="7"
                                    Height="5"
                                    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"
                                    RenderTransformOrigin="0.5,0.5">
                                <Path.RenderTransform>
                                    <RotateTransform/>
                                </Path.RenderTransform>
                            </Path>
                        </Border>
                    </Border>
                    <ToggleButton x:Name="HeaderButton"
                            Grid.Column="0"
                            Grid.ColumnSpan="3"
                            Background="{TemplateBinding Background}"
                            grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                            IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                            Opacity="0"
                            IsTabStop="{TemplateBinding IsTabStop}"/>
                    <ToggleButton
                            Grid.Column="1"
                            Padding="0 0 10 0"
                            grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                            Background="Transparent"
                            BorderThickness="0"
                            BorderBrush="{x:Null}"
                            Style="{StaticResource GroupHeaderRowToggleButtonStyle}"
                            IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                            IsTabStop="{TemplateBinding IsTabStop}">
                        <ContentPresenter Grid.Column="1" Margin="0 0 10 0" Content="{TemplateBinding GroupViewModel}" VerticalAlignment="Center" ContentTemplate="{TemplateBinding GroupHeaderTemplate}"/>
                    </ToggleButton>
                    <Border
                            grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                            BorderBrush="{StaticResource ControlOuterBorder}"
                            BorderThickness="0 0 0 1"
                            Grid.Column="1"
                            Grid.ColumnSpan="2">
                        <Border BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="0 1 1 1"/>
                    </Border>
                </Grid>
            </Border>
            <Border x:Name="PART_IndicatorPresenter"
                    Width="25"
                    VerticalAlignment="Stretch"
                    Grid.Column="0"
                    Visibility="{TemplateBinding RowIndicatorVisibility}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                    BorderBrush="{StaticResource ControlOuterBorder}"
                    BorderThickness="0 0 1 1">
                <Border Background="{StaticResource GridView_RowIndicatorCellBackground}" BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="1"/>
            </Border>
            <grid:IndentPresenter
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                    IndentLevel="{TemplateBinding Level}"
                    Background="{TemplateBinding Background}"
                    Grid.Column="1"/>
            <grid:GridViewGroupFooterRow x:Name="FooterRowForHeaderAggregates"
                    Visibility="{Binding ShowGroupHeaderColumnAggregates, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                    Grid.Row="1"
                    Grid.Column="0"
                    Grid.ColumnSpan="5"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="GroupHeaderRowStyle" TargetType="grid:GroupHeaderRow">
        <Setter Property="Template" Value="{StaticResource GroupHeaderRowTemplate}"/>
        <Setter Property="GroupHeaderTemplate" Value="{StaticResource GroupHeaderRowHeaderTemplate}"/>
        <Setter Property="Background" Value="{StaticResource GridView_GroupRowBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="Padding" Value="10 0 0 0"/>
        <Setter Property="MinHeight" Value="25"/>
        <Setter Property="AllowDrop" Value="True"/>
        <Setter Property="ClipToBounds" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GroupHeaderRow" BasedOn="{StaticResource GroupHeaderRowStyle}"/>
    <DataTemplate x:Key="GridViewHeaderIndentCellDataTemplate">
        <grid:GridViewHeaderIndentCell/>
    </DataTemplate>
    <ControlTemplate x:Key="GridViewHeaderRowTemplate" TargetType="grid:GridViewHeaderRow">
        <grid:SelectiveScrollingGrid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <grid:CommonHeaderPresenter x:Name="PART_CommonHeaderPresenter" Grid.Column="3"/>
            <Border Background="{StaticResource GridViewCommonHeader_Background}" Grid.ColumnSpan="2" grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            <Border x:Name="CommonHeaderIndent"
                    Visibility="{Binding Visibility, ElementName=PART_CommonHeaderPresenter}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                    Grid.ColumnSpan="2"
                    BorderBrush="{StaticResource GridViewCommonHeader_BorderBrush}"
                    Background="{StaticResource GridViewCommonHeader_Background}"
                    Margin="-1,0,0,0"
                    BorderThickness="0 0 1 1"/>
            <Grid Grid.Row="1" Grid.ColumnSpan="4" x:Name="PART_OuterGrid">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border x:Name="PART_GridViewHeaderRowBorder"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Padding="{TemplateBinding Padding}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                    <Border BorderBrush="{StaticResource GridView_HeaderRowInnerBorder}" Background="{TemplateBinding Background}" BorderThickness="1"/>
                </Border>
                <Border x:Name="PART_FieldFilterPlaceholder"
                        Grid.Row="1"
                        BorderBrush="{StaticResource ControlOuterBorder}"
                        Background="{StaticResource GridViewCommonHeader_Background}"
                        BorderThickness="0 0 1 1"
                        Visibility="{TemplateBinding FieldFilterPlaceholderVisibility}"/>
            </Grid>
            <grid:DataCellsPresenter x:Name="PART_DataCellsPresenter" Grid.Row="1" Grid.Column="3"/>
            <Border x:Name="PART_IndicatorPresenter"
                    Grid.Row="1"
                    Width="25"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="0 0 1 1"
                    Visibility="{TemplateBinding RowIndicatorVisibility}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical">
                <Border BorderBrush="{StaticResource GridView_HeaderInnerBorder}" Background="{StaticResource GridView_HeaderBackground}" BorderThickness="1"/>
            </Border>
            <grid:IndentPresenter x:Name="PART_IndentPresenter"
                    Grid.Column="1"
                    MinHeight="{TemplateBinding MinHeight}"
                    IndentLevel="{TemplateBinding IndentLevel}"
                    ItemTemplate="{StaticResource GridViewHeaderIndentCellDataTemplate}"
                    Grid.Row="1"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            <Border x:Name="PART_CommonHeaderHierarchyIndentPresenterAllLevels"
                    Grid.Column="2"
                    Grid.Row="0"
                    Grid.RowSpan="10"
                    Width="25"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="0,0,1,1"
                    Visibility="{Binding HasHierarchy, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                    Background="{StaticResource GridViewCommonHeader_Background}"/>
            <Border x:Name="PART_CommonHeaderHierarchyIndentPresenterFirstLevel"
                    Grid.Column="2"
                    Grid.Row="0"
                    Grid.RowSpan="1"
                    Width="25"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="0,0,1,1"
                    Margin="0, -1, 0, 0"
                    Visibility="{Binding HasHierarchy, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                    Background="{StaticResource GridViewCommonHeader_Background}"/>
            <Border x:Name="PART_HierarchyIndentPresenter"
                    Grid.Column="2"
                    Grid.Row="1"
                    Width="25"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="0 0 1 1"
                    Visibility="{Binding HasHierarchy, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical">
                <Border BorderBrush="{StaticResource GridView_HeaderInnerBorder}" Background="{StaticResource GridView_HeaderBackground}" BorderThickness="1"/>
            </Border>
        </grid:SelectiveScrollingGrid>
    </ControlTemplate>
    <Style x:Key="GridViewHeaderRowStyle" TargetType="grid:GridViewHeaderRow">
        <Setter Property="Template" Value="{StaticResource GridViewHeaderRowTemplate}"/>
        <Setter Property="Background" Value="{StaticResource GridView_HeaderRowBackground}"/>
        <Setter Property="MinHeight" Value="27"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_HeaderRowOuterBorder}"/>
        <Setter Property="BorderThickness" Value="1 0 0 1"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewHeaderRow" BasedOn="{StaticResource GridViewHeaderRowStyle}"/>
    <DataTemplate x:Key="GridViewFooterIndentCellDataTemplate">
        <grid:GridViewFooterIndentCell/>
    </DataTemplate>
    <ControlTemplate x:Key="GridViewFooterRowTemplate" TargetType="grid:GridViewFooterRow">
        <Border x:Name="PART_FooterRowBorder"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                Background="{TemplateBinding Background}"
                Padding="{TemplateBinding Padding}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
            <grid:SelectiveScrollingGrid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="PART_IndicatorPresenter"
                        Width="25"
                        Visibility="{TemplateBinding RowIndicatorVisibility}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="0 0 1 0"
                        Grid.Column="0"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
                <grid:IndentPresenter x:Name="PART_IndentPresenter"
                        IndentLevel="{TemplateBinding IndentLevel}"
                        ItemTemplate="{StaticResource GridViewFooterIndentCellDataTemplate}"
                        Grid.Column="1"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
                <Border x:Name="PART_HierarchyIndent"
                        Width="25"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="0 0 1 0"
                        Grid.Column="2"
                        Visibility="{Binding HasHierarchy, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
                <grid:DataCellsPresenter x:Name="PART_DataCellsPresenter" grid:SelectiveScrollingGrid.SelectiveScrollingClip="True" Grid.Column="3"/>
            </grid:SelectiveScrollingGrid>
        </Border>
    </ControlTemplate>
    <Style x:Key="GridViewFooterRowStyle" TargetType="grid:GridViewFooterRow">
        <Setter Property="Template" Value="{StaticResource GridViewFooterRowTemplate}"/>
        <Setter Property="Background" Value="{StaticResource GridView_FooterBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="MinHeight" Value="27"/>
        <Setter Property="BorderThickness" Value="0 1 0 0"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewFooterRow" BasedOn="{StaticResource GridViewFooterRowStyle}"/>
    <DataTemplate x:Key="GridViewGroupFooterIndentCellDataTemplate">
        <grid:GridViewGroupFooterIndentCell/>
    </DataTemplate>
    <ControlTemplate x:Key="GridViewGroupFooterRowTemplate" TargetType="grid:GridViewGroupFooterRow">
        <Border x:Name="PART_GroupFooterRowBorder"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                Background="{TemplateBinding Background}"
                Padding="{TemplateBinding Padding}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
            <grid:SelectiveScrollingGrid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="PART_IndicatorPresenter"
                        Width="25"
                        VerticalAlignment="Stretch"
                        Grid.Column="0"
                        Visibility="{TemplateBinding RowIndicatorVisibility}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="0 0 1 0">
                    <Border Background="{StaticResource GridView_RowIndicatorCellBackground}" BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="1"/>
                </Border>
                <Border x:Name="PART_HierarchyIndent"
                        Width="25"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="0 0 1 0"
                        Grid.Column="2"
                        Visibility="{Binding HasHierarchy, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
                <grid:DataCellsPresenter x:Name="PART_DataCellsPresenter" Grid.Column="3"/>
                <grid:IndentPresenter x:Name="PART_IndentPresenter"
                        IndentLevel="{TemplateBinding IndentLevel}"
                        ItemTemplate="{StaticResource GridViewGroupFooterIndentCellDataTemplate}"
                        Grid.Column="1"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            </grid:SelectiveScrollingGrid>
        </Border>
    </ControlTemplate>
    <Style x:Key="GridViewGroupFooterRowStyle" TargetType="grid:GridViewGroupFooterRow">
        <Setter Property="Template" Value="{StaticResource GridViewGroupFooterRowTemplate}"/>
        <Setter Property="Background" Value="{StaticResource GridView_FooterBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="MinHeight" Value="25"/>
        <Setter Property="BorderThickness" Value="0 0 0 1"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewGroupFooterRow" BasedOn="{StaticResource GridViewGroupFooterRowStyle}"/>
    <ControlTemplate x:Key="GridViewCheckBoxTemplate" TargetType="grid:GridViewCheckBox">
        <Grid HorizontalAlignment="Left" VerticalAlignment="Center" Width="13" Height="13">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CheckStates">
                    <VisualState x:Name="Checked">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames BeginTime="0" Duration="0" Storyboard.TargetName="CheckedPath" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Unchecked"/>
                    <VisualState x:Name="Indeterminate">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames BeginTime="0" Duration="0" Storyboard.TargetName="IndeterminatePath" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border BorderBrush="#FF989898" BorderThickness="1 1 1 1">
                <Border BorderBrush="#FFEEEEEE" BorderThickness="1 1 1 1">
                    <Border BorderThickness="1 1 1 1" Background="#FFE0E0E0" BorderBrush="#FFB9B9B9">
                        <Grid Margin="0">
                            <Path x:Name="IndeterminatePath"
                                    Visibility="Collapsed"
                                    Stretch="Fill"
                                    Stroke="#FF8D8D8D"
                                    StrokeThickness="1.5"
                                    Data="M14.708333,144.5 L20.667,144.5"
                                    Width="7"
                                    Height="7"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Margin="0"/>
                            <Path x:Name="CheckedPath"
                                    Visibility="Collapsed"
                                    Stretch="Fill"
                                    Stroke="#FF8D8D8D"
                                    Data="M32.376187,77.162509 L35.056467,80.095277 40.075451,70.02144"
                                    StrokeThickness="1.5"
                                    Margin="0"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"/>
                        </Grid>
                    </Border>
                </Border>
            </Border>
        </Grid>
    </ControlTemplate>
    <Style x:Key="GridViewCheckBoxStyle" TargetType="grid:GridViewCheckBox">
        <Setter Property="Template" Value="{StaticResource GridViewCheckBoxTemplate}"/>
    </Style>
    <Style TargetType="grid:GridViewCheckBox" BasedOn="{StaticResource GridViewCheckBoxStyle}"/>
    <ControlTemplate x:Key="GridViewDataControlTemplate" TargetType="grid:GridViewDataControl">
        <Border x:Name="PART_MasterGridContainer"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Padding="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="GridViewActivity">
                    <VisualState x:Name="Idle">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_GridViewLoadingIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Busy">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_GridViewLoadingIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ColumnHeadersVisibility">
                    <VisualState x:Name="ColumnHeadersVisible"/>
                    <VisualState x:Name="ColumnHeadersCollapsed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_HeaderRow" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ColumnFootersVisibility">
                    <VisualState x:Name="ColumnFootersVisible"/>
                    <VisualState x:Name="ColumnFootersCollapsed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FooterRow" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="GroupPanelVisibility">
                    <VisualState x:Name="GroupPanelVisible"/>
                    <VisualState x:Name="GroupPanelCollapsed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_GroupPanel" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="DisabledStates">
                    <VisualState x:Name="Enabled"/>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Disabled" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <grid:GridViewGroupPanel x:Name="PART_GroupPanel"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                        Background="{TemplateBinding GroupPanelBackground}"
                        Foreground="{TemplateBinding GroupPanelForeground}"
                        BorderBrush="{StaticResource GridView_GroupPanelOuterBorder}"/>
                <StackPanel Grid.Row="1">
                    <grid:GridViewHeaderRow x:Name="PART_HeaderRow" grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" IndentLevel="{TemplateBinding GroupCount}"/>
                    <grid:GridViewNewRow x:Name="PART_AddNewRow" VerticalAlignment="Bottom" HorizontalAlignment="Left" IndentLevel="{TemplateBinding GroupCount}" Visibility="Collapsed"/>
                </StackPanel>
                <grid:GridViewVirtualizingPanel x:Name="PART_GridViewVirtualizingPanel" Grid.Row="2"/>
                <StackPanel Grid.Row="3">
                    <grid:GridViewFooterRow x:Name="PART_FooterRow" IndentLevel="{TemplateBinding GroupCount}"/>
                </StackPanel>
                <grid:ScrollPositionIndicator x:Name="PART_ScrollPositionIndicator"
                        Margin="0 0 28 0"
                        IsHitTestVisible="False"
                        HorizontalAlignment="Right"
                        Grid.Row="2"
                        ContentTemplate="{TemplateBinding ScrollPositionIndicatorTemplate}"
                        Visibility="{Binding IsScrolling, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"/>
                <Border x:Name="PART_FrozenColumnsPreview" Grid.Row="1" Visibility="Collapsed" HorizontalAlignment="Left" Grid.RowSpan="3" Background="#33000000" Width="6"/>
                <grid:GridViewLoadingIndicator x:Name="PART_GridViewLoadingIndicator" Visibility="Collapsed" IsBusy="{Binding IsBusy, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                <Rectangle x:Name="Background_Disabled" Fill="{StaticResource Background_Disabled}" IsHitTestVisible="False" Grid.RowSpan="5" Visibility="Collapsed"/>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="GridViewDataControlStyle" TargetType="grid:GridViewDataControl">
        <Setter Property="Template" Value="{StaticResource GridViewDataControlTemplate}"/>
        <Setter Property="Background" Value="{StaticResource ControlBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Foreground" Value="{StaticResource ControlForeground}"/>
        <Setter Property="AlternateRowBackground" Value="{StaticResource Item_AlternateBackground}"/>
        <Setter Property="VerticalGridLinesBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
        <Setter Property="HorizontalGridLinesBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
        <Setter Property="GroupPanelBackground" Value="{StaticResource GridView_GroupPanelBackground}"/>
        <Setter Property="GroupPanelForeground" Value="{StaticResource GridView_GroupPanelForeground}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewDataControl" BasedOn="{StaticResource GridViewDataControlStyle}"/>
    <ControlTemplate x:Key="GridViewEditorPresenter_ValidationToolTipTemplate" TargetType="ToolTip">
        <Grid x:Name="Root" Margin="5 0" Opacity="0" RenderTransformOrigin="0,0">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0"/>
                        <VisualTransition GeneratedDuration="0:0:0.2" To="Open">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualTransition>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Closed">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Open">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RenderTransform>
                <TranslateTransform x:Name="xform" X="-25"/>
            </Grid.RenderTransform>
            <Border
                    MinHeight="22"
                    Background="{StaticResource GridView_ValidationTooltipBackground}"
                    BorderBrush="{StaticResource GridView_ValidationTooltipOuterBorder}"
                    BorderThickness="1"
                    CornerRadius="{StaticResource GridView_ValidationTooltipCornerRadius}">
                <Border BorderBrush="{StaticResource GridView_ValidationTooltipInnerBorder}" BorderThickness="1">
                    <TextBlock Margin="4 1" MaxWidth="250" Foreground="{StaticResource GridView_ValidationTooltipForeground}" Text="{TemplateBinding Content}" TextWrapping="Wrap"/>
                </Border>
            </Border>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="GridViewEditorPresenterTemplate" TargetType="grid:GridViewEditorPresenter">
        <Grid>
            <ContentPresenter Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            <Border x:Name="ValidationErrorElement"
                    Visibility="Collapsed"
                    CornerRadius="1"
                    BorderBrush="{StaticResource ControlOuterBorder_Invalid}"
                    BorderThickness="1"
                    Margin="1 1 2 2">
                <ToolTipService.ToolTip>
                    <ToolTip x:Name="validationTooltip" Placement="Right" Content="{TemplateBinding ErrorMessage}" Template="{StaticResource GridViewEditorPresenter_ValidationToolTipTemplate}"/>
                </ToolTipService.ToolTip>
                <Grid Height="12" HorizontalAlignment="Right" Margin="1 -4 -4 0" VerticalAlignment="Top" Width="12" Background="Transparent">
                    <Path Fill="{StaticResource ControlOuterBorder_Invalid}" Margin="1 3 0 0" Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z"/>
                    <Path Fill="{StaticResource ControlInnerBorder_Invalid}" Margin="1 3 0 0" Data="M 0,0 L2,0 L 8,6 L8,8"/>
                </Grid>
            </Border>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="ValueStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="InvalidFocusedState">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
        </Grid>
    </ControlTemplate>
    <Style x:Key="GridViewEditorPresenterStyle" TargetType="grid:GridViewEditorPresenter">
        <Setter Property="Template" Value="{StaticResource GridViewEditorPresenterTemplate}"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Padding" Value="1 1 2 2"/>
    </Style>
    <Style TargetType="grid:GridViewEditorPresenter" BasedOn="{StaticResource GridViewEditorPresenterStyle}"/>
    <ControlTemplate x:Key="GridViewToggleButtonTemplate" TargetType="controls:GridViewToggleButton">
        <Border Background="Transparent" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver"/>
                    <VisualState x:Name="Disabled"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CheckStates">
                    <VisualState x:Name="Checked">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="plus" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="minus" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Unchecked"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused"/>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <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>
    <ControlTemplate x:Key="GridViewToggleButtonArrowTemplate" TargetType="controls:GridViewToggleButton">
        <Border Background="Transparent" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver"/>
                    <VisualState x:Name="Disabled"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CheckStates">
                    <VisualState x:Name="Checked">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="plus" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="minus" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Unchecked"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused"/>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border Width="9" Height="9">
                <Grid>
                    <Path x:Name="plus"
                            Stretch="Fill"
                            Width="6"
                            Height="9"
                            Data="M0.5,0.5 L6.5,3.5 0.5,6.5 z"
                            Fill="{StaticResource GridView_ToggleButtonForeground_Arrow}"
                            Stroke="{StaticResource GridView_ToggleButtonStroke_Arrow}"
                            StrokeThickness="{TemplateBinding BorderThickness}"
                            Margin="{TemplateBinding Padding}"/>
                    <Path x:Name="minus"
                            Stretch="Fill"
                            Width="7"
                            Height="7"
                            Data="M6.5,0.5 L6.5,6.5 0.5,6.5 z"
                            Fill="{StaticResource GridView_ToggleButtonForeground_Checked}"
                            Stroke="{StaticResource GridView_ToggleButtonStroke_Checked}"
                            StrokeThickness="{TemplateBinding BorderThickness}"
                            Margin="{TemplateBinding Padding}"
                            Opacity="0"/>
                </Grid>
            </Border>
        </Border>
    </ControlTemplate>
    <Style x:Key="GridViewToggleButtonStyle" TargetType="controls:GridViewToggleButton">
        <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 GridViewToggleButtonTemplate}"/>
        <Setter Property="PlusMinusTemplate" Value="{StaticResource GridViewToggleButtonTemplate}"/>
        <Setter Property="ArrowTemplate" Value="{StaticResource GridViewToggleButtonArrowTemplate}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="controls:GridViewToggleButton" BasedOn="{StaticResource GridViewToggleButtonStyle}"/>
    <ControlTemplate x:Key="GridViewGroupPanelTemplate" TargetType="grid:GridViewGroupPanel">
        <Grid UseLayoutRounding="True">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="Grouping">
                    <VisualState x:Name="NoGroups"/>
                    <VisualState x:Name="HasGroups">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="panelText" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="panelTextGrouped" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                <Border Background="{TemplateBinding Background}" BorderBrush="{StaticResource GridView_GroupPanelInnerBorder}" BorderThickness="1"/>
            </Border>
            <StackPanel Orientation="Horizontal" Margin="0,0,8,0">
                <TextBlock x:Name="panelText"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        Margin="{TemplateBinding Padding}"
                        FontSize="9.5"
                        telerik:LocalizationManager.ResourceKey="GridViewGroupPanelText"
                        IsHitTestVisible="False"/>
                <TextBlock x:Name="panelTextGrouped"
                        Margin="{TemplateBinding Padding}"
                        Visibility="Collapsed"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        telerik:LocalizationManager.ResourceKey="GridViewGroupPanelTopTextGrouped"
                        IsHitTestVisible="False"/>
                <ItemsPresenter VerticalAlignment="Center"/>
            </StackPanel>
        </Grid>
    </ControlTemplate>
    <ItemsPanelTemplate x:Key="GridViewGroupPanelItemsPanelTemplate">
        <StackPanel Orientation="Horizontal" VerticalAlignment="Stretch"/>
    </ItemsPanelTemplate>
    <Style x:Key="GridViewGroupPanelStyle" TargetType="grid:GridViewGroupPanel">
        <Setter Property="Template" Value="{StaticResource GridViewGroupPanelTemplate}"/>
        <Setter Property="ItemsPanel" Value="{StaticResource GridViewGroupPanelItemsPanelTemplate}"/>
        <Setter Property="MinHeight" Value="32"/>
        <Setter Property="Margin" Value="0"/>
        <Setter Property="Padding" Value="10 0 3 0"/>
        <Setter Property="Background" Value="{StaticResource GridView_GroupPanelBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_GroupPanelOuterBorder}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewGroupPanel" BasedOn="{StaticResource GridViewGroupPanelStyle}"/>
    <ControlTemplate x:Key="CloseButtonTemplate" TargetType="Button">
        <Border x:Name="CloseButton"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="1"
                Width="11"
                Height="11"
                Background="{TemplateBinding Background}">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Unfocused"/>
                    <VisualState x:Name="Focused"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource GridView_HeaderBackground_Over}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource GridView_HeaderOuterBorder_Over}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="Pressed"/>
                    <VisualState x:Name="Disabled"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Path
                    Fill="{StaticResource GridView_IndicatorPrimaryColor}"
                    Margin="{TemplateBinding Padding}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Width="5"
                    Height="5"
                    Data="M4,4L5,4 5,5 4,5z M0,4L1,4 1,5 0,5z M3,3L4,3 4,4 3,4z M1,3L2,3 2,4 1,4z M2,2L3,2 3,3 2,3z M4,0L5,0 5,1 4,1 4,2 3,2 3,0.99999994 4,0.99999994z M0,0L1,0 1,0.99999994 2,0.99999994 2,2 1,2 1,1 0,1z"/>
        </Border>
    </ControlTemplate>
    <Style x:Key="ButtonCloseStyle" TargetType="Button">
        <Setter Property="Template" Value="{StaticResource CloseButtonTemplate}"/>
        <Setter Property="Background" Value="{StaticResource ControlBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
    </Style>
    <ControlTemplate x:Key="GridViewGroupPanelCellTemplate" TargetType="grid:GridViewGroupPanelCell">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="00:00:00.2000000" To="MouseOver"/>
                        <VisualTransition GeneratedDuration="00:00:00.2000000" To="Normal"/>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames
                                    BeginTime="00:00:00"
                                    Duration="00:00:00.0010000"
                                    Storyboard.TargetName="ContentElement"
                                    Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="-7"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="PART_CloseButton" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="SortDirection">
                    <VisualState x:Name="Ascending">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_SortIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_SortIndicator" Storyboard.TargetProperty="RenderTransform">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <ScaleTransform ScaleX="1" ScaleY="-1"/>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Descending">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_SortIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_SortIndicator" Storyboard.TargetProperty="RenderTransform">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="None">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_SortIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="OuterBorder" CornerRadius="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                <Border x:Name="InnerBorder"
                        BorderBrush="{StaticResource GridView_HeaderInnerBorder}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{TemplateBinding Background}">
                    <Grid>
                        <Path x:Name="PART_SortIndicator"
                                Fill="{StaticResource GridView_SortIndicatorColor_Sorted}"
                                Stretch="Fill"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Top"
                                Margin="0 1 0 0"
                                Data="M0,0 L1,0 2,0 3,0 4,0 5,0 5,1 4,1 4,2 3,2 3,3 2,3 2,2 1,2 1,1 0,1 0,0 z"
                                Width="5"
                                Height="3"
                                RenderTransformOrigin=".5,.5"
                                Visibility="Collapsed"/>
                        <ContentControl x:Name="ContentElement"
                                Content="{TemplateBinding Content}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                Margin="{TemplateBinding Padding}"
                                Foreground="{TemplateBinding Foreground}"
                                IsTabStop="{TemplateBinding IsTabStop}">
                            <ContentControl.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <RotateTransform/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </ContentControl.RenderTransform>
                        </ContentControl>
                        <Button x:Name="PART_CloseButton" Style="{StaticResource ButtonCloseStyle}" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="4 0" Opacity="0"/>
                    </Grid>
                </Border>
            </Border>
        </Grid>
    </ControlTemplate>
    <Style x:Key="GridViewGroupPanelCellStyle" TargetType="grid:GridViewGroupPanelCell">
        <Setter Property="Template" Value="{StaticResource GridViewGroupPanelCellTemplate}"/>
        <Setter Property="Background" Value="{StaticResource GridView_HeaderBackground}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_HeaderOuterBorder}"/>
        <Setter Property="Padding" Value="20 0"/>
        <Setter Property="MinHeight" Value="24"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="Foreground" Value="{StaticResource GridView_HeaderForeground}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewGroupPanelCell" BasedOn="{StaticResource GridViewGroupPanelCellStyle}"/>
    <telerik:InvertedBooleanToOpacityConverter x:Key="InvertedBooleanToOpacityConverter"/>
    <ControlTemplate x:Key="GridViewGroupPanelItemTemplate" TargetType="grid:GridViewGroupPanelItem">
        <StackPanel x:Name="PART_GroupPanelItemStackPanel"
                Orientation="Horizontal"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                Background="{TemplateBinding Background}">
            <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
                <Grid.RowDefinitions>
                    <RowDefinition MinHeight="4" Height="Auto"/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <Path
                        Name="PART_InsertionPoint"
                        Grid.Row="0"
                        Visibility="{TemplateBinding InsertionPointVisibility}"
                        Fill="{StaticResource GridView_IndicatorPrimaryColor}"
                        Stretch="Fill"
                        VerticalAlignment="Top"
                        HorizontalAlignment="Center"
                        Width="6.414"
                        Height="4.677"
                        Data="M206.66812,170.31108 L212.08199,170.31108 209.36058,173.98834 z"/>
                <Grid x:Name="PART_ConnectingLine"
                        Grid.Row="1"
                        Margin="{TemplateBinding Padding}"
                        Opacity="{Binding IsFirst, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanToOpacityConverter}}">
                    <Path
                            Fill="{StaticResource GridView_IndicatorSecondaryColor}"
                            Stretch="Fill"
                            Stroke="{x:Null}"
                            Width="4"
                            Height="7"
                            Data="M0,0 L1,0 1,1 2,1 2,2 3,2 3,3 4,3 4,4 3,4 3,5 2,5 2,6 1,6 1,7 0,7 z"
                            Margin="1 2 0 0"/>
                    <Path
                            Fill="{StaticResource GridView_IndicatorPrimaryColor}"
                            Stretch="Fill"
                            Stroke="{x:Null}"
                            Width="4"
                            Height="7"
                            Data="M0,0 L1,0 1,1 2,1 2,2 3,2 3,3 4,3 4,4 3,4 3,5 2,5 2,6 1,6 1,7 0,7 z"/>
                </Grid>
            </Grid>
            <grid:GridViewGroupPanelCell Content="{TemplateBinding Content}" SortDirection="{Binding Path=SortDirection}" x:Name="PART_Cell"/>
            <Path
                    Name="PART_RightInsertionPoint"
                    Grid.Row="0"
                    Visibility="{TemplateBinding RightInsertionPointVisibility}"
                    Fill="{StaticResource GridView_IndicatorPrimaryColor}"
                    Stretch="Fill"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Center"
                    Width="6.414"
                    Height="4.677"
                    Data="M206.66812,170.31108 L212.08199,170.31108 209.36058,173.98834 z"/>
        </StackPanel>
    </ControlTemplate>
    <Style x:Key="GridViewGroupPanelItemStyle" TargetType="grid:GridViewGroupPanelItem">
        <Setter Property="Template" Value="{StaticResource GridViewGroupPanelItemTemplate}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Padding" Value="2 0 2 2"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewGroupPanelItem" BasedOn="{StaticResource GridViewGroupPanelItemStyle}"/>
    <ControlTemplate x:Key="GridViewLoadingIndicatorTemplate" TargetType="grid:GridViewLoadingIndicator">
        <Border x:Name="BusyIndicatorBackground" Background="{StaticResource GridView_LoadingBackground}" Opacity="0">
            <Path x:Name="BusyIndicator"
                    Stretch="Fill"
                    Stroke="{TemplateBinding BorderBrush}"
                    StrokeThickness="{TemplateBinding BorderThickness}"
                    Fill="{TemplateBinding Background}"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Width="36"
                    Height="36"
                    Data="M18,5.0000002 C10.820298,5 5,10.820298 5.0000002,18 5,25.179701 10.820298,31 18,31 25.179701,31 31,25.179701 31,18 31,10.820298 25.179701,5 18,5.0000002 z M18,0 C27.941126,0 36,8.0588746 36,18 36,27.941126 27.941126,36 18,36 8.0588746,36 0,27.941126 0,18 0,8.0588746 8.0588746,0 18,0 z"
                    RenderTransformOrigin="0.5,0.5">
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform Angle="-180"/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Path.RenderTransform>
            </Path>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Idle"/>
                    <VisualState x:Name="Loading">
                        <Storyboard RepeatBehavior="Forever">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="BusyIndicatorBackground" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="BusyIndicator" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="180"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
        </Border>
    </ControlTemplate>
    <Style x:Key="GridViewLoadingIndicatorStyle" TargetType="grid:GridViewLoadingIndicator">
        <Setter Property="Template" Value="{StaticResource GridViewLoadingIndicatorTemplate}"/>
        <Setter Property="Background" Value="{StaticResource GridView_LoadingIndicatorBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_LoadingIndicatorBorder}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
    </Style>
    <Style TargetType="grid:GridViewLoadingIndicator" BasedOn="{StaticResource GridViewLoadingIndicatorStyle}"/>
    <ControlTemplate x:Key="GridViewScrollViewerTemplate" TargetType="grid:GridViewScrollViewer">
        <Grid x:Name="PART_RootPanel" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="2" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <ScrollBar x:Name="PART_VerticalScrollBar"
                    BorderThickness="1 0 0 0"
                    IsTabStop="False"
                    Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                    Grid.Column="1"
                    Grid.Row="0"
                    Grid.RowSpan="4"
                    Orientation="Vertical"
                    ViewportSize="{TemplateBinding ViewportHeight}"
                    Maximum="{TemplateBinding ScrollableHeight}"
                    Minimum="0.0"
                    Value="{Binding VerticalOffset, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"/>
            <ScrollBar x:Name="PART_HorizontalScrollBar"
                    BorderThickness="0 1 0 0"
                    IsTabStop="False"
                    Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                    Grid.Column="0"
                    Grid.Row="4"
                    Orientation="Horizontal"
                    ViewportSize="{TemplateBinding ViewportWidth}"
                    Maximum="{TemplateBinding ScrollableWidth}"
                    Minimum="0.0"
                    Value="{Binding HorizontalOffset, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"/>
            <Rectangle Grid.Column="1" Grid.Row="4" Fill="{StaticResource GridView_ScrollViewerIntersectionRectangleBackground}"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="GridViewScrollViewerStyle" TargetType="grid:GridViewScrollViewer">
        <Setter Property="Template" Value="{StaticResource GridViewScrollViewerTemplate}"/>
    </Style>
    <Style TargetType="grid:GridViewScrollViewer" BasedOn="{StaticResource GridViewScrollViewerStyle}"/>
    <ControlTemplate x:Key="IndentPresenterTemplate" TargetType="grid:IndentPresenter">
        <Grid>
            <ItemsPresenter/>
        </Grid>
    </ControlTemplate>
    <DataTemplate x:Key="IndentPresenterItemTemplate">
        <grid:GridViewIndentCell/>
    </DataTemplate>
    <ItemsPanelTemplate x:Key="IndentPresenterItemsPanelTemplate">
        <StackPanel Orientation="Horizontal"/>
    </ItemsPanelTemplate>
    <Style x:Key="IndentPresenterStyle" TargetType="grid:IndentPresenter">
        <Setter Property="Template" Value="{StaticResource IndentPresenterTemplate}"/>
        <Setter Property="ItemTemplate" Value="{StaticResource IndentPresenterItemTemplate}"/>
        <Setter Property="ItemsPanel" Value="{StaticResource IndentPresenterItemsPanelTemplate}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:IndentPresenter" BasedOn="{StaticResource IndentPresenterStyle}"/>
    <ControlTemplate x:Key="RadGridViewTemplate" TargetType="controls:RadGridView">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="GridViewActivity">
                    <VisualState x:Name="Idle">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_GridViewLoadingIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Busy">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_GridViewLoadingIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ColumnHeadersVisibility">
                    <VisualState x:Name="ColumnHeadersVisible">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_HeaderRow" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="ColumnHeadersCollapsed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_HeaderRow" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ColumnFootersVisibility">
                    <VisualState x:Name="ColumnFootersVisible">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FooterRow" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="ColumnFootersCollapsed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FooterRow" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="GroupPanelVisibility">
                    <VisualState x:Name="GroupPanelVisible">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_GroupPanel" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="GroupPanelCollapsed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_GroupPanel" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="InsertRowVisibility">
                    <VisualState x:Name="InsertRowVisible">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_AddNewRow" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="InsertRowCollapsed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_AddNewRow" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="DisabledStates">
                    <VisualState x:Name="Enabled"/>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Disabled" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition x:Name="PART_AttachedBehaviorRow" Height="Auto"/>
                <RowDefinition/>
                <RowDefinition x:Name="ScrollBarRow" MinHeight="0" Height="0"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition x:Name="ScrollBarColumn" MinWidth="0" Width="0"/>
                <ColumnDefinition Width="auto"/>
            </Grid.ColumnDefinitions>
            <grid:GridViewGroupPanel x:Name="PART_GroupPanel"
                    Grid.ColumnSpan="3"
                    Background="{TemplateBinding GroupPanelBackground}"
                    Foreground="{TemplateBinding GroupPanelForeground}"
                    BorderBrush="{StaticResource GridView_GroupPanelOuterBorder}"/>
            <ItemsControl x:Name="PART_ControlPanelItemsControl" Grid.Column="2" IsTabStop="False" HorizontalAlignment="Right">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <grid:ControlPanelItemControl/>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
            <Border
                    Name="PART_MasterGridContainer"
                    Grid.Row="2"
                    Grid.RowSpan="5"
                    Grid.ColumnSpan="3"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}"
                    Margin="0,-1,0,0"/>
            <grid:GridViewScrollViewer x:Name="PART_ItemsScrollViewer" Background="Transparent" CanContentScroll="True" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="3" Margin="1,0,1,1">
                <grid:GridViewScrollViewer.HeaderRow>
                    <grid:GridViewHeaderRow x:Name="PART_HeaderRow" IndentLevel="{TemplateBinding GroupCount}"/>
                </grid:GridViewScrollViewer.HeaderRow>
                <grid:GridViewScrollViewer.NewRow>
                    <grid:GridViewNewRow x:Name="PART_AddNewRow" IndentLevel="{TemplateBinding GroupCount}" Visibility="Collapsed"/>
                </grid:GridViewScrollViewer.NewRow>
                <grid:GridViewScrollViewer.FooterRow>
                    <grid:GridViewFooterRow x:Name="PART_FooterRow" IndentLevel="{TemplateBinding GroupCount}"/>
                </grid:GridViewScrollViewer.FooterRow>
                <grid:GridViewVirtualizingPanel x:Name="PART_GridViewVirtualizingPanel"/>
            </grid:GridViewScrollViewer>
            <grid:ScrollPositionIndicator x:Name="PART_ScrollPositionIndicator"
                    Margin="0 0 28 0"
                    IsHitTestVisible="False"
                    HorizontalAlignment="Right"
                    Grid.Row="2"
                    Grid.ColumnSpan="2"
                    Visibility="{Binding IsScrolling, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                    ContentTemplate="{TemplateBinding ScrollPositionIndicatorTemplate}"/>
            <Border x:Name="PART_FrozenColumnsPreview"
                    Grid.Row="1"
                    Visibility="Collapsed"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    Grid.RowSpan="4"
                    Background="#33000000"
                    Width="6"/>
					<Border Grid.Row="5" Grid.ColumnSpan="4" BorderBrush="{StaticResource  ControlOuterBorder}" BorderThickness="0,1,0,0">
					<StackPanel Orientation="Horizontal">
						<TextBlock Text="Items Count:"  FontSize="18" Margin="4" FontFamily="Segoe UI Light"/>
					<TextBlock  FontSize="18" Margin="4" FontFamily="Segoe UI Light"  Text="{Binding Items.Count,RelativeSource={RelativeSource TemplatedParent}}"/>
					</StackPanel>
					</Border>
            <grid:GridViewLoadingIndicator x:Name="PART_GridViewLoadingIndicator"
                    Visibility="Collapsed"
                    IsBusy="{Binding IsBusy, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    Grid.RowSpan="4"
                    Grid.ColumnSpan="3"/>
            <Rectangle x:Name="Background_Disabled" Fill="{StaticResource Background_Disabled}" IsHitTestVisible="False" Grid.RowSpan="5" Grid.ColumnSpan="3" Visibility="Collapsed"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadGridViewStyle" TargetType="controls:RadGridView">
        <Setter Property="Template" Value="{StaticResource RadGridViewTemplate}"/>
        <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="AlternateRowBackground" Value="{StaticResource Item_AlternateBackground}"/>
        <Setter Property="VerticalGridLinesBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
        <Setter Property="HorizontalGridLinesBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
        <Setter Property="GroupPanelBackground" Value="{StaticResource GridView_GroupPanelBackground}"/>
        <Setter Property="GroupPanelForeground" Value="{StaticResource GridView_GroupPanelForeground}"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="Tag" Value="OfficeBlack"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="controls:RadGridView" BasedOn="{StaticResource RadGridViewStyle}"/>
    <Style x:Key="TreeListViewDragCueStyle" TargetType="controls:TreeListViewDragCue">
        <Setter Property="IsHitTestVisible" Value="False"/>
        <Setter Property="Padding" Value="3 0"/>
        <Setter Property="Foreground" Value="{StaticResource TreeListView_DragCue_Foreground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource TreeListView_DragCue_OuterBorder}"/>
        <Setter Property="Background" Value="{StaticResource TreeListView_DragCue_Background}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:TreeListViewDragCue">
                    <StackPanel>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="DropStates">
                                <VisualState x:Name="DropPossible"/>
                                <VisualState x:Name="DropImpossible">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropImpossibleIconElement" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropPossibleIconElement" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid HorizontalAlignment="Left" Visibility="{TemplateBinding DragPreviewVisibility}" MinHeight="18">
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="1">
                                <Border BorderBrush="{StaticResource TreeListView_DragCue_InnerBorder}" Background="{TemplateBinding Background}" BorderThickness="1">
                                    <ItemsPresenter Margin="{TemplateBinding Padding}"/>
                                </Border>
                            </Border>
                            <Grid x:Name="DraggedItemsCountContainer" Visibility="Collapsed" Width="Auto" Height="Auto" HorizontalAlignment="Center" VerticalAlignment="Center">
                                <Border
                                        BorderBrush="{StaticResource TreeListView_DragCue_DraggedItemsCount_Border}"
                                        Background="{StaticResource TreeListView_DragCue_DraggedItemsCount_Background}"
                                        MinHeight="18"
                                        BorderThickness="1"
                                        CornerRadius="1"
                                        Margin="0 2 0 0"
                                        Padding="4 0"/>
                                <TextBlock
                                        Margin="3"
                                        x:Name="DraggedItemsCountText"
                                        HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                        VerticalAlignment="{TemplateBinding VerticalAlignment}"
                                        Text="5"/>
                            </Grid>
                        </Grid>
                        <Border
                                BorderBrush="{StaticResource TreeListView_DragCue_DraggedItemsCount_Border}"
                                Background="{StaticResource TreeListView_DragCue_DraggedItemsCount_Background}"
                                MinHeight="18"
                                BorderThickness="1"
                                CornerRadius="1"
                                Margin="0 2 0 0"
                                Padding="4 0"
                                Visibility="{TemplateBinding DragTooltipVisibility}">
                            <StackPanel Orientation="Horizontal">
                                <ContentPresenter x:Name="DropImpossibleIconElement"
                                        Content="{TemplateBinding DropImpossibleIcon}"
                                        ContentTemplate="{TemplateBinding DropImpossibleIconTemplate}"
                                        Visibility="Collapsed"/>
                                <ContentPresenter x:Name="DropPossibleIconElement" Content="{TemplateBinding DropPossibleIcon}" ContentTemplate="{TemplateBinding DropPossibleIconTemplate}"/>
                                <ContentControl Margin="4 0 0 0" Content="{TemplateBinding DragActionContent}" ContentTemplate="{TemplateBinding DragActionContentTemplate}" VerticalAlignment="Center"/>
                                <ContentControl Content="{TemplateBinding DragTooltipContent}" ContentTemplate="{TemplateBinding DragTooltipContentTemplate}" VerticalAlignment="Center"/>
                            </StackPanel>
                        </Border>
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="DropImpossibleIcon" Value="The icon is assigned as DataTemplate because assigning as Content triggers a bug in Silverlight"/>
        <Setter Property="DropImpossibleIconTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Path
                                Fill="{StaticResource TreeListView_DragCue_ImpossibleIconFill}"
                                Stretch="Fill"
                                StrokeThickness="0.5"
                                Width="11"
                                Height="11"
                                Data="M2.0090871,3.5463004 L1.9827784,3.5933623 C1.6748887,4.1601357 1.5,4.8096442 1.5,5.5 1.5,7.7091389 3.2908609,9.5 5.5,9.5 6.1903558,9.5 6.8398643,9.3251114 7.4066377,9.0172215 L7.4536991,8.9909134 z M5.5,1.5 C4.7406082,1.5 4.0306425,1.7116154 3.4258544,2.0790935 L3.3916554,2.1004417 8.8995581,7.6083441 8.9209061,7.5741453 C9.2883844,6.9693575 9.5,6.2593913 9.5,5.5 9.5,3.2908609 7.7091389,1.5 5.5,1.5 z M5.5,0 C8.5375662,0 11,2.4624338 11,5.5 11,8.5375662 8.5375662,11 5.5,11 2.4624338,11 0,8.5375662 0,5.5 0,2.4624338 2.4624338,0 5.5,0 z"/>
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="DropPossibleIcon" Value="The icon is assigned as DataTemplate because assigning as Content triggers a bug in Silverlight"/>
        <Setter Property="DropPossibleIconTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Path
                                Stretch="Fill"
                                Fill="{StaticResource TreeListView_DragCue_PossibleIconFill}"
                                Width="7"
                                Height="7"
                                RenderTransformOrigin="0.5,0.5"
                                Data="M1.4142136,0 L4.3952246,2.9810109 4.3952246,0.39269829 6.3952246,0.39269829 6.3952246,6.3926982 6.3926983,6.3926982 6.3926983,6.3952246 0.39269831,6.3952246 0.39269831,4.3952246 2.9810112,4.3952246 0,1.4142134 z">
                            <Path.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <RotateTransform Angle="-45"/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </Path.RenderTransform>
                        </Path>
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="controls:TreeListViewDragCue" BasedOn="{StaticResource TreeListViewDragCueStyle}"/>
    <ControlTemplate x:Key="RadTreeListViewTemplate" TargetType="controls:RadTreeListView">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="GridViewActivity">
                    <VisualState x:Name="Idle">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_GridViewLoadingIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Busy">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_GridViewLoadingIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ColumnHeadersVisibility">
                    <VisualState x:Name="ColumnHeadersVisible">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_HeaderRow" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="ColumnHeadersCollapsed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_HeaderRow" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ColumnFootersVisibility">
                    <VisualState x:Name="ColumnFootersVisible">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FooterRow" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="ColumnFootersCollapsed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FooterRow" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="InsertRowVisibility">
                    <VisualState x:Name="InsertRowVisible">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_AddNewRow" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="InsertRowCollapsed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_AddNewRow" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="DisabledStates">
                    <VisualState x:Name="Enabled"/>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Disabled" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition x:Name="PART_AttachedBehaviorRow" Height="Auto"/>
                <RowDefinition/>
                <RowDefinition x:Name="ScrollBarRow" MinHeight="0" Height="0"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition x:Name="ScrollBarColumn" MinWidth="0" Width="0"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <ItemsControl x:Name="PART_ControlPanelItemsControl" Grid.Column="2" IsTabStop="False" HorizontalAlignment="Right">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <grid:ControlPanelItemControl/>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
            <Border
                    Name="PART_MasterGridContainer"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Grid.Row="2"
                    Grid.RowSpan="4"
                    Grid.ColumnSpan="3"
                    Padding="{TemplateBinding Padding}"
                    Background="{TemplateBinding Background}"
                    Margin="0,-1,0,0"/>
            <grid:GridViewScrollViewer x:Name="PART_ItemsScrollViewer" Background="Transparent" CanContentScroll="True" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="3" Margin="1,0,1,1">
                <grid:GridViewScrollViewer.HeaderRow>
                    <grid:GridViewHeaderRow x:Name="PART_HeaderRow" IndentLevel="{TemplateBinding GroupCount}"/>
                </grid:GridViewScrollViewer.HeaderRow>
                <grid:GridViewScrollViewer.NewRow>
                    <grid:GridViewNewRow x:Name="PART_AddNewRow" IndentLevel="{TemplateBinding GroupCount}" Visibility="Collapsed"/>
                </grid:GridViewScrollViewer.NewRow>
                <grid:GridViewScrollViewer.FooterRow>
                    <grid:GridViewFooterRow x:Name="PART_FooterRow" IndentLevel="{TemplateBinding GroupCount}"/>
                </grid:GridViewScrollViewer.FooterRow>
                <treelist:TreeListViewVirtualizingPanel x:Name="PART_GridViewVirtualizingPanel"/>
            </grid:GridViewScrollViewer>
            <grid:ScrollPositionIndicator x:Name="PART_ScrollPositionIndicator"
                    Margin="0 0 28 0"
                    IsHitTestVisible="False"
                    HorizontalAlignment="Right"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    Visibility="{Binding IsScrolling, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                    ContentTemplate="{TemplateBinding ScrollPositionIndicatorTemplate}"/>
            <Border x:Name="PART_FrozenColumnsPreview"
                    Grid.Row="1"
                    Visibility="Collapsed"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    Grid.RowSpan="4"
                    Background="#33000000"
                    Width="6"/>
            <grid:GridViewLoadingIndicator x:Name="PART_GridViewLoadingIndicator"
                    Visibility="Collapsed"
                    Grid.RowSpan="4"
                    Grid.ColumnSpan="3"
                    IsBusy="{Binding IsBusy, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
            <Grid x:Name="DragBetweenItemsFeedback"
                    Grid.Row="2"
                    Height="8"
                    Visibility="Collapsed"
                    HorizontalAlignment="Left"
                    IsHitTestVisible="False"
                    VerticalAlignment="Top"
                    Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="8"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Ellipse Stroke="{StaticResource TreeListView_DragCue_EllipseStroke}" StrokeThickness="2" HorizontalAlignment="Left" VerticalAlignment="Center" Width="8" Height="8"/>
                <Rectangle Fill="{StaticResource TreeListView_DragCue_RectangleFill}" RadiusX="2" RadiusY="2" Margin="-2 3 0 0" VerticalAlignment="Top" Height="2" Grid.Column="1"/>
            </Grid>
            <Rectangle x:Name="Background_Disabled" Fill="{StaticResource Background_Disabled}" IsHitTestVisible="False" Grid.RowSpan="5" Visibility="Collapsed"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadTreeListViewStyle" TargetType="controls:RadTreeListView">
        <Setter Property="Template" Value="{StaticResource RadTreeListViewTemplate}"/>
        <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="AlternateRowBackground" Value="{StaticResource Item_AlternateBackground}"/>
        <Setter Property="VerticalGridLinesBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
        <Setter Property="HorizontalGridLinesBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="TreeLinesBrush" Value="#FF000000"/>
        <Setter Property="TreeLinesStrokeThickness" Value="0.2"/>
        <Setter Property="Tag" Value="OfficeBlack"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="controls:RadTreeListView" BasedOn="{StaticResource RadTreeListViewStyle}"/>
    <ControlTemplate x:Key="TreeListViewRow_ValidationToolTipTemplate" TargetType="ToolTip">
        <Grid x:Name="Root" Margin="5 0" Opacity="0" RenderTransformOrigin="0,0">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0"/>
                        <VisualTransition GeneratedDuration="0:0:0.2" To="Open">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualTransition>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Closed">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Open">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RenderTransform>
                <TranslateTransform x:Name="xform" X="-25"/>
            </Grid.RenderTransform>
            <ItemsControl ItemsSource="{TemplateBinding Content}">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Border
                                MinHeight="22"
                                Background="{StaticResource GridView_ValidationTooltipBackground}"
                                BorderBrush="{StaticResource GridView_ValidationTooltipOuterBorder}"
                                BorderThickness="1"
                                CornerRadius="{StaticResource GridView_ValidationTooltipCornerRadius}">
                            <Border BorderBrush="{StaticResource GridView_ValidationTooltipInnerBorder}" BorderThickness="1">
                                <TextBlock Margin="4 1" MaxWidth="250" Foreground="{StaticResource GridView_ValidationTooltipForeground}" Text="{Binding}" TextWrapping="Wrap"/>
                            </Border>
                        </Border>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="TreeListViewRowTemplate" TargetType="treelist:TreeListViewRow">
        <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Unfocused"/>
                    <VisualState x:Name="Focused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NavigatorIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="SelectionStates">
                    <VisualState x:Name="Unselected"/>
                    <VisualState x:Name="SelectedUnfocused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Over" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Over" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ItemOuterBorder_SelectedUnfocused}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundInner_Over" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ItemBackground_SelectedUnfocused}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundInner_Over" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ItemInnerBorder_SelectedUnfocused}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Over" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Selected">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Selected" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NavigatorIndicatorBackground" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource GridView_RowIndicatorCellBackground_Selected}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ValueStates">
                    <VisualState x:Name="RowValid"/>
                    <VisualState x:Name="RowInvalid">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Invalid" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ErrorIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="EditStates">
                    <VisualState x:Name="ReadOnlyMode"/>
                    <VisualState x:Name="EditMode">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="EditIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="InvalidEditMode">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Invalid" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InvalidEditableIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <grid:SelectiveScrollingGrid x:Name="grid" Background="Transparent">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid Grid.Column="2" x:Name="PART_SelectiveScrollingElements">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Border x:Name="SelectionBackground"
                            Background="{TemplateBinding Background}"
                            Margin="{TemplateBinding Margin}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}"
                            Grid.Column="1"/>
                    <Border x:Name="Background_Over"
                            Margin="1 1 1 2"
                            BorderThickness="1"
                            CornerRadius="1"
                            BorderBrush="{StaticResource ItemOuterBorder_Over}"
                            Visibility="Collapsed"
                            Grid.Column="1">
                        <Border x:Name="BackgroundInner_Over" BorderThickness="1" BorderBrush="{StaticResource ItemInnerBorder_Over}" Background="{StaticResource ItemBackground_Over}"/>
                    </Border>
                    <Border x:Name="Background_Selected"
                            Margin="1 1 1 2"
                            BorderThickness="1"
                            CornerRadius="1"
                            BorderBrush="{StaticResource ItemOuterBorder_Selected}"
                            Visibility="Collapsed"
                            Grid.Column="1">
                        <Border BorderThickness="1" BorderBrush="{StaticResource ItemInnerBorder_Selected}" Background="{StaticResource ItemBackground_Selected}"/>
                    </Border>
                    <Border x:Name="Background_Invalid"
                            Margin="1 1 1 2"
                            BorderThickness="1"
                            CornerRadius="1"
                            BorderBrush="{StaticResource ItemOuterBorder_Invalid}"
                            Visibility="Collapsed"
                            Grid.Column="1">
                        <Border BorderThickness="1" BorderBrush="{StaticResource ItemInnerBorder_Invalid}" Background="{StaticResource ItemBackground_Invalid}"/>
                    </Border>
                </Grid>
                <controls:GridViewToggleButton x:Name="PART_ExpandButton"
                        HorizontalAlignment="Left"
                        HorizontalContentAlignment="Center"
                        Width="20"
                        Grid.Column="1"
                        Grid.ColumnSpan="2"
                        IsTabStop="False"
                        IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
                    <controls:GridViewToggleButton.Style>
                        <Style TargetType="controls:GridViewToggleButton" BasedOn="{StaticResource GridViewToggleButtonStyle}">
                            <Setter Property="PresentationMode" Value="Arrow"/>
                        </Style>
                    </controls:GridViewToggleButton.Style>
                </controls:GridViewToggleButton>
                <grid:DataCellsPresenter Grid.ColumnSpan="2" Grid.Column="1" x:Name="PART_DataCellsPresenter">
                    <grid:DataCellsPresenter.ItemsPanel>
                        <ItemsPanelTemplate>
                            <treelist:TreeListCellsPanel/>
                        </ItemsPanelTemplate>
                    </grid:DataCellsPresenter.ItemsPanel>
                </grid:DataCellsPresenter>
                <Border x:Name="PART_RowBorder"
                        BorderBrush="{TemplateBinding HorizontalGridLinesBrush}"
                        BorderThickness="{Binding HorizontalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Bottom}"
                        Grid.ColumnSpan="3"
                        Grid.Column="1"
                        Grid.RowSpan="4"
                        VerticalAlignment="Bottom"/>
                <grid:DetailsPresenter x:Name="PART_DetailsPresenter" Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="1" Visibility="Collapsed" DetailsProvider="{TemplateBinding DetailsProvider}"/>
                <Border x:Name="PART_IndicatorPresenter"
                        Width="25"
                        VerticalAlignment="Stretch"
                        Grid.Column="0"
                        Visibility="{TemplateBinding RowIndicatorVisibility}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                        Grid.RowSpan="3"
                        BorderBrush="{StaticResource ControlOuterBorder}"
                        BorderThickness="0 0 1 1">
                    <Border x:Name="NavigatorIndicatorBackground"
                            Background="{StaticResource GridView_RowIndicatorCellBackground}"
                            BorderBrush="{StaticResource ControlInnerBorder}"
                            BorderThickness="1">
                        <Grid>
                            <Grid x:Name="NavigatorIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="11" Height="11" Visibility="Collapsed">
                                <Path
                                        Stretch="Fill"
                                        Data="F1 M 32.0234,6.66669L 24.2923,0.0248413L 28.3697,0.0248413L 32,3.14362L 36.1492,6.70819L 32,10.2728L 28.4664,13.3085L 24.2923,13.3085L 32.0234,6.66669 Z"
                                        Margin="0"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Width="8"
                                        Height="8"
                                        Fill="{StaticResource GridView_NavigatorIndicatorBackground}"/>
                            </Grid>
                            <Grid x:Name="EditIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="10" Visibility="Collapsed">
                                <Path Fill="{StaticResource GridView_EditIndicatorBackground1}" Stretch="Fill" Data="M14,9 L15,9 15,10 14,10 z M1,9 L2,9 2,10 1,10 z M15,8 L16,8 16,9 15,9 z M0,8 L1,8 1,9 0,9 z M15,1 L16,1 16,2 15,2 z M0,1 L1,1 1,2 0,2 z M14,0 L15,0 15,1 14,1 z M1,0 L2,0 2,1 1,1 z"/>
                                <Path
                                        Fill="{StaticResource GridView_EditIndicatorBackground2}"
                                        Stretch="Fill"
                                        Margin="1"
                                        Data="M0.99999994,6.9999995 L2,6.9999995 3,6.9999995 4,6.9999995 5,6.9999995 6,6.9999995 7,6.9999995 8,6.9999995 9,6.9999995 10,6.9999995 11,6.9999995 12,6.9999995 13,6.9999995 13,7.9999995 12,7.9999995 11,7.9999995 10,7.9999995 9,7.9999995 8,7.9999995 7,7.9999995 6,7.9999995 5,7.9999995 4,7.9999995 3,7.9999995 2,7.9999995 0.99999994,7.9999995 z M13,0.99999994 L14,0.99999994 14,1.9999999 14,2.9999995 14,3.9999995 14,4.9999995 14,5.9999995 14,6.9999995 13,6.9999995 13,5.9999995 13,4.9999995 13,3.9999995 13,2.9999995 13,1.9999999 z M0,0.99999994 L0.99999994,0.99999994 0.99999994,1.9999999 0.99999994,2.9999995 0.99999994,3.9999995 0.99999994,4.9999995 0.99999994,5.9999995 0.99999994,6.9999995 0,6.9999995 0,5.9999995 0,4.9999995 0,3.9999995 0,2.9999995 0,1.9999999 z M11,0 L12,0 13,0 13,0.99999994 12,0.99999994 11,0.99999994 10,0.99999994 9,0.99999994 8,0.99999994 7,0.99999994 6,0.99999994 5,0.99999994 4,0.99999994 3,0.99999994 2,0.99999994 0.99999994,0.99999994 0.99999994,2.3841858E-07 2,2.3841858E-07 3,2.3841858E-07 4,2.3841858E-07 5,2.3841858E-07 6,2.3841858E-07 7,2.3841858E-07 8,2.3841858E-07 9,2.3841858E-07 10,2.3841858E-07 z"/>
                                <Path Fill="{StaticResource GridView_EditIndicatorBackground3}" Stretch="Fill" Data="M2,9 L3,9 4,9 5,9 6,9 7,9 8,9 9,9 10,9 11,9 12,9 13,9 14,9 14,10 13,10 12,10 11,10 10,10 9,10 8,10 7,10 6,10 5,10 4,10 3,10 2,10 z M14,8 L15,8 15,9 14,9 z M1,8 L2,8 2,9 1,9 z M15,2 L16,2 16,3 16,4 16,5 16,6 16,7 16,8 15,8 15,7 15,6 15,5 15,4 15,3 z M3,2 L4,2 5,2 6,2 6,3 5,3 5,4 5,5 5,6 5,7 6,7 6,8 5,8 4,8 3,8 3,7 4,7 4,6 4,5 4,4 4,3 3,3 z M0,2 L1,2 1,3 1,4 1,5 1,6 1,7 1,8 0,8 0,7 0,6 0,5 0,4 0,3 z M14,1 L15,1 15,2 14,2 z M1,1 L2,1 2,2 1,2 z M2,0 L3,0 4,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 13,0 14,0 14,1 13,1 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1 3,1 2,1 z"/>
                                <Path
                                        Fill="{StaticResource GridView_EditIndicatorBackground4}"
                                        Stretch="Fill"
                                        Margin="2"
                                        Data="M4,0 L5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 12,1 12,2 12,3 12,4 12,5.0000001 12,6 11,6 10,6 9,6 8,6 7,6 6,6 5,6 4,6 4,5.0000001 3,5.0000001 3,4 3,3 3,2 3,1 4,1 z M0,0 L1,0 1,1 2,1 2,2 2,3 2,4 2,5.0000001 1,5.0000001 1,6 0,6 0,5.0000001 0,4 0,3 0,2 0,1 z"/>
                            </Grid>
                            <Grid x:Name="InvalidEditableIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="10" Visibility="Collapsed">
                                <Path Fill="{StaticResource GridView_InvalidEditIndicatorBackground1}" Stretch="Fill" Data="M14,9 L15,9 15,10 14,10 z M1,9 L2,9 2,10 1,10 z M15,8 L16,8 16,9 15,9 z M0,8 L1,8 1,9 0,9 z M15,1 L16,1 16,2 15,2 z M0,1 L1,1 1,2 0,2 z M14,0 L15,0 15,1 14,1 z M1,0 L2,0 2,1 1,1 z"/>
                                <Path
                                        Fill="{StaticResource GridView_InvalidEditIndicatorBackground2}"
                                        Stretch="Fill"
                                        Margin="1"
                                        Data="M0.99999994,6.9999995 L2,6.9999995 3,6.9999995 4,6.9999995 5,6.9999995 6,6.9999995 7,6.9999995 8,6.9999995 9,6.9999995 10,6.9999995 11,6.9999995 12,6.9999995 13,6.9999995 13,7.9999995 12,7.9999995 11,7.9999995 10,7.9999995 9,7.9999995 8,7.9999995 7,7.9999995 6,7.9999995 5,7.9999995 4,7.9999995 3,7.9999995 2,7.9999995 0.99999994,7.9999995 z M13,0.99999994 L14,0.99999994 14,1.9999999 14,2.9999995 14,3.9999995 14,4.9999995 14,5.9999995 14,6.9999995 13,6.9999995 13,5.9999995 13,4.9999995 13,3.9999995 13,2.9999995 13,1.9999999 z M0,0.99999994 L0.99999994,0.99999994 0.99999994,1.9999999 0.99999994,2.9999995 0.99999994,3.9999995 0.99999994,4.9999995 0.99999994,5.9999995 0.99999994,6.9999995 0,6.9999995 0,5.9999995 0,4.9999995 0,3.9999995 0,2.9999995 0,1.9999999 z M11,0 L12,0 13,0 13,0.99999994 12,0.99999994 11,0.99999994 10,0.99999994 9,0.99999994 8,0.99999994 7,0.99999994 6,0.99999994 5,0.99999994 4,0.99999994 3,0.99999994 2,0.99999994 0.99999994,0.99999994 0.99999994,2.3841858E-07 2,2.3841858E-07 3,2.3841858E-07 4,2.3841858E-07 5,2.3841858E-07 6,2.3841858E-07 7,2.3841858E-07 8,2.3841858E-07 9,2.3841858E-07 10,2.3841858E-07 z"/>
                                <Path Fill="{StaticResource GridView_InvalidEditIndicatorBackground3}" Stretch="Fill" Data="M2,9 L3,9 4,9 5,9 6,9 7,9 8,9 9,9 10,9 11,9 12,9 13,9 14,9 14,10 13,10 12,10 11,10 10,10 9,10 8,10 7,10 6,10 5,10 4,10 3,10 2,10 z M14,8 L15,8 15,9 14,9 z M1,8 L2,8 2,9 1,9 z M15,2 L16,2 16,3 16,4 16,5 16,6 16,7 16,8 15,8 15,7 15,6 15,5 15,4 15,3 z M3,2 L4,2 5,2 6,2 6,3 5,3 5,4 5,5 5,6 5,7 6,7 6,8 5,8 4,8 3,8 3,7 4,7 4,6 4,5 4,4 4,3 3,3 z M0,2 L1,2 1,3 1,4 1,5 1,6 1,7 1,8 0,8 0,7 0,6 0,5 0,4 0,3 z M14,1 L15,1 15,2 14,2 z M1,1 L2,1 2,2 1,2 z M2,0 L3,0 4,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 13,0 14,0 14,1 13,1 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1 3,1 2,1 z"/>
                                <Path
                                        Fill="{StaticResource GridView_InvalidEditIndicatorBackground4}"
                                        Stretch="Fill"
                                        Margin="2"
                                        Data="M4,0 L5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 12,1 12,2 12,3 12,4 12,5.0000001 12,6 11,6 10,6 9,6 8,6 7,6 6,6 5,6 4,6 4,5.0000001 3,5.0000001 3,4 3,3 3,2 3,1 4,1 z M0,0 L1,0 1,1 2,1 2,2 2,3 2,4 2,5.0000001 1,5.0000001 1,6 0,6 0,5.0000001 0,4 0,3 0,2 0,1 z"/>
                            </Grid>
                            <Grid x:Name="ErrorIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16" Visibility="Collapsed">
                                <Path
                                        Fill="{StaticResource GridView_ErrorIndicatorBackground1}"
                                        Stretch="Fill"
                                        Margin="1"
                                        Data="M3,12.999999 L4,12.999999 5,12.999999 6,12.999999 7,12.999999 8,12.999999 9,12.999999 10,12.999999 11,12.999999 11,13.999999 10,13.999999 9,13.999999 8,13.999999 7,13.999999 6,13.999999 5,13.999999 4,13.999999 3,13.999999 z M11,11.999999 L12,11.999999 12,12.999999 11,12.999999 z M2.0000001,11.999999 L3,11.999999 3,12.999999 2.0000001,12.999999 z M12,10.999999 L13,10.999999 13,11.999999 12,11.999999 z M1,10.999999 L2.0000001,10.999999 2.0000001,11.999999 1,11.999999 z M13,2.9999992 L14,2.9999992 14,3.9999992 14,4.9999992 14,5.9999992 14,6.9999992 14,7.9999992 14,8.9999992 14,9.9999992 14,10.999999 13,10.999999 13,9.9999992 13,8.9999992 13,7.9999992 13,6.9999992 13,5.9999992 13,4.9999992 13,3.9999992 z M0,2.9999992 L1,2.9999992 1,3.9999992 1,4.9999992 1,5.9999992 1,6.9999992 1,7.9999992 1,8.9999992 1,9.9999992 1,10.999999 0,10.999999 0,9.9999992 0,8.9999992 0,7.9999992 0,6.9999992 0,5.9999992 0,4.9999992 0,3.9999992 z M12,1.9999999 L13,1.9999999 13,2.9999992 12,2.9999992 z M1,1.9999999 L2.0000001,1.9999999 2.0000001,2.9999992 1,2.9999992 z M11,0.99999994 L12,0.99999994 12,1.9999999 11,1.9999999 z M2.0000001,0.99999994 L2.9999998,0.99999994 2.9999998,1.9999999 2.0000001,1.9999999 z M2.9999998,0 L3.9999998,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 11,0.99999994 10,0.99999994 9,0.99999994 8,0.99999994 7,0.99999994 6,0.99999994 5,0.99999994 3.9999998,0.99999994 2.9999998,0.99999994 z"/>
                                <Path
                                        Fill="{StaticResource GridView_ErrorIndicatorBackground2}"
                                        Stretch="Fill"
                                        Margin="7 3"
                                        Data="M1.4901161E-07,8 L1.0000001,8 2.0000002,8 2.0000002,9 2.0000002,10 1.0000003,10 1.0000003,9 1.0000001,10 1.4901161E-07,10 1.4901161E-07,9 z M1.4901161E-07,0 L1.0000001,0 2.0000002,0 2.0000002,1 2.0000002,2 2.0000002,3 2.0000002,4.0000001 2.0000002,5 2.0000002,5.9999999 2.0000002,7 1.0000001,7 1.4901161E-07,7 1.4901161E-07,5.9999999 1.4901161E-07,5 1.4901161E-07,4.0000001 1.4901161E-07,3 1.4901161E-07,2 0,1 z"/>
                                <Path Fill="{StaticResource GridView_ErrorIndicatorBackground3}" Stretch="Fill" Data="M4,15 L5,15 6,15 7,15 8,15 9,15 10,15 11,15 12,15 12,16 11,16 10,16 9,16 8,16 7,16 6,16 5,16 4,16 z M12,14 L13,14 13,15 12,15 z M3,14 L4,14 4,15 3,15 z M13,13 L14,13 14,14 13,14 z M2,13 L3,13 3,14 2,14 z M14,12 L15,12 15,13 14,13 z M1,12 L2,12 2,13 1,13 z M7,11 L7,12 7,13 8,13 9,13 9,12 9,11 8,11 z M15,4 L16,4 16,5 16,6 16,7 16,8 16,9 16,10 16,11 16,12 15,12 15,11 15,10 15,9 15,8 15,7 15,6 15,5 z M0,4 L1,4 1,5 1,6 1,7 1,8 1,9 1,10 1,11 1,12 0,12 0,11 0,10 0,9 0,8 0,7 0,6 0,5 z M14,3 L15,3 15,4 14,4 z M7,3 L7,4 7,5 7,6 7,7 7,8 7,9 7,10 8,10 9,10 9,9 9,8 9,7 9,6 9,5 9,4 9,3 8,3 z M1,3 L2,3 2,4 1,4 z M13,2 L14,2 14,3 13,3 z M4,2 L5,2 6,2 7,2 8,2 9,2 10,2 11,2 12,2 12,3 13,3 13,4 14,4 14,5 14,6 14,7 14,8 14,9 14,10 14,11 14,12 13,12 13,13 12,13 12,14 11,14 10,14 9,14 8,14 7,14 6,14 5,14 4,14 4,13 3,13 3,12 2,12 2,11 2,10 2,9 2,8 2,7 2,6 2,5 2,4 3,4 3,3 4,3 z M2,2 L3,2 3,3 2,3 z M12,1 L13,1 13,2 12,2 z M3,1 L4,1 4,2 3,2 z M4,0 L5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1 z"/>
                                <ToolTipService.ToolTip>
                                    <ToolTip x:Name="validationTooltip" Placement="Bottom" Content="{TemplateBinding Errors}" Template="{StaticResource TreeListViewRow_ValidationToolTipTemplate}"/>
                                </ToolTipService.ToolTip>
                            </Grid>
                            <Border x:Name="PART_RowResizer" Background="Transparent" Height="2" VerticalAlignment="Bottom" Cursor="SizeNS"/>
                        </Grid>
                    </Border>
                </Border>
            </grid:SelectiveScrollingGrid>
        </Border>
    </ControlTemplate>
    <Style x:Key="TreeListViewRowStyle" TargetType="treelist:TreeListViewRow">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template" Value="{StaticResource TreeListViewRowTemplate}"/>
        <Setter Property="Background" Value="{StaticResource ItemBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="AllowDrop" Value="True"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="treelist:TreeListViewRow" BasedOn="{StaticResource TreeListViewRowStyle}"/>
    <ControlTemplate x:Key="NonEditableComboBox" TargetType="input:RadComboBox">
        <Grid x:Name="VisualRoot">
            <ContentPresenter x:Name="Content"
                    Grid.Column="0"
                    Margin="{TemplateBinding Padding}"
                    IsHitTestVisible="False"
                    Content="{TemplateBinding SelectionBoxItem}"
                    ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="LookupElementTemplate" TargetType="grid:LookupElement">
        <input:RadComboBox x:Name="PART_RadComboBox"
                Foreground="{Binding Foreground,RelativeSource={RelativeSource TemplatedParent}}"
                IsEditable="False"
                NonEditableTemplate="{StaticResource NonEditableComboBox}"
                ItemTemplate="{Binding ItemTemplate,RelativeSource={RelativeSource TemplatedParent}}"
                SelectedValuePath="{Binding SelectedValuePath,RelativeSource={RelativeSource TemplatedParent}}"
                DisplayMemberPath="{Binding DisplayMemberPath,RelativeSource={RelativeSource TemplatedParent}}"
                SelectedValue="{Binding SelectedValue,RelativeSource={RelativeSource TemplatedParent}}"
                ItemsSource="{Binding ItemsSource,RelativeSource={RelativeSource TemplatedParent}}"
                Margin="{TemplateBinding Padding}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                IsTabStop="{TemplateBinding IsTabStop}"
                IsSynchronizedWithCurrentItem="False"/>
    </ControlTemplate>
    <Style x:Key="LookupElementStyle" TargetType="grid:LookupElement">
        <Setter Property="Template" Value="{StaticResource LookupElementTemplate}"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="IsHitTestVisible" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:LookupElement" BasedOn="{StaticResource LookupElementStyle}"/>
    <ControlTemplate x:Key="ScrollPositionIndicatorTemplate" TargetType="grid:ScrollPositionIndicator">
        <Border
                HorizontalAlignment="Right"
                VerticalAlignment="Center"
                Width="Auto"
                Height="Auto"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="3"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}">
            <ContentPresenter
                    Margin="{TemplateBinding Padding}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Content="{TemplateBinding Content}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"/>
        </Border>
    </ControlTemplate>
    <Style x:Key="ScrollPositionIndicatorStyle" TargetType="grid:ScrollPositionIndicator">
        <Setter Property="Template" Value="{StaticResource ScrollPositionIndicatorTemplate}"/>
        <Setter Property="Background" Value="{StaticResource GridView_ScrollIndicatorBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="Padding" Value="15 5"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:ScrollPositionIndicator" BasedOn="{StaticResource ScrollPositionIndicatorStyle}"/>
    <ControlTemplate x:Key="GridViewCellCoreTemplate" TargetType="grid:GridViewCell">
        <Grid>
            <Border x:Name="PART_CellBorder"
                    Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"
                    BorderBrush="{TemplateBinding VerticalGridLinesBrush}"
                    BorderThickness="{Binding VerticalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Right}"/>
            <ContentPresenter x:Name="PART_ContentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Content="{TemplateBinding Content}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
        </Grid>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="PART_CellBorder" Property="Background" Value="{StaticResource ItemBackground_Over}"/>
                <Setter TargetName="PART_CellBorder" Property="Margin" Value="0,0,0,1"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="PART_CellBorder" Property="Background" Value="{StaticResource ItemBackground_Selected}"/>
                <Setter TargetName="PART_CellBorder" Property="Margin" Value="0,0,0,1"/>
            </MultiTrigger>
            <Trigger Property="IsInEditMode" Value="True">
                <Setter TargetName="PART_ContentPresenter" Property="Margin" Value="1,1,1,0"/>
                <Setter TargetName="PART_CellBorder" Property="Margin" Value="0,0,0,0"/>
                <Setter Property="VerticalContentAlignment" Value="Stretch"/>
                <Setter TargetName="PART_CellBorder" Property="Background" Value="{StaticResource GridView_CellBackground_Edited}"/>
                <Setter TargetName="PART_CellBorder" Property="BorderThickness" Value="1"/>
                <Setter TargetName="PART_CellBorder" Property="BorderBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="PART_CellBorder" Property="Opacity" Value="0.40"/>
                <Setter TargetName="PART_ContentPresenter" Property="Opacity" Value="0.70"/>
            </Trigger>
            <Trigger Property="IsCurrent" Value="True">
                <Setter TargetName="PART_CellBorder" Property="BorderBrush" Value="{StaticResource GridViewCell_CurrentBorder}"/>
                <Setter TargetName="PART_CellBorder" Property="BorderThickness" Value="1"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="GridViewCellCoreStyle" TargetType="grid:GridViewCell">
        <Setter Property="Template" Value="{StaticResource GridViewCellCoreTemplate}"/>
        <Setter Property="Padding" Value="5 0 3 0"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <ControlTemplate x:Key="GridViewCell_CoreValidationToolTipTemplate" TargetType="ToolTip">
        <Grid x:Name="Root" Margin="5 0" Opacity="0" RenderTransformOrigin="0,0">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0"/>
                        <VisualTransition GeneratedDuration="0:0:0.2" To="Open">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualTransition>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Closed">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Open">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RenderTransform>
                <TranslateTransform x:Name="xform" X="-25"/>
            </Grid.RenderTransform>
            <ItemsControl ItemsSource="{TemplateBinding Content}">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Border
                                MinHeight="22"
                                Background="{StaticResource GridView_ValidationTooltipBackground}"
                                BorderBrush="{StaticResource GridView_ValidationTooltipOuterBorder}"
                                BorderThickness="1"
                                CornerRadius="{StaticResource GridView_ValidationTooltipCornerRadius}">
                            <Border BorderBrush="{StaticResource GridView_ValidationTooltipInnerBorder}" BorderThickness="1">
                                <TextBlock Margin="4 1" MaxWidth="250" Foreground="{StaticResource GridView_ValidationTooltipForeground}" Text="{Binding}" TextWrapping="Wrap"/>
                            </Border>
                        </Border>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="GridViewCellCoreValidationTemplate" TargetType="grid:GridViewCell">
        <Grid>
            <Border x:Name="PART_CellBorder"
                    Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"
                    BorderBrush="{TemplateBinding VerticalGridLinesBrush}"
                    BorderThickness="{Binding VerticalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Right}"/>
            <Border x:Name="ErrorIndicator" Visibility="Collapsed" Margin="1,0,0,1" BorderBrush="{StaticResource ControlOuterBorder_Invalid}" BorderThickness="1">
                <ToolTipService.ToolTip>
                    <ToolTip x:Name="validationTooltip" Placement="Right" Content="{TemplateBinding Errors}" Template="{StaticResource GridViewCell_CoreValidationToolTipTemplate}"/>
                </ToolTipService.ToolTip>
                <Grid Height="12" HorizontalAlignment="Right" Margin="1,-4,-4,0" VerticalAlignment="Top" Width="12" Background="Transparent">
                    <Path Fill="{StaticResource ControlOuterBorder_Invalid}" Margin="1,3,0,0" Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z"/>
                    <Path Fill="{StaticResource ControlInnerBorder_Invalid}" Margin="1,3,0,0" Data="M 0,0 L2,0 L 8,6 L8,8"/>
                </Grid>
            </Border>
            <ContentPresenter x:Name="PART_ContentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Content="{TemplateBinding Content}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
        </Grid>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="PART_CellBorder" Property="Background" Value="{StaticResource ItemBackground_Over}"/>
                <Setter TargetName="PART_CellBorder" Property="Margin" Value="0,0,0,1"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="PART_CellBorder" Property="Background" Value="{StaticResource ItemBackground_Selected}"/>
                <Setter TargetName="PART_CellBorder" Property="Margin" Value="0,0,0,1"/>
            </MultiTrigger>
            <Trigger Property="IsInEditMode" Value="True">
                <Setter TargetName="PART_ContentPresenter" Property="Margin" Value="1,1,1,0"/>
                <Setter TargetName="PART_CellBorder" Property="Margin" Value="0,0,0,0"/>
                <Setter Property="VerticalContentAlignment" Value="Stretch"/>
                <Setter TargetName="PART_CellBorder" Property="Background" Value="{StaticResource GridView_CellBackground_Edited}"/>
                <Setter TargetName="PART_CellBorder" Property="BorderThickness" Value="1"/>
                <Setter TargetName="PART_CellBorder" Property="BorderBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                    <Condition Property="ParentRowValid" Value="false"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="PART_CellBorder" Property="Background" Value="{StaticResource ItemBackground_Invalid}"/>
                <Setter TargetName="PART_CellBorder" Property="Margin" Value="0,0,0,1"/>
            </MultiTrigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="PART_CellBorder" Property="Opacity" Value="0.40"/>
                <Setter TargetName="PART_ContentPresenter" Property="Opacity" Value="0.70"/>
            </Trigger>
            <Trigger Property="IsCurrent" Value="True">
                <Setter TargetName="PART_CellBorder" Property="BorderBrush" Value="{StaticResource GridViewCell_CurrentBorder}"/>
                <Setter TargetName="PART_CellBorder" Property="BorderThickness" Value="1"/>
            </Trigger>
            <Trigger Property="IsValid" Value="False">
                <Setter TargetName="PART_CellBorder" Property="Background" Value="{StaticResource ItemBackground}"/>
                <Setter TargetName="ErrorIndicator" Property="Visibility" Value="Visible"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="GridViewCellCoreValidationStyle" TargetType="grid:GridViewCell">
        <Setter Property="Template" Value="{StaticResource GridViewCellCoreValidationTemplate}"/>
        <Setter Property="Padding" Value="5 0 3 0"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <ControlTemplate x:Key="GridViewRowCoreTemplate" TargetType="grid:GridViewRow">
        <Grid>
            <Grid.Resources>
                <Style TargetType="grid:GridViewEditorPresenter" BasedOn="{StaticResource GridViewEditorPresenterStyle}">
                    <Setter Property="Padding" Value="1,1,1,2"/>
                </Style>
            </Grid.Resources>
            <grid:SelectiveScrollingGrid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectionBackground"
                        Grid.Column="2"
                        Grid.ColumnSpan="2"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding HorizontalGridLinesBrush}"
                        BorderThickness="{Binding HorizontalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Bottom}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"/>
                <grid:DataCellsPresenter Grid.Column="3" x:Name="PART_DataCellsPresenter"/>
                <grid:IndentPresenter x:Name="PART_IndentPresenter" IndentLevel="{TemplateBinding IndentLevel}" Grid.Column="1" grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            </grid:SelectiveScrollingGrid>
        </Grid>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="SelectionBackground" Property="Background" Value="{StaticResource ItemBackground_Over}"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="SelectionBackground" Property="Background" Value="{StaticResource ItemBackground_Selected}"/>
            </MultiTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="GridViewRowCoreStyle" TargetType="grid:GridViewRow">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template" Value="{StaticResource GridViewRowCoreTemplate}"/>
        <Setter Property="Background" Value="{StaticResource ItemBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="AllowDrop" Value="True"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="MinHeight" Value="26"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <ControlTemplate x:Key="GridViewRow_CoreValidationToolTipTemplate" TargetType="ToolTip">
        <Grid x:Name="Root" Margin="5 0" Opacity="0" RenderTransformOrigin="0,0">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0"/>
                        <VisualTransition GeneratedDuration="0:0:0.2" To="Open">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualTransition>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Closed">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Open">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RenderTransform>
                <TranslateTransform x:Name="xform" X="-25"/>
            </Grid.RenderTransform>
            <ItemsControl ItemsSource="{TemplateBinding Content}">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Border
                                MinHeight="22"
                                Background="{StaticResource GridView_ValidationTooltipBackground}"
                                BorderBrush="{StaticResource GridView_ValidationTooltipOuterBorder}"
                                BorderThickness="1"
                                CornerRadius="{StaticResource GridView_ValidationTooltipCornerRadius}">
                            <Border BorderBrush="{StaticResource GridView_ValidationTooltipInnerBorder}" BorderThickness="1">
                                <TextBlock Margin="4 1" MaxWidth="250" Foreground="{StaticResource GridView_ValidationTooltipForeground}" Text="{Binding}" TextWrapping="Wrap"/>
                            </Border>
                        </Border>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="GridViewRowCoreValidationTemplate" TargetType="grid:GridViewRow">
        <Grid>
            <Grid.Resources>
                <Style TargetType="grid:GridViewEditorPresenter" BasedOn="{StaticResource GridViewEditorPresenterStyle}">
                    <Setter Property="Padding" Value="1,1,1,2"/>
                </Style>
            </Grid.Resources>
            <grid:SelectiveScrollingGrid x:Name="grid">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectionBackground"
                        Grid.Column="2"
                        Grid.ColumnSpan="2"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding HorizontalGridLinesBrush}"
                        BorderThickness="{Binding HorizontalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Bottom}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"/>
                <grid:DataCellsPresenter Grid.Column="3" x:Name="PART_DataCellsPresenter"/>
                <grid:IndentPresenter x:Name="PART_IndentPresenter" IndentLevel="{TemplateBinding IndentLevel}" Grid.Column="1" grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
                <Border x:Name="PART_IndicatorPresenter"
                        Width="25"
                        VerticalAlignment="Stretch"
                        Visibility="{TemplateBinding RowIndicatorVisibility}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                        BorderBrush="{StaticResource ControlOuterBorder}"
                        BorderThickness="0 0 1 1">
                    <Border x:Name="NavigatorIndicatorBackground"
                            Background="{StaticResource GridView_RowIndicatorCellBackground}"
                            BorderBrush="{StaticResource ControlInnerBorder}"
                            BorderThickness="1">
                        <Grid>
                            <Grid x:Name="NavigatorIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="11" Height="11" Visibility="Collapsed">
                                <Path
                                        Stretch="Fill"
                                        Data="F1 M 32.0234,6.66669L 24.2923,0.0248413L 28.3697,0.0248413L 32,3.14362L 36.1492,6.70819L 32,10.2728L 28.4664,13.3085L 24.2923,13.3085L 32.0234,6.66669 Z"
                                        Margin="0"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Width="8"
                                        Height="8"
                                        Fill="{StaticResource GridView_NavigatorIndicatorBackground}"/>
                            </Grid>
                            <Grid x:Name="EditIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="10" Visibility="Collapsed">
                                <Path Fill="{StaticResource GridView_EditIndicatorBackground1}" Stretch="Fill" Data="M14,9 L15,9 15,10 14,10 z M1,9 L2,9 2,10 1,10 z M15,8 L16,8 16,9 15,9 z M0,8 L1,8 1,9 0,9 z M15,1 L16,1 16,2 15,2 z M0,1 L1,1 1,2 0,2 z M14,0 L15,0 15,1 14,1 z M1,0 L2,0 2,1 1,1 z"/>
                                <Path
                                        Fill="{StaticResource GridView_EditIndicatorBackground2}"
                                        Stretch="Fill"
                                        Margin="1"
                                        Data="M0.99999994,6.9999995 L2,6.9999995 3,6.9999995 4,6.9999995 5,6.9999995 6,6.9999995 7,6.9999995 8,6.9999995 9,6.9999995 10,6.9999995 11,6.9999995 12,6.9999995 13,6.9999995 13,7.9999995 12,7.9999995 11,7.9999995 10,7.9999995 9,7.9999995 8,7.9999995 7,7.9999995 6,7.9999995 5,7.9999995 4,7.9999995 3,7.9999995 2,7.9999995 0.99999994,7.9999995 z M13,0.99999994 L14,0.99999994 14,1.9999999 14,2.9999995 14,3.9999995 14,4.9999995 14,5.9999995 14,6.9999995 13,6.9999995 13,5.9999995 13,4.9999995 13,3.9999995 13,2.9999995 13,1.9999999 z M0,0.99999994 L0.99999994,0.99999994 0.99999994,1.9999999 0.99999994,2.9999995 0.99999994,3.9999995 0.99999994,4.9999995 0.99999994,5.9999995 0.99999994,6.9999995 0,6.9999995 0,5.9999995 0,4.9999995 0,3.9999995 0,2.9999995 0,1.9999999 z M11,0 L12,0 13,0 13,0.99999994 12,0.99999994 11,0.99999994 10,0.99999994 9,0.99999994 8,0.99999994 7,0.99999994 6,0.99999994 5,0.99999994 4,0.99999994 3,0.99999994 2,0.99999994 0.99999994,0.99999994 0.99999994,2.3841858E-07 2,2.3841858E-07 3,2.3841858E-07 4,2.3841858E-07 5,2.3841858E-07 6,2.3841858E-07 7,2.3841858E-07 8,2.3841858E-07 9,2.3841858E-07 10,2.3841858E-07 z"/>
                                <Path Fill="{StaticResource GridView_EditIndicatorBackground3}" Stretch="Fill" Data="M2,9 L3,9 4,9 5,9 6,9 7,9 8,9 9,9 10,9 11,9 12,9 13,9 14,9 14,10 13,10 12,10 11,10 10,10 9,10 8,10 7,10 6,10 5,10 4,10 3,10 2,10 z M14,8 L15,8 15,9 14,9 z M1,8 L2,8 2,9 1,9 z M15,2 L16,2 16,3 16,4 16,5 16,6 16,7 16,8 15,8 15,7 15,6 15,5 15,4 15,3 z M3,2 L4,2 5,2 6,2 6,3 5,3 5,4 5,5 5,6 5,7 6,7 6,8 5,8 4,8 3,8 3,7 4,7 4,6 4,5 4,4 4,3 3,3 z M0,2 L1,2 1,3 1,4 1,5 1,6 1,7 1,8 0,8 0,7 0,6 0,5 0,4 0,3 z M14,1 L15,1 15,2 14,2 z M1,1 L2,1 2,2 1,2 z M2,0 L3,0 4,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 13,0 14,0 14,1 13,1 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1 3,1 2,1 z"/>
                                <Path
                                        Fill="{StaticResource GridView_EditIndicatorBackground4}"
                                        Stretch="Fill"
                                        Margin="2"
                                        Data="M4,0 L5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 12,1 12,2 12,3 12,4 12,5.0000001 12,6 11,6 10,6 9,6 8,6 7,6 6,6 5,6 4,6 4,5.0000001 3,5.0000001 3,4 3,3 3,2 3,1 4,1 z M0,0 L1,0 1,1 2,1 2,2 2,3 2,4 2,5.0000001 1,5.0000001 1,6 0,6 0,5.0000001 0,4 0,3 0,2 0,1 z"/>
                            </Grid>
                            <Grid x:Name="InvalidEditableIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="10" Visibility="Collapsed">
                                <Path Fill="{StaticResource GridView_InvalidEditIndicatorBackground1}" Stretch="Fill" Data="M14,9 L15,9 15,10 14,10 z M1,9 L2,9 2,10 1,10 z M15,8 L16,8 16,9 15,9 z M0,8 L1,8 1,9 0,9 z M15,1 L16,1 16,2 15,2 z M0,1 L1,1 1,2 0,2 z M14,0 L15,0 15,1 14,1 z M1,0 L2,0 2,1 1,1 z"/>
                                <Path
                                        Fill="{StaticResource GridView_InvalidEditIndicatorBackground2}"
                                        Stretch="Fill"
                                        Margin="1"
                                        Data="M0.99999994,6.9999995 L2,6.9999995 3,6.9999995 4,6.9999995 5,6.9999995 6,6.9999995 7,6.9999995 8,6.9999995 9,6.9999995 10,6.9999995 11,6.9999995 12,6.9999995 13,6.9999995 13,7.9999995 12,7.9999995 11,7.9999995 10,7.9999995 9,7.9999995 8,7.9999995 7,7.9999995 6,7.9999995 5,7.9999995 4,7.9999995 3,7.9999995 2,7.9999995 0.99999994,7.9999995 z M13,0.99999994 L14,0.99999994 14,1.9999999 14,2.9999995 14,3.9999995 14,4.9999995 14,5.9999995 14,6.9999995 13,6.9999995 13,5.9999995 13,4.9999995 13,3.9999995 13,2.9999995 13,1.9999999 z M0,0.99999994 L0.99999994,0.99999994 0.99999994,1.9999999 0.99999994,2.9999995 0.99999994,3.9999995 0.99999994,4.9999995 0.99999994,5.9999995 0.99999994,6.9999995 0,6.9999995 0,5.9999995 0,4.9999995 0,3.9999995 0,2.9999995 0,1.9999999 z M11,0 L12,0 13,0 13,0.99999994 12,0.99999994 11,0.99999994 10,0.99999994 9,0.99999994 8,0.99999994 7,0.99999994 6,0.99999994 5,0.99999994 4,0.99999994 3,0.99999994 2,0.99999994 0.99999994,0.99999994 0.99999994,2.3841858E-07 2,2.3841858E-07 3,2.3841858E-07 4,2.3841858E-07 5,2.3841858E-07 6,2.3841858E-07 7,2.3841858E-07 8,2.3841858E-07 9,2.3841858E-07 10,2.3841858E-07 z"/>
                                <Path Fill="{StaticResource GridView_InvalidEditIndicatorBackground3}" Stretch="Fill" Data="M2,9 L3,9 4,9 5,9 6,9 7,9 8,9 9,9 10,9 11,9 12,9 13,9 14,9 14,10 13,10 12,10 11,10 10,10 9,10 8,10 7,10 6,10 5,10 4,10 3,10 2,10 z M14,8 L15,8 15,9 14,9 z M1,8 L2,8 2,9 1,9 z M15,2 L16,2 16,3 16,4 16,5 16,6 16,7 16,8 15,8 15,7 15,6 15,5 15,4 15,3 z M3,2 L4,2 5,2 6,2 6,3 5,3 5,4 5,5 5,6 5,7 6,7 6,8 5,8 4,8 3,8 3,7 4,7 4,6 4,5 4,4 4,3 3,3 z M0,2 L1,2 1,3 1,4 1,5 1,6 1,7 1,8 0,8 0,7 0,6 0,5 0,4 0,3 z M14,1 L15,1 15,2 14,2 z M1,1 L2,1 2,2 1,2 z M2,0 L3,0 4,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 13,0 14,0 14,1 13,1 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1 3,1 2,1 z"/>
                                <Path
                                        Fill="{StaticResource GridView_InvalidEditIndicatorBackground4}"
                                        Stretch="Fill"
                                        Margin="2"
                                        Data="M4,0 L5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 12,1 12,2 12,3 12,4 12,5.0000001 12,6 11,6 10,6 9,6 8,6 7,6 6,6 5,6 4,6 4,5.0000001 3,5.0000001 3,4 3,3 3,2 3,1 4,1 z M0,0 L1,0 1,1 2,1 2,2 2,3 2,4 2,5.0000001 1,5.0000001 1,6 0,6 0,5.0000001 0,4 0,3 0,2 0,1 z"/>
                            </Grid>
                            <Grid x:Name="ErrorIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16" Visibility="Collapsed">
                                <Path
                                        Fill="{StaticResource GridView_ErrorIndicatorBackground1}"
                                        Stretch="Fill"
                                        Margin="1"
                                        Data="M3,12.999999 L4,12.999999 5,12.999999 6,12.999999 7,12.999999 8,12.999999 9,12.999999 10,12.999999 11,12.999999 11,13.999999 10,13.999999 9,13.999999 8,13.999999 7,13.999999 6,13.999999 5,13.999999 4,13.999999 3,13.999999 z M11,11.999999 L12,11.999999 12,12.999999 11,12.999999 z M2.0000001,11.999999 L3,11.999999 3,12.999999 2.0000001,12.999999 z M12,10.999999 L13,10.999999 13,11.999999 12,11.999999 z M1,10.999999 L2.0000001,10.999999 2.0000001,11.999999 1,11.999999 z M13,2.9999992 L14,2.9999992 14,3.9999992 14,4.9999992 14,5.9999992 14,6.9999992 14,7.9999992 14,8.9999992 14,9.9999992 14,10.999999 13,10.999999 13,9.9999992 13,8.9999992 13,7.9999992 13,6.9999992 13,5.9999992 13,4.9999992 13,3.9999992 z M0,2.9999992 L1,2.9999992 1,3.9999992 1,4.9999992 1,5.9999992 1,6.9999992 1,7.9999992 1,8.9999992 1,9.9999992 1,10.999999 0,10.999999 0,9.9999992 0,8.9999992 0,7.9999992 0,6.9999992 0,5.9999992 0,4.9999992 0,3.9999992 z M12,1.9999999 L13,1.9999999 13,2.9999992 12,2.9999992 z M1,1.9999999 L2.0000001,1.9999999 2.0000001,2.9999992 1,2.9999992 z M11,0.99999994 L12,0.99999994 12,1.9999999 11,1.9999999 z M2.0000001,0.99999994 L2.9999998,0.99999994 2.9999998,1.9999999 2.0000001,1.9999999 z M2.9999998,0 L3.9999998,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 11,0.99999994 10,0.99999994 9,0.99999994 8,0.99999994 7,0.99999994 6,0.99999994 5,0.99999994 3.9999998,0.99999994 2.9999998,0.99999994 z"/>
                                <Path
                                        Fill="{StaticResource GridView_ErrorIndicatorBackground2}"
                                        Stretch="Fill"
                                        Margin="7,3"
                                        Data="M1.4901161E-07,8 L1.0000001,8 2.0000002,8 2.0000002,9 2.0000002,10 1.0000003,10 1.0000003,9 1.0000001,10 1.4901161E-07,10 1.4901161E-07,9 z M1.4901161E-07,0 L1.0000001,0 2.0000002,0 2.0000002,1 2.0000002,2 2.0000002,3 2.0000002,4.0000001 2.0000002,5 2.0000002,5.9999999 2.0000002,7 1.0000001,7 1.4901161E-07,7 1.4901161E-07,5.9999999 1.4901161E-07,5 1.4901161E-07,4.0000001 1.4901161E-07,3 1.4901161E-07,2 0,1 z"/>
                                <Path Fill="{StaticResource GridView_ErrorIndicatorBackground3}" Stretch="Fill" Data="M4,15 L5,15 6,15 7,15 8,15 9,15 10,15 11,15 12,15 12,16 11,16 10,16 9,16 8,16 7,16 6,16 5,16 4,16 z M12,14 L13,14 13,15 12,15 z M3,14 L4,14 4,15 3,15 z M13,13 L14,13 14,14 13,14 z M2,13 L3,13 3,14 2,14 z M14,12 L15,12 15,13 14,13 z M1,12 L2,12 2,13 1,13 z M7,11 L7,12 7,13 8,13 9,13 9,12 9,11 8,11 z M15,4 L16,4 16,5 16,6 16,7 16,8 16,9 16,10 16,11 16,12 15,12 15,11 15,10 15,9 15,8 15,7 15,6 15,5 z M0,4 L1,4 1,5 1,6 1,7 1,8 1,9 1,10 1,11 1,12 0,12 0,11 0,10 0,9 0,8 0,7 0,6 0,5 z M14,3 L15,3 15,4 14,4 z M7,3 L7,4 7,5 7,6 7,7 7,8 7,9 7,10 8,10 9,10 9,9 9,8 9,7 9,6 9,5 9,4 9,3 8,3 z M1,3 L2,3 2,4 1,4 z M13,2 L14,2 14,3 13,3 z M4,2 L5,2 6,2 7,2 8,2 9,2 10,2 11,2 12,2 12,3 13,3 13,4 14,4 14,5 14,6 14,7 14,8 14,9 14,10 14,11 14,12 13,12 13,13 12,13 12,14 11,14 10,14 9,14 8,14 7,14 6,14 5,14 4,14 4,13 3,13 3,12 2,12 2,11 2,10 2,9 2,8 2,7 2,6 2,5 2,4 3,4 3,3 4,3 z M2,2 L3,2 3,3 2,3 z M12,1 L13,1 13,2 12,2 z M3,1 L4,1 4,2 3,2 z M4,0 L5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1 z"/>
                                <ToolTipService.ToolTip>
                                    <ToolTip x:Name="validationTooltip" Placement="Bottom" Content="{TemplateBinding Errors}" Template="{StaticResource GridViewRow_CoreValidationToolTipTemplate}"/>
                                </ToolTipService.ToolTip>
                            </Grid>
                            <Border x:Name="PART_RowResizer" Background="Transparent" Height="2" VerticalAlignment="Bottom" Cursor="SizeNS"/>
                        </Grid>
                    </Border>
                </Border>
            </grid:SelectiveScrollingGrid>
        </Grid>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="SelectionBackground" Property="Background" Value="{StaticResource ItemBackground_Over}"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="SelectionBackground" Property="Background" Value="{StaticResource ItemBackground_Selected}"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsValid" Value="False"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="SelectionBackground" Property="Background" Value="{StaticResource ItemBackground_Invalid}"/>
                <Setter TargetName="ErrorIndicator" Property="Visibility" Value="Visible"/>
                <Setter TargetName="InvalidEditableIndicator" Property="Visibility" Value="Collapsed"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsValid" Value="False"/>
                    <Condition Property="IsInEditMode" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="SelectionBackground" Property="Background" Value="{StaticResource ItemBackground_Invalid}"/>
                <Setter TargetName="InvalidEditableIndicator" Property="Visibility" Value="Visible"/>
                <Setter TargetName="ErrorIndicator" Property="Visibility" Value="Collapsed"/>
            </MultiTrigger>
            <Trigger Property="IsCurrent" Value="True">
                <Setter TargetName="NavigatorIndicator" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="IsInEditMode" Value="True">
                <Setter TargetName="EditIndicator" Property="Visibility" Value="Visible"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="GridViewRowCoreValidationStyle" TargetType="grid:GridViewRow">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template" Value="{StaticResource GridViewRowCoreValidationTemplate}"/>
        <Setter Property="Background" Value="{StaticResource ItemBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="AllowDrop" Value="True"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="MinHeight" Value="26"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <ControlTemplate x:Key="TreeListViewRowCoreTemplate" TargetType="treelist:TreeListViewRow">
        <Grid>
            <Grid.Resources>
                <Style TargetType="grid:GridViewEditorPresenter" BasedOn="{StaticResource GridViewEditorPresenterStyle}">
                    <Setter Property="Padding" Value="1,1,1,2"/>
                </Style>
            </Grid.Resources>
            <grid:SelectiveScrollingGrid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid Grid.Column="2" x:Name="PART_SelectiveScrollingElements">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Border x:Name="SelectionBackground"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding HorizontalGridLinesBrush}"
                            Grid.Column="1"
                            BorderThickness="{Binding HorizontalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Bottom}"/>
                </Grid>
                <controls:GridViewToggleButton x:Name="PART_ExpandButton"
                        HorizontalAlignment="Left"
                        HorizontalContentAlignment="Center"
                        Width="20"
                        Grid.Column="1"
                        Grid.ColumnSpan="2"
                        IsTabStop="False"
                        PresentationMode="Arrow"
                        IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                <grid:DataCellsPresenter Grid.ColumnSpan="2" Grid.Column="1" x:Name="PART_DataCellsPresenter">
                    <grid:DataCellsPresenter.ItemsPanel>
                        <ItemsPanelTemplate>
                            <treelist:TreeListCellsPanel/>
                        </ItemsPanelTemplate>
                    </grid:DataCellsPresenter.ItemsPanel>
                </grid:DataCellsPresenter>
            </grid:SelectiveScrollingGrid>
        </Grid>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="SelectionBackground" Property="Background" Value="{StaticResource ItemBackground_Over}"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="SelectionBackground" Property="Background" Value="{StaticResource ItemBackground_Selected}"/>
            </MultiTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="TreeListViewRowCoreStyle" TargetType="treelist:TreeListViewRow">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template" Value="{StaticResource TreeListViewRowCoreTemplate}"/>
        <Setter Property="Background" Value="{StaticResource ItemBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="MinHeight" Value="26"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="AllowDrop" Value="True"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <ControlTemplate x:Key="TreeListViewRow_CoreValidationToolTipTemplate" TargetType="ToolTip">
        <Grid x:Name="Root" Margin="5 0" Opacity="0" RenderTransformOrigin="0,0">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0"/>
                        <VisualTransition GeneratedDuration="0:0:0.2" To="Open">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualTransition>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Closed">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Open">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RenderTransform>
                <TranslateTransform x:Name="xform" X="-25"/>
            </Grid.RenderTransform>
            <ItemsControl ItemsSource="{TemplateBinding Content}">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Border
                                MinHeight="22"
                                Background="{StaticResource GridView_ValidationTooltipBackground}"
                                BorderBrush="{StaticResource GridView_ValidationTooltipOuterBorder}"
                                BorderThickness="1"
                                CornerRadius="{StaticResource GridView_ValidationTooltipCornerRadius}">
                            <Border BorderBrush="{StaticResource GridView_ValidationTooltipInnerBorder}" BorderThickness="1">
                                <TextBlock Margin="4 1" MaxWidth="250" Foreground="{StaticResource GridView_ValidationTooltipForeground}" Text="{Binding}" TextWrapping="Wrap"/>
                            </Border>
                        </Border>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="TreeListViewRowCoreValidationTemplate" TargetType="treelist:TreeListViewRow">
        <Grid>
            <Grid.Resources>
                <Style TargetType="grid:GridViewEditorPresenter" BasedOn="{StaticResource GridViewEditorPresenterStyle}">
                    <Setter Property="Padding" Value="1,1,1,2"/>
                </Style>
            </Grid.Resources>
            <grid:SelectiveScrollingGrid x:Name="grid" Background="Transparent">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid Grid.Column="2" x:Name="PART_SelectiveScrollingElements">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Border x:Name="SelectionBackground"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding HorizontalGridLinesBrush}"
                            Grid.Column="1"
                            BorderThickness="{Binding HorizontalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Bottom}"/>
                </Grid>
                <controls:GridViewToggleButton x:Name="PART_ExpandButton"
                        HorizontalAlignment="Left"
                        HorizontalContentAlignment="Center"
                        Width="20"
                        Grid.Column="1"
                        Grid.ColumnSpan="2"
                        IsTabStop="False"
                        PresentationMode="Arrow"
                        IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                <grid:DataCellsPresenter Grid.ColumnSpan="2" Grid.Column="1" x:Name="PART_DataCellsPresenter">
                    <grid:DataCellsPresenter.ItemsPanel>
                        <ItemsPanelTemplate>
                            <treelist:TreeListCellsPanel/>
                        </ItemsPanelTemplate>
                    </grid:DataCellsPresenter.ItemsPanel>
                </grid:DataCellsPresenter>
                <Border x:Name="PART_IndicatorPresenter"
                        Width="25"
                        VerticalAlignment="Stretch"
                        Visibility="{TemplateBinding RowIndicatorVisibility}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                        BorderBrush="{StaticResource ControlOuterBorder}"
                        BorderThickness="0 0 1 1">
                    <Border x:Name="NavigatorIndicatorBackground"
                            Background="{StaticResource GridView_RowIndicatorCellBackground}"
                            BorderBrush="{StaticResource ControlInnerBorder}"
                            BorderThickness="1">
                        <Grid>
                            <Grid x:Name="NavigatorIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="11" Height="11" Visibility="Collapsed">
                                <Path
                                        Stretch="Fill"
                                        Data="F1 M 32.0234,6.66669L 24.2923,0.0248413L 28.3697,0.0248413L 32,3.14362L 36.1492,6.70819L 32,10.2728L 28.4664,13.3085L 24.2923,13.3085L 32.0234,6.66669 Z"
                                        Margin="0"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Width="8"
                                        Height="8"
                                        Fill="{StaticResource GridView_NavigatorIndicatorBackground}"/>
                            </Grid>
                            <Grid x:Name="EditIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="10" Visibility="Collapsed">
                                <Path Fill="{StaticResource GridView_EditIndicatorBackground1}" Stretch="Fill" Data="M14,9 L15,9 15,10 14,10 z M1,9 L2,9 2,10 1,10 z M15,8 L16,8 16,9 15,9 z M0,8 L1,8 1,9 0,9 z M15,1 L16,1 16,2 15,2 z M0,1 L1,1 1,2 0,2 z M14,0 L15,0 15,1 14,1 z M1,0 L2,0 2,1 1,1 z"/>
                                <Path
                                        Fill="{StaticResource GridView_EditIndicatorBackground2}"
                                        Stretch="Fill"
                                        Margin="1"
                                        Data="M0.99999994,6.9999995 L2,6.9999995 3,6.9999995 4,6.9999995 5,6.9999995 6,6.9999995 7,6.9999995 8,6.9999995 9,6.9999995 10,6.9999995 11,6.9999995 12,6.9999995 13,6.9999995 13,7.9999995 12,7.9999995 11,7.9999995 10,7.9999995 9,7.9999995 8,7.9999995 7,7.9999995 6,7.9999995 5,7.9999995 4,7.9999995 3,7.9999995 2,7.9999995 0.99999994,7.9999995 z M13,0.99999994 L14,0.99999994 14,1.9999999 14,2.9999995 14,3.9999995 14,4.9999995 14,5.9999995 14,6.9999995 13,6.9999995 13,5.9999995 13,4.9999995 13,3.9999995 13,2.9999995 13,1.9999999 z M0,0.99999994 L0.99999994,0.99999994 0.99999994,1.9999999 0.99999994,2.9999995 0.99999994,3.9999995 0.99999994,4.9999995 0.99999994,5.9999995 0.99999994,6.9999995 0,6.9999995 0,5.9999995 0,4.9999995 0,3.9999995 0,2.9999995 0,1.9999999 z M11,0 L12,0 13,0 13,0.99999994 12,0.99999994 11,0.99999994 10,0.99999994 9,0.99999994 8,0.99999994 7,0.99999994 6,0.99999994 5,0.99999994 4,0.99999994 3,0.99999994 2,0.99999994 0.99999994,0.99999994 0.99999994,2.3841858E-07 2,2.3841858E-07 3,2.3841858E-07 4,2.3841858E-07 5,2.3841858E-07 6,2.3841858E-07 7,2.3841858E-07 8,2.3841858E-07 9,2.3841858E-07 10,2.3841858E-07 z"/>
                                <Path Fill="{StaticResource GridView_EditIndicatorBackground3}" Stretch="Fill" Data="M2,9 L3,9 4,9 5,9 6,9 7,9 8,9 9,9 10,9 11,9 12,9 13,9 14,9 14,10 13,10 12,10 11,10 10,10 9,10 8,10 7,10 6,10 5,10 4,10 3,10 2,10 z M14,8 L15,8 15,9 14,9 z M1,8 L2,8 2,9 1,9 z M15,2 L16,2 16,3 16,4 16,5 16,6 16,7 16,8 15,8 15,7 15,6 15,5 15,4 15,3 z M3,2 L4,2 5,2 6,2 6,3 5,3 5,4 5,5 5,6 5,7 6,7 6,8 5,8 4,8 3,8 3,7 4,7 4,6 4,5 4,4 4,3 3,3 z M0,2 L1,2 1,3 1,4 1,5 1,6 1,7 1,8 0,8 0,7 0,6 0,5 0,4 0,3 z M14,1 L15,1 15,2 14,2 z M1,1 L2,1 2,2 1,2 z M2,0 L3,0 4,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 13,0 14,0 14,1 13,1 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1 3,1 2,1 z"/>
                                <Path
                                        Fill="{StaticResource GridView_EditIndicatorBackground4}"
                                        Stretch="Fill"
                                        Margin="2"
                                        Data="M4,0 L5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 12,1 12,2 12,3 12,4 12,5.0000001 12,6 11,6 10,6 9,6 8,6 7,6 6,6 5,6 4,6 4,5.0000001 3,5.0000001 3,4 3,3 3,2 3,1 4,1 z M0,0 L1,0 1,1 2,1 2,2 2,3 2,4 2,5.0000001 1,5.0000001 1,6 0,6 0,5.0000001 0,4 0,3 0,2 0,1 z"/>
                            </Grid>
                            <Grid x:Name="InvalidEditableIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="10" Visibility="Collapsed">
                                <Path Fill="{StaticResource GridView_InvalidEditIndicatorBackground1}" Stretch="Fill" Data="M14,9 L15,9 15,10 14,10 z M1,9 L2,9 2,10 1,10 z M15,8 L16,8 16,9 15,9 z M0,8 L1,8 1,9 0,9 z M15,1 L16,1 16,2 15,2 z M0,1 L1,1 1,2 0,2 z M14,0 L15,0 15,1 14,1 z M1,0 L2,0 2,1 1,1 z"/>
                                <Path
                                        Fill="{StaticResource GridView_InvalidEditIndicatorBackground2}"
                                        Stretch="Fill"
                                        Margin="1"
                                        Data="M0.99999994,6.9999995 L2,6.9999995 3,6.9999995 4,6.9999995 5,6.9999995 6,6.9999995 7,6.9999995 8,6.9999995 9,6.9999995 10,6.9999995 11,6.9999995 12,6.9999995 13,6.9999995 13,7.9999995 12,7.9999995 11,7.9999995 10,7.9999995 9,7.9999995 8,7.9999995 7,7.9999995 6,7.9999995 5,7.9999995 4,7.9999995 3,7.9999995 2,7.9999995 0.99999994,7.9999995 z M13,0.99999994 L14,0.99999994 14,1.9999999 14,2.9999995 14,3.9999995 14,4.9999995 14,5.9999995 14,6.9999995 13,6.9999995 13,5.9999995 13,4.9999995 13,3.9999995 13,2.9999995 13,1.9999999 z M0,0.99999994 L0.99999994,0.99999994 0.99999994,1.9999999 0.99999994,2.9999995 0.99999994,3.9999995 0.99999994,4.9999995 0.99999994,5.9999995 0.99999994,6.9999995 0,6.9999995 0,5.9999995 0,4.9999995 0,3.9999995 0,2.9999995 0,1.9999999 z M11,0 L12,0 13,0 13,0.99999994 12,0.99999994 11,0.99999994 10,0.99999994 9,0.99999994 8,0.99999994 7,0.99999994 6,0.99999994 5,0.99999994 4,0.99999994 3,0.99999994 2,0.99999994 0.99999994,0.99999994 0.99999994,2.3841858E-07 2,2.3841858E-07 3,2.3841858E-07 4,2.3841858E-07 5,2.3841858E-07 6,2.3841858E-07 7,2.3841858E-07 8,2.3841858E-07 9,2.3841858E-07 10,2.3841858E-07 z"/>
                                <Path Fill="{StaticResource GridView_InvalidEditIndicatorBackground3}" Stretch="Fill" Data="M2,9 L3,9 4,9 5,9 6,9 7,9 8,9 9,9 10,9 11,9 12,9 13,9 14,9 14,10 13,10 12,10 11,10 10,10 9,10 8,10 7,10 6,10 5,10 4,10 3,10 2,10 z M14,8 L15,8 15,9 14,9 z M1,8 L2,8 2,9 1,9 z M15,2 L16,2 16,3 16,4 16,5 16,6 16,7 16,8 15,8 15,7 15,6 15,5 15,4 15,3 z M3,2 L4,2 5,2 6,2 6,3 5,3 5,4 5,5 5,6 5,7 6,7 6,8 5,8 4,8 3,8 3,7 4,7 4,6 4,5 4,4 4,3 3,3 z M0,2 L1,2 1,3 1,4 1,5 1,6 1,7 1,8 0,8 0,7 0,6 0,5 0,4 0,3 z M14,1 L15,1 15,2 14,2 z M1,1 L2,1 2,2 1,2 z M2,0 L3,0 4,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 13,0 14,0 14,1 13,1 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1 3,1 2,1 z"/>
                                <Path
                                        Fill="{StaticResource GridView_InvalidEditIndicatorBackground4}"
                                        Stretch="Fill"
                                        Margin="2"
                                        Data="M4,0 L5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 12,1 12,2 12,3 12,4 12,5.0000001 12,6 11,6 10,6 9,6 8,6 7,6 6,6 5,6 4,6 4,5.0000001 3,5.0000001 3,4 3,3 3,2 3,1 4,1 z M0,0 L1,0 1,1 2,1 2,2 2,3 2,4 2,5.0000001 1,5.0000001 1,6 0,6 0,5.0000001 0,4 0,3 0,2 0,1 z"/>
                            </Grid>
                            <Grid x:Name="ErrorIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16" Visibility="Collapsed">
                                <Path
                                        Fill="{StaticResource GridView_ErrorIndicatorBackground1}"
                                        Stretch="Fill"
                                        Margin="1"
                                        Data="M3,12.999999 L4,12.999999 5,12.999999 6,12.999999 7,12.999999 8,12.999999 9,12.999999 10,12.999999 11,12.999999 11,13.999999 10,13.999999 9,13.999999 8,13.999999 7,13.999999 6,13.999999 5,13.999999 4,13.999999 3,13.999999 z M11,11.999999 L12,11.999999 12,12.999999 11,12.999999 z M2.0000001,11.999999 L3,11.999999 3,12.999999 2.0000001,12.999999 z M12,10.999999 L13,10.999999 13,11.999999 12,11.999999 z M1,10.999999 L2.0000001,10.999999 2.0000001,11.999999 1,11.999999 z M13,2.9999992 L14,2.9999992 14,3.9999992 14,4.9999992 14,5.9999992 14,6.9999992 14,7.9999992 14,8.9999992 14,9.9999992 14,10.999999 13,10.999999 13,9.9999992 13,8.9999992 13,7.9999992 13,6.9999992 13,5.9999992 13,4.9999992 13,3.9999992 z M0,2.9999992 L1,2.9999992 1,3.9999992 1,4.9999992 1,5.9999992 1,6.9999992 1,7.9999992 1,8.9999992 1,9.9999992 1,10.999999 0,10.999999 0,9.9999992 0,8.9999992 0,7.9999992 0,6.9999992 0,5.9999992 0,4.9999992 0,3.9999992 z M12,1.9999999 L13,1.9999999 13,2.9999992 12,2.9999992 z M1,1.9999999 L2.0000001,1.9999999 2.0000001,2.9999992 1,2.9999992 z M11,0.99999994 L12,0.99999994 12,1.9999999 11,1.9999999 z M2.0000001,0.99999994 L2.9999998,0.99999994 2.9999998,1.9999999 2.0000001,1.9999999 z M2.9999998,0 L3.9999998,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 11,0.99999994 10,0.99999994 9,0.99999994 8,0.99999994 7,0.99999994 6,0.99999994 5,0.99999994 3.9999998,0.99999994 2.9999998,0.99999994 z"/>
                                <Path
                                        Fill="{StaticResource GridView_ErrorIndicatorBackground2}"
                                        Stretch="Fill"
                                        Margin="7 3"
                                        Data="M1.4901161E-07,8 L1.0000001,8 2.0000002,8 2.0000002,9 2.0000002,10 1.0000003,10 1.0000003,9 1.0000001,10 1.4901161E-07,10 1.4901161E-07,9 z M1.4901161E-07,0 L1.0000001,0 2.0000002,0 2.0000002,1 2.0000002,2 2.0000002,3 2.0000002,4.0000001 2.0000002,5 2.0000002,5.9999999 2.0000002,7 1.0000001,7 1.4901161E-07,7 1.4901161E-07,5.9999999 1.4901161E-07,5 1.4901161E-07,4.0000001 1.4901161E-07,3 1.4901161E-07,2 0,1 z"/>
                                <Path Fill="{StaticResource GridView_ErrorIndicatorBackground3}" Stretch="Fill" Data="M4,15 L5,15 6,15 7,15 8,15 9,15 10,15 11,15 12,15 12,16 11,16 10,16 9,16 8,16 7,16 6,16 5,16 4,16 z M12,14 L13,14 13,15 12,15 z M3,14 L4,14 4,15 3,15 z M13,13 L14,13 14,14 13,14 z M2,13 L3,13 3,14 2,14 z M14,12 L15,12 15,13 14,13 z M1,12 L2,12 2,13 1,13 z M7,11 L7,12 7,13 8,13 9,13 9,12 9,11 8,11 z M15,4 L16,4 16,5 16,6 16,7 16,8 16,9 16,10 16,11 16,12 15,12 15,11 15,10 15,9 15,8 15,7 15,6 15,5 z M0,4 L1,4 1,5 1,6 1,7 1,8 1,9 1,10 1,11 1,12 0,12 0,11 0,10 0,9 0,8 0,7 0,6 0,5 z M14,3 L15,3 15,4 14,4 z M7,3 L7,4 7,5 7,6 7,7 7,8 7,9 7,10 8,10 9,10 9,9 9,8 9,7 9,6 9,5 9,4 9,3 8,3 z M1,3 L2,3 2,4 1,4 z M13,2 L14,2 14,3 13,3 z M4,2 L5,2 6,2 7,2 8,2 9,2 10,2 11,2 12,2 12,3 13,3 13,4 14,4 14,5 14,6 14,7 14,8 14,9 14,10 14,11 14,12 13,12 13,13 12,13 12,14 11,14 10,14 9,14 8,14 7,14 6,14 5,14 4,14 4,13 3,13 3,12 2,12 2,11 2,10 2,9 2,8 2,7 2,6 2,5 2,4 3,4 3,3 4,3 z M2,2 L3,2 3,3 2,3 z M12,1 L13,1 13,2 12,2 z M3,1 L4,1 4,2 3,2 z M4,0 L5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1 z"/>
                                <ToolTipService.ToolTip>
                                    <ToolTip x:Name="validationTooltip" Placement="Bottom" Content="{TemplateBinding Errors}" Template="{StaticResource TreeListViewRow_ValidationToolTipTemplate}"/>
                                </ToolTipService.ToolTip>
                            </Grid>
                            <Border x:Name="PART_RowResizer" Background="Transparent" Height="2" VerticalAlignment="Bottom" Cursor="SizeNS"/>
                        </Grid>
                    </Border>
                </Border>
            </grid:SelectiveScrollingGrid>
        </Grid>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="SelectionBackground" Property="Background" Value="{StaticResource ItemBackground_Over}"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="SelectionBackground" Property="Background" Value="{StaticResource ItemBackground_Selected}"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsValid" Value="False"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="SelectionBackground" Property="Background" Value="{StaticResource ItemBackground_Invalid}"/>
                <Setter TargetName="ErrorIndicator" Property="Visibility" Value="Visible"/>
                <Setter TargetName="InvalidEditableIndicator" Property="Visibility" Value="Collapsed"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsValid" Value="False"/>
                    <Condition Property="IsInEditMode" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="SelectionBackground" Property="Background" Value="{StaticResource ItemBackground_Invalid}"/>
                <Setter TargetName="InvalidEditableIndicator" Property="Visibility" Value="Visible"/>
                <Setter TargetName="ErrorIndicator" Property="Visibility" Value="Collapsed"/>
            </MultiTrigger>
            <Trigger Property="IsCurrent" Value="True">
                <Setter TargetName="NavigatorIndicator" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="IsInEditMode" Value="True">
                <Setter TargetName="EditIndicator" Property="Visibility" Value="Visible"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="TreeListViewRowCoreValidationStyle" TargetType="treelist:TreeListViewRow">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template" Value="{StaticResource TreeListViewRowCoreValidationTemplate}"/>
        <Setter Property="Background" Value="{StaticResource ItemBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="MinHeight" Value="26"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="AllowDrop" Value="True"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
</ResourceDictionary>
