<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls.GridView;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:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        xmlns:treeList="clr-namespace:Telerik.Windows.Controls.TreeListView;assembly=Telerik.Windows.Controls.GridView"
        xmlns:searchPanel="clr-namespace:Telerik.Windows.Controls.GridView.SearchPanel;assembly=Telerik.Windows.Controls.GridView"
        xmlns:mccb="clr-namespace:Telerik.Windows.Controls.MultiColumnComboBox;assembly=Telerik.Windows.Controls.GridView">
    <ResourceDictionary.MergedDictionaries>
        <telerik:FluentResourceDictionary/>
    </ResourceDictionary.MergedDictionaries>
    <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
    <telerik1:DoubleToThicknessConverter x:Key="DoubleToThicknessConverter"/>
    <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
    <telerik1:OpacityConverter x:Key="OpacityConverter"/>
    <telerik1:UppercaseConverter x:Key="UppercaseConverter"/>
    <Geometry x:Key="ArrowTopRight8x8">M0,0 L8,0 8,8 z</Geometry>
    <sys:String x:Key="GlyphArrow60Up"></sys:String>
    <sys:String x:Key="GlyphArrow60Down"></sys:String>
    <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
    <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
    <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
    <sys:String x:Key="GlyphArrowChevronLeft"></sys:String>
    <sys:String x:Key="GlyphMenu"></sys:String>
    <sys:String x:Key="GlyphCancel"></sys:String>
    <sys:String x:Key="GlyphCheck"></sys:String>
    <sys:String x:Key="GlyphClose"></sys:String>
    <sys:String x:Key="GlyphPlus"></sys:String>
    <sys:String x:Key="GlyphMinus"></sys:String>
    <sys:String x:Key="GlyphFilterSmall"></sys:String>
    <sys:String x:Key="GlyphWarning"></sys:String>
    <sys:String x:Key="GlyphComment"></sys:String>
    <sys:String x:Key="GlyphTableLightDialog"></sys:String>
    <sys:String x:Key="GlyphPin"></sys:String>
    <sys:String x:Key="GlyphUnpin"></sys:String>
    <telerik1:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
    <ext:DynamicResourceProxy x:Key="PrimaryBackgroundBrushProxy" ProxyValue="{Binding Source={x:Static telerik1:FluentPalette.Palette}, Path=PrimaryBackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
    <ext:DynamicResourceProxy x:Key="AlternativeBrushProxy" ProxyValue="{Binding Source={x:Static telerik1:FluentPalette.Palette}, Path=AlternativeColor, Converter={StaticResource ColorToBrushConverter}}"/>
    <ControlTemplate x:Key="ErrorTooltipTemplate" TargetType="ToolTip">
        <Grid x:Name="RootVisual" HorizontalAlignment="Right" RenderTransformOrigin="0 0" Opacity="0" SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0"/>
                        <VisualTransition To="Open" GeneratedDuration="0:0:0.3">
                            <Storyboard>
                                <DoubleAnimation Storyboard.TargetName="xform" Storyboard.TargetProperty="X" To="0" Duration="0:0:0.3">
                                    <DoubleAnimation.EasingFunction>
                                        <BackEase Amplitude=".4" EasingMode="EaseOut"/>
                                    </DoubleAnimation.EasingFunction>
                                </DoubleAnimation>
                                <DoubleAnimation Storyboard.TargetName="RootVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.3"/>
                            </Storyboard>
                        </VisualTransition>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Closed">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="RootVisual" Storyboard.TargetProperty="Opacity" To="0" Duration="0"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Open">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="xform" Storyboard.TargetProperty="X" To="0" Duration="0"/>
                            <DoubleAnimation Storyboard.TargetName="RootVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RenderTransform>
                <TranslateTransform x:Name="xform" X="-25"/>
            </Grid.RenderTransform>
            <Border Background="{telerik1:FluentResource ResourceKey=ValidationBrush}" Margin="1 0 0 0" UseLayoutRounding="True">
                <ContentPresenter
                        Content="{Binding ErrorContent}"
                        Margin="10 6"
                        TextBlock.Foreground="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"
                        TextBlock.FontSize="{telerik1:FluentResource ResourceKey=FontSize}"
                        VerticalAlignment="Center"/>
            </Border>
            <ContentControl/>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="ValidationTooltipTemplate">
        <Grid SnapsToDevicePixels="True" VerticalAlignment="Top">
            <AdornedElementPlaceholder x:Name="Holder"/>
            <Border BorderBrush="{telerik1:FluentResource ResourceKey=ValidationBrush}" BorderThickness="1" CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadius}"/>
            <Path
                    Data="{StaticResource ArrowTopRight8x8}"
                    Fill="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                    Width="8"
                    Height="8"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    Margin="0 1 1 0"/>
            <ToolTipService.ToolTip>
                <ToolTip x:Name="PART_ToolTip"
                        DataContext="{Binding RelativeSource={RelativeSource Mode=Self}, Path=PlacementTarget.DataContext}"
                        Template="{StaticResource ErrorTooltipTemplate}"
                        Placement="Right"/>
            </ToolTipService.ToolTip>
        </Grid>
    </ControlTemplate>
    <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
    <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"/>
    <grid:ColumnHeaderConverter x:Key="ColumnHeaderConverter"/>
    <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
        <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadius}"/>
        <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
        <Setter Property="mat:MaterialAssist.PressedBrush" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="mat:MaterialAssist.FocusBrush" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="5"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik1:RadButton">
                    <Grid>
                        <Border x:Name="BorderVisual"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
                        <Border x:Name="FocusVisual"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                Visibility="Collapsed"
                                IsHitTestVisible="False"
                                BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                                BorderBrush="{TemplateBinding mat:MaterialAssist.FocusBrush}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
                        <mat:FluentControl
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch">
                            <ContentPresenter x:Name="Content"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    RecognizesAccessKey="True"
                                    Focusable="False"
                                    TextBlock.Foreground="{TemplateBinding Foreground}"
                                    Margin="{TemplateBinding Padding}"
                                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                    Content="{TemplateBinding Content}"
                                    ContentTemplate="{TemplateBinding ContentTemplate}"/>
                        </mat:FluentControl>
                    </Grid>
                    <ControlTemplate.Triggers>

                        <!-- background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsMouseOver" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Background" Value="Transparent"/>
                            <Setter Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>

                        <!-- General IsKeyboardFocused setters -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsKeyboardFocused" Value="True"/>
                                <Condition Property="IsPressed" Value="False"/>
                                <Condition Property="IsMouseOver" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Visibility" TargetName="FocusVisual" Value="Visible"/>
                        </MultiTrigger>

                        <!-- general setters for IsMouseOver -->
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                        </Trigger>

                        <!-- general setters for IsPressed -->
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.PressedBrush), Mode=OneWay}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.PressedBrush), Mode=OneWay}"/>
                        </Trigger>

                        <!-- disabled -->
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                            <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
                            <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
                        </Trigger>

                        <!-- disabled and focused -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsFocused" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="FocusVisual" Property="Visibility" Value="Collapsed"/>
                        </MultiTrigger>

                        <!-- disabled & background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Background" Value="Transparent"/>
                            <Setter Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
    <Style x:Key="RadDropDownButtonStyle" TargetType="telerik1:RadDropDownButton">
        <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadius}"/>
        <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
        <Setter Property="mat:MaterialAssist.PressedBrush" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="mat:MaterialAssist.FocusBrush" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
        <Setter Property="mat:MaterialAssist.CheckedBrush" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="DropDownMinHeight" Value="3"/>
        <Setter Property="DropDownMinWidth" Value="3"/>
        <Setter Property="Padding" Value="5"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <Setter Property="IsOpen" Value="False"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik1:RadDropDownButton">
                    <Grid>
                        <Border x:Name="BorderVisual"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
                        <Border x:Name="FocusVisual"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                Visibility="Collapsed"
                                IsHitTestVisible="False"
                                BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                                Background="{x:Null}"
                                BorderBrush="{TemplateBinding mat:MaterialAssist.FocusBrush}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
                        <mat:FluentControl
                                IsSmartClipped="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                HorizontalContentAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="Auto"/>
                                    <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="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik1:RadDropDownButton}},Path=VerticalContentAlignment}"
                                        HorizontalAlignment="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik1:RadDropDownButton}},Path= HorizontalContentAlignment}"
                                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                        ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                        RecognizesAccessKey="True"/>
                                <Grid x:Name="DropDownIndicator"
                                        IsHitTestVisible="False"
                                        Grid.Column="1"
                                        Grid.Row="2"
                                        HorizontalAlignment="Center"
                                        Canvas.ZIndex="2"
                                        VerticalAlignment="Center"
                                        Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                                        Margin="5">
                                    <telerik1:RadGlyph x:Name="arrow" Foreground="{telerik1:FluentResource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphArrowChevronDown}"/>
                                </Grid>
                            </Grid>
                        </mat:FluentControl>
                        <Popup x:Name="DropDownPopup"
                                AllowsTransparency="True"
                                StaysOpen="False"
                                Focusable="False"
                                Placement="Bottom"
                                PopupAnimation="{TemplateBinding PopupAnimation}"
                                HorizontalOffset="0"
                                VerticalOffset="0">
                            <Grid x:Name="PopupGrid" Margin="3 0 3 3">
                                <mat:Shadow x:Name="PopupShadow"
                                        ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"
                                        SnapsToDevicePixels="True"
                                        BorderBrush="Transparent"
                                        BorderThickness="0"
                                        Background="{telerik1:FluentResource ResourceKey=AlternativeBrush}"
                                        CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadiusBottom}"/>
                                <Border x:Name="DropDownPopupBorder"
                                        BorderThickness="0"
                                        MinWidth="{TemplateBinding DropDownMinWidth}"
                                        MinHeight="{TemplateBinding DropDownMinHeight}"
                                        Width="{TemplateBinding DropDownWidth}"
                                        Height="{TemplateBinding DropDownHeight}"
                                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                                        MaxHeight="{TemplateBinding DropDownMaxHeight}"
                                        Background="{telerik1:FluentResource ResourceKey=AlternativeBrush}"
                                        BorderBrush="Transparent"
                                        CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadiusBottom}">
                                    <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}"
                                            ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                            ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"/>
                                </Border>
                            </Grid>
                        </Popup>
                    </Grid>
                    <ControlTemplate.Triggers>

                        <!-- background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                                <Condition Property="IsMouseOver" Value="False"/>
                                <Condition Property="IsOpen" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Background" Value="Transparent"/>
                            <Setter Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>

                        <!-- General IsKeyboardFocused setters -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsKeyboardFocused" Value="True"/>
                                <Condition Property="IsPressed" Value="False"/>
                                <Condition Property="IsMouseOver" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Visibility" TargetName="FocusVisual" Value="Visible"/>
                        </MultiTrigger>

                        <!-- General setters for IsMouseOver -->
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" TargetName="BorderVisual" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                            <Setter Property="BorderBrush" TargetName="BorderVisual" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                        </Trigger>

                        <!-- General setters for IsPressed -->
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Background" TargetName="BorderVisual" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.PressedBrush), Mode=OneWay}"/>
                            <Setter Property="BorderBrush" TargetName="BorderVisual" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.PressedBrush), Mode=OneWay}"/>
                        </Trigger>

                        <!-- General setters for IsOpen -->
                        <Trigger Property="IsOpen" Value="True">
                            <Setter TargetName="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronUp}"/>
                            <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusTop}"/>
                            <Setter Property="Visibility" TargetName="FocusVisual" Value="Collapsed"/>
                            <Setter Property="Visibility" TargetName="PopupShadow" Value="Visible"/>
                            <Setter Property="Background" TargetName="BorderVisual" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CheckedBrush), Mode=OneWay}"/>
                            <Setter Property="BorderBrush" TargetName="BorderVisual" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CheckedBrush), Mode=OneWay}"/>
                        </Trigger>

                        <!-- disabled -->
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                            <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
                            <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
                            <Setter TargetName="DropDownIndicator" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                        </Trigger>

                        <!-- disabled and focused -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsFocused" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="FocusVisual" Property="Visibility" Value="Collapsed"/>
                        </MultiTrigger>

                        <!-- disabled & background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Background" Value="Transparent"/>
                            <Setter Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>

                        <!-- DropDownButtonPosition and DropDownPacement -->
                        <Trigger Property="DropDownButtonPosition" Value="Bottom"/>
                        <Trigger Property="DropDownButtonPosition" Value="Left">
                            <Setter TargetName="DropDownIndicator" Property="Grid.Column" Value="0"/>
                            <Setter TargetName="DropDownIndicator" Property="Grid.Row" Value="1"/>
                        </Trigger>
                        <Trigger Property="DropDownButtonPosition" Value="Top">
                            <Setter TargetName="DropDownIndicator" Property="Grid.Column" Value="1"/>
                            <Setter TargetName="DropDownIndicator" Property="Grid.Row" Value="0"/>
                        </Trigger>
                        <Trigger Property="DropDownButtonPosition" Value="Right">
                            <Setter TargetName="DropDownIndicator" Property="Grid.Column" Value="2"/>
                            <Setter TargetName="DropDownIndicator" Property="Grid.Row" Value="1"/>
                        </Trigger>
                        <Trigger Property="DropDownPlacement" Value="Bottom"/>
                        <Trigger Property="DropDownPlacement" Value="Top">
                            <Setter TargetName="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronUp}"/>
                            <Setter TargetName="PopupShadow" Property="CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusTop}"/>
                            <Setter TargetName="DropDownPopupBorder" Property="CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusTop}"/>
                            <Setter TargetName="PopupGrid" Property="Margin" Value="3 3 3 0"/>
                        </Trigger>
                        <Trigger Property="DropDownPlacement" Value="Left">
                            <Setter TargetName="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronLeft}"/>
                            <Setter TargetName="PopupShadow" Property="CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusLeft}"/>
                            <Setter TargetName="DropDownPopupBorder" Property="CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusLeft}"/>
                            <Setter TargetName="PopupGrid" Property="Margin" Value="3 3 0 3"/>
                        </Trigger>
                        <Trigger Property="DropDownPlacement" Value="Right">
                            <Setter TargetName="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronRight}"/>
                            <Setter TargetName="PopupShadow" Property="CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusRight}"/>
                            <Setter TargetName="DropDownPopupBorder" Property="CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusRight}"/>
                            <Setter TargetName="PopupGrid" Property="Margin" Value="0 3 3 3"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsOpen" Value="True"/>
                                <Condition Property="DropDownPlacement" Value="Top"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronDown}"/>
                            <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusBottom}"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsOpen" Value="True"/>
                                <Condition Property="DropDownPlacement" Value="Left"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronRight}"/>
                            <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusRight}"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsOpen" Value="True"/>
                                <Condition Property="DropDownPlacement" Value="Right"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronLeft}"/>
                            <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusLeft}"/>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerik1:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}"/>
    <Style x:Key="ToolTipStyle" TargetType="ToolTip">
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="5"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToolTip">
                    <Grid>
                        <Border
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                            <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="ToolTip" BasedOn="{StaticResource ToolTipStyle}"/>
    <ControlTemplate x:Key="GridViewValidationToolTipTemplate" TargetType="ToolTip">
        <Grid x:Name="Root" Opacity="0" Margin="2 0 0 0" Background="Transparent" RenderTransformOrigin="0 0">
            <Grid.RenderTransform>
                <TranslateTransform x:Name="xform" X="-25"/>
            </Grid.RenderTransform>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Border Padding="4" Grid.Column="1" MinHeight="28" Background="{telerik1:FluentResource ResourceKey=ValidationBrush}">
                <ItemsControl ItemsSource="{TemplateBinding Content}">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <TextBlock
                                    MaxWidth="250"
                                    Foreground="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"
                                    FontSize="{telerik1:FluentResource ResourceKey=FontSize}"
                                    FontFamily="{telerik1:FluentResource ResourceKey=FontFamily}"
                                    VerticalAlignment="Center"
                                    Text="{Binding}"
                                    TextWrapping="Wrap"/>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                    <ItemsControl.ItemsPanel>
                        <ItemsPanelTemplate>
                            <StackPanel/>
                        </ItemsPanelTemplate>
                    </ItemsControl.ItemsPanel>
                </ItemsControl>
            </Border>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsOpen" Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard x:Name="OpenAnimation">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="xform" Storyboard.TargetProperty="X" To="0" Duration="0:0:0.2"/>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard x:Name="CloseAnimation">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="xform" Storyboard.TargetProperty="X" To="-25" Duration="0:0:0.2"/>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.ExitActions>
                <Setter Property="Opacity" Value="1" TargetName="Root"/>
            </Trigger>
            <Trigger Property="IsOpen" Value="False">
                <Setter Property="Opacity" Value="0" TargetName="Root"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="AggregateResultsListStyle" TargetType="grid:AggregateResultsList">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <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>
    </Style>
    <Style TargetType="grid:AggregateResultsList" BasedOn="{StaticResource AggregateResultsListStyle}"/>
    <ControlTemplate x:Key="AutoCompleteStringFilterEditorTemplate" TargetType="grid:AutoCompleteStringFilterEditor">
        <Grid MinWidth="100">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <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"
                    Content="aA"
                    Margin="5 0 0 0"
                    IsChecked="{Binding IsCaseSensitive, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                    Visibility="{TemplateBinding MatchCaseVisibility}"
                    FontSize="{TemplateBinding FontSize}"
                    MinWidth="28"
                    FontFamily="{TemplateBinding FontFamily}">
                <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="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="IsTabStop" Value="False"/>
    </Style>
    <Style TargetType="grid:AutoCompleteStringFilterEditor" BasedOn="{StaticResource AutoCompleteStringFilterEditorStyle}"/>
    <Style x:Key="ControlPanelItem_DropDownButtonStyle" TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}">
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
        <Setter Property="DropDownIndicatorVisibility" Value="Collapsed"/>
        <Setter Property="IsBackgroundVisible" Value="False"/>
        <Setter Property="MinHeight" Value="28"/>
        <Setter Property="MinWidth" Value="28"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Margin" Value="0 0 10 0"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsOpen" Value="false"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <ControlTemplate x:Key="ControlPanelItemControlTemplate" TargetType="grid:ControlPanelItemControl">
        <telerik:RadDropDownButton x:Name="PART_ControlPanelItemControlDropDownButton"
                DropDownContent="{Binding Content}"
                Style="{StaticResource ControlPanelItem_DropDownButtonStyle}"
                VerticalAlignment="Center"
                HorizontalAlignment="Center">
            <ToolTipService.ToolTip>
                <ToolTip Placement="Right" Content="{Binding ButtonTooltip}" Visibility="{Binding ButtonTooltip, Converter={StaticResource ControlPanelItemButtonTooltipToVisibilityConverter}}"/>
            </ToolTipService.ToolTip>
            <telerik:RadGlyph VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphMenu}" FontSize="16"/>
        </telerik:RadDropDownButton>
    </ControlTemplate>
    <Style x:Key="ControlPanelItemControlStyle" TargetType="grid:ControlPanelItemControl">
        <Setter Property="Template" Value="{StaticResource ControlPanelItemControlTemplate}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="IsTabStop" Value="False"/>
    </Style>
    <Style TargetType="grid:ControlPanelItemControl" BasedOn="{StaticResource ControlPanelItemControlStyle}"/>
    <ControlTemplate x:Key="ChildDataControlsPresenterTemplate" TargetType="grid:ChildDataControlsPresenter">
        <ItemsControl x:Name="PART_ChildDataItemsControl" ItemsSource="{Binding}" IsTabStop="{TemplateBinding IsTabStop}">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <Border Background="{telerik1:FluentResource ResourceKey=AlternativeBrush}" BorderBrush="{telerik1:FluentResource ResourceKey=BasicBrush}" BorderThickness="0 1">
                        <controls:RadGridView MaxHeight="300" Margin="10" IsTabStop="{Binding IsTabStop, ElementName=PART_ChildDataItemsControl}"/>
                    </Border>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </ControlTemplate>
    <Style x:Key="ChildDataControlsPresenterStyle" TargetType="grid:ChildDataControlsPresenter">
        <Setter Property="Template" Value="{StaticResource ChildDataControlsPresenterTemplate}"/>
    </Style>
    <Style TargetType="grid:ChildDataControlsPresenter" BasedOn="{StaticResource ChildDataControlsPresenterStyle}"/>
    <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"
                    TextBlock.Foreground="{TemplateBinding Foreground}"
                    TextBlock.FontSize="{TemplateBinding FontSize}"
                    TextBlock.FontFamily="{TemplateBinding FontFamily}"
                    Content="{Binding Content, Converter={StaticResource UppercaseConverter}, RelativeSource={RelativeSource TemplatedParent}}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Margin="{TemplateBinding Padding}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="CommonColumnHeaderStyle" TargetType="grid:CommonColumnHeader">
        <Setter Property="Template" Value="{StaticResource CommonColumnHeaderTemplate}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSizeXL}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontWeight" Value="SemiBold"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=AccentBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="BorderThickness" Value="0 0 1 1"/>
        <Setter Property="Padding" Value="5 0"/>
        <Setter Property="MinHeight" Value="31"/>
        <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
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                Visibility="{TemplateBinding Visibility}"
                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                HorizontalAlignment="Stretch">
            <Grid x:Name="PART_CommonHeadersContainer" HorizontalAlignment="Left"/>
        </Border>
    </ControlTemplate>
    <Style x:Key="CommonHeaderPresenterStyle" TargetType="grid:CommonHeaderPresenter">
        <Setter Property="Template" Value="{StaticResource CommonHeaderPresenterTemplate}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:CommonHeaderPresenter" BasedOn="{StaticResource CommonHeaderPresenterStyle}"/>
    <ControlTemplate x:Key="DataCellsPresenterTemplate" TargetType="grid:DataCellsPresenter">
        <Grid>
            <ItemsPresenter/>
            <grid:FrozenColumnsSplitter x:Name="PART_FrozenColumnsSplitter" HorizontalAlignment="Left"/>
            <grid:FrozenColumnsSplitterRightSide x:Name="PART_FrozenColumnsSplitterRight" HorizontalAlignment="Left"/>
        </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" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
            <ContentPresenter x:Name="PART_ContentPresenter"
                    Margin="{TemplateBinding Padding}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="Visibility" Value="Visible">
                <Setter TargetName="DetailsBorder" Property="Visibility" Value="Visible"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="DetailsPresenterStyle" TargetType="grid:DetailsPresenter">
        <Setter Property="Template" Value="{StaticResource DetailsPresenterTemplate}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Visibility" Value="Collapsed"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:DetailsPresenter" BasedOn="{StaticResource DetailsPresenterStyle}"/>
    <DataTemplate x:Key="FilteringPopupContentControlContentTemplate">
        <Border Background="{Binding RelativeSource={RelativeSource AncestorType={x:Type ContentControl}}, Path=Background}">
            <ContentPresenter Content="{Binding}"/>
        </Border>
    </DataTemplate>
    <ControlTemplate TargetType="grid:FilteringDropDown" x:Key="DistinctFilterControlTemplate">
        <Grid>
            <Button x:Name="PART_DropDownButton" AutomationProperties.Name="FilterDropDownButton">
                <Button.Template>
                    <ControlTemplate TargetType="Button">
                        <ContentPresenter/>
                    </ControlTemplate>
                </Button.Template>
                <Grid Cursor="Hand" Background="Transparent" Margin="2">
                    <telerik:RadGlyph x:Name="FilterIcon" FontSize="16" Glyph="{StaticResource GlyphFilterSmall}" Foreground="{TemplateBinding Foreground}"/>
                </Grid>
            </Button>
            <Popup x:Name="PART_DropDownPopup" mat:ThemeEffectsHelper.IsAcrylic="True" StaysOpen="True" AllowsTransparency="True" PopupAnimation="Fade">

                <!-- This content control is inserted there only for Fluent theme in order to receive background -->
                <ContentControl x:Name="FilteringPopupContentControl" ContentTemplate="{StaticResource FilteringPopupContentControlContentTemplate}"/>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="FunnelFillVisibility" Value="Visible">
                <Setter TargetName="FilterIcon" Property="Foreground" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
            </Trigger>
            <DataTrigger Binding="{Binding ElementName=PART_DropDownPopup, Path=(mat:ThemeEffectsHelper.IsAcrylic)}" Value="False">
                <Setter TargetName="FilteringPopupContentControl" Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
            </DataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="FilteringDropDownStyle" TargetType="grid:FilteringDropDown">
        <Setter Property="Template" Value="{StaticResource DistinctFilterControlTemplate}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
    </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">
                                <telerik:RadGlyph FontSize="16" Foreground="{TemplateBinding Foreground}" Glyph="{StaticResource GlyphCancel}"/>
                            </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="Foreground" Value="{telerik1:FluentResource ResourceKey=ValidationBrush}"/>
        <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="4"/>
        <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">
        <Grid Background="Transparent" SnapsToDevicePixels="True">
            <Border
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                <Grid>
                    <StackPanel Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
                        <StackPanel x:Name="PART_DistinctFilter" Visibility="{TemplateBinding DistinctFiltersVisibility}">
                            <CheckBox x:Name="PART_SelectAllCheckBox"
                                    AutomationProperties.Name="select all checkbox"
                                    IsChecked="{Binding SelectAll, Mode=TwoWay}"
                                    Margin="0 0 0 5"
                                    telerik:LocalizationManager.ResourceKey="GridViewFilterSelectAll"/>
                            <ListBox x:Name="PART_DistinctValuesList"
                                    AutomationProperties.Name="distinct values list"
                                    Background="#01FFFFFF"
                                    ItemsSource="{Binding DistinctValues}"
                                    Padding="4"
                                    ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                    ItemContainerStyle="{StaticResource DistinctValueListBoxItemStyle}"
                                    SelectionMode="Multiple">
                                <ListBox.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <VirtualizingStackPanel MaxHeight="242"/>
                                    </ItemsPanelTemplate>
                                </ListBox.ItemsPanel>
                                <ListBox.ItemTemplate>
                                    <DataTemplate>
                                        <CheckBox IsChecked="{Binding IsActive, Mode=TwoWay}" Content="{Binding ConvertedValue, Converter={StaticResource DistinctValueConverter}}" VerticalAlignment="Center"/>
                                    </DataTemplate>
                                </ListBox.ItemTemplate>
                            </ListBox>
                        </StackPanel>
                        <StackPanel Visibility="{TemplateBinding FieldFiltersVisibility}">
                            <TextBlock Foreground="{telerik1:FluentResource ResourceKey=MarkerBrush}" Margin="0 6" telerik:LocalizationManager.ResourceKey="GridViewFilterShowRowsWithValueThat"/>
                            <input:RadComboBox x:Name="PART_Filter1ComboBox"
                                    AutomationProperties.Name="first filter combobox"
                                    MinHeight="28"
                                    ItemTemplate="{StaticResource ActionTemplate}"
                                    ItemsSource="{Binding AvailableActions}"
                                    SelectedItem="{Binding Filter1.Operator, Mode=TwoWay}"/>
                            <ContentControl x:Name="PART_Filter1ContentControl"
                                    DataContext="{Binding Filter1}"
                                    Margin="0 4 0 0"
                                    IsEnabled="{Binding Operator, Converter={StaticResource FilterOperatorToFilterEditorIsEnabledConverter}}"
                                    HorizontalContentAlignment="Stretch"
                                    VerticalContentAlignment="Stretch"/>
                            <input:RadComboBox x:Name="PART_LogicalOperatorsComboBox"
                                    AutomationProperties.Name="logical operators combobox"
                                    MinHeight="28"
                                    ItemTemplate="{StaticResource LogicalOperatorTemplate}"
                                    ItemsSource="{Binding LogicalOperators}"
                                    Margin="0 4 0 0"
                                    SelectedItem="{Binding FieldFilterLogicalOperator, Mode=TwoWay}"/>
                            <input:RadComboBox x:Name="PART_Filter2ComboBox"
                                    AutomationProperties.Name="second filter combobox"
                                    Margin="0 4 0 0"
                                    MinHeight="28"
                                    ItemTemplate="{StaticResource ActionTemplate}"
                                    ItemsSource="{Binding AvailableActions}"
                                    SelectedItem="{Binding Filter2.Operator, Mode=TwoWay}"/>
                            <ContentControl x:Name="PART_Filter2ContentControl"
                                    Margin="0 4 0 0"
                                    DataContext="{Binding Filter2}"
                                    IsEnabled="{Binding Operator, Converter={StaticResource FilterOperatorToFilterEditorIsEnabledConverter}}"
                                    HorizontalContentAlignment="Stretch"
                                    VerticalContentAlignment="Stretch"/>
                        </StackPanel>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <Button x:Name="PART_ApplyFilterButton"
                                    MinWidth="100"
                                    Visibility="{TemplateBinding FilterButtonVisibility}"
                                    Margin="0 5 0 0"
                                    telerik:LocalizationManager.ResourceKey="GridViewFilter"/>
                            <Button x:Name="PART_ClearFilterButton" Grid.Column="1" MinWidth="100" Margin="5 5 0 0" telerik:LocalizationManager.ResourceKey="GridViewClearFilter"/>
                        </Grid>
                    </StackPanel>
                    <telerik:RadButton x:Name="PART_FilterCloseButton"
                            Margin="{TemplateBinding Padding}"
                            MinHeight="0"
                            Padding="0"
                            Background="Transparent"
                            BorderBrush="Transparent"
                            BorderThickness="0"
                            Grid.Column="1"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Top"
                            Width="16"
                            Height="16">
                        <telerik:RadGlyph
                                Glyph="{StaticResource GlyphClose}"
                                FontSize="16"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"/>
                    </telerik:RadButton>
                </Grid>
            </Border>
        </Grid>
    </ControlTemplate>
    <Style x:Key="FilteringControlStyle" TargetType="grid:FilteringControl">
        <Setter Property="Template" Value="{StaticResource FilteringControlTemplate}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{Binding Source={StaticResource PrimaryBackgroundBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=128, Mode=OneWay}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="10 5 10 10"/>
        <Setter Property="MinWidth" Value="250"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FontWeight" Value="Normal"/>
    </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="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadDropDownButton">
                    <Grid>
                        <ContentPresenter x:Name="Content"
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                Content="{TemplateBinding Content}"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        <Popup x:Name="DropDownPopup" mat:ThemeEffectsHelper.IsAcrylic="True">
                            <Border x:Name="DropDownPopupBorder" Background="{telerik1:FluentResource ResourceKey=AlternativeBrush}">
                                <ContentPresenter x:Name="DropDownPopupContent"
                                        ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                                        Content="{TemplateBinding DropDownContent}"
                                        DataContext="{TemplateBinding DataContext}"
                                        HorizontalAlignment="Stretch"
                                        VerticalAlignment="Stretch"/>
                            </Border>
                        </Popup>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger SourceName="DropDownPopup" Property="mat:ThemeEffectsHelper.IsAcrylic" Value="True">
                            <Setter TargetName="DropDownPopupBorder" Property="Background" Value="{Binding Source={StaticResource AlternativeBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=128}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="FieldFilterControlTemplate" TargetType="grid:FieldFilterControl">
        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
            <Grid x:Name="PART_MainGrid">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <ContentControl x:Name="PART_FilterEditorContentControl" Margin="3 0" IsEnabled="{Binding EditorIsEnabled}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"/>
                <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                        AutomationProperties.Name="FieldFilter"
                        Grid.Column="1"
                        Style="{StaticResource FieldFilterDropDownButtonStyle}"
                        KeepOpen="False"
                        DropDownIndicatorVisibility="Collapsed">
                    <Border Cursor="Hand" Background="Transparent" Padding="2 0 5 0">
                        <Grid Width="12" Height="11" Margin="2">
                            <telerik:RadGlyph FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{TemplateBinding Foreground}" Glyph="{StaticResource GlyphFilterSmall}"/>
                            <telerik:RadGlyph
                                    FontSize="16"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Foreground="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"
                                    Visibility="{Binding FunnelFillVisibility}"
                                    Glyph="{StaticResource GlyphFilterSmall}"/>
                        </Grid>
                    </Border>
                    <telerik:RadDropDownButton.DropDownContent>
                        <ListBox x:Name="PART_FilterOperatorsListBox"
                                Background="#01FFFFFF"
                                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="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="BorderThickness" Value="0 0 1 1"/>
        <Setter Property="Padding" Value="0 1"/>
        <Setter Property="MinHeight" Value="31"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="telerik:TouchManager.TouchMode" Value="None"/>
    </Style>
    <Style TargetType="grid:FieldFilterControl" BasedOn="{StaticResource FieldFilterControlStyle}"/>
    <ControlTemplate x:Key="FrozenColumnsSplitterTemplate" TargetType="grid:FrozenColumnsSplitter">
        <Grid Background="Transparent">
            <Border Background="{TemplateBinding Background}" Width="5" HorizontalAlignment="Left"/>
            <Border BorderBrush="{TemplateBinding BorderBrush}" Opacity="0.6" BorderThickness="{TemplateBinding BorderThickness}" HorizontalAlignment="Left"/>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="FrozenColumnsSplitterTemplateRS" TargetType="grid:FrozenColumnsSplitterRightSide">
        <Grid Background="Transparent">
            <Border Background="{TemplateBinding Background}" Width="5" HorizontalAlignment="Left"/>
            <Border BorderBrush="{TemplateBinding BorderBrush}" Opacity="0.6" BorderThickness="{TemplateBinding BorderThickness}" HorizontalAlignment="Left"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="FrozenColumnsSplitterStyle" TargetType="grid:FrozenColumnsSplitter">
        <Setter Property="Template" Value="{StaticResource FrozenColumnsSplitterTemplate}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=AccentMouseOverBrush}"/>
        <Setter Property="BorderThickness" Value="4 0 0 0"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style x:Key="FrozenColumnsSplitterRightSideStyle" TargetType="grid:FrozenColumnsSplitterRightSide">
        <Setter Property="Template" Value="{StaticResource FrozenColumnsSplitterTemplateRS}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=AccentMouseOverBrush}"/>
        <Setter Property="BorderThickness" Value="4 0 0 0"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:FrozenColumnsSplitter" BasedOn="{StaticResource FrozenColumnsSplitterStyle}"/>
    <Style TargetType="grid:FrozenColumnsSplitterRightSide" BasedOn="{StaticResource FrozenColumnsSplitterRightSideStyle}"/>
    <ControlTemplate x:Key="GridViewAggregateResultCellTemplate" TargetType="grid:GridViewAggregateResultCell">
        <StackPanel
                Orientation="Horizontal"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                Margin="{TemplateBinding Padding}"
                Background="{TemplateBinding Background}">
            <TextBlock Margin="4 0 0 0" TextAlignment="Right" VerticalAlignment="Center" Text="{Binding Caption}"/>
            <TextBlock Margin="4 0 0 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="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
    </Style>
    <Style TargetType="grid:GridViewAggregateResultCell" BasedOn="{StaticResource GridViewAggregateResultCellStyle}"/>
    <Style x:Key="FocusVisualStyle">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle x:Name="FocusVisualRectangle" StrokeThickness="2" Stroke="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}" Margin="0 0 1 1"/>
                    <ControlTemplate.Triggers>
                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=grid:GridViewDataControl}, Path=GridLinesVisibility}" Value="Vertical">
                            <Setter TargetName="FocusVisualRectangle" Property="Margin" Value="0 0 1 0"/>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=grid:GridViewDataControl}, Path=GridLinesVisibility}" Value="Horizontal">
                            <Setter TargetName="FocusVisualRectangle" Property="Margin" Value="0 0 0 1"/>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=grid:GridViewDataControl}, Path=GridLinesVisibility}" Value="None">
                            <Setter TargetName="FocusVisualRectangle" Property="Margin" Value="0"/>
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="GridViewCellTemplate" TargetType="grid:GridViewCell">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="HighlightStates">
                    <VisualState x:Name="NotHighlighted"/>
                    <VisualState x:Name="Highlighted">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="PART_CellBorder" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <SolidColorBrush Color="#2B00BFE8"/>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="PART_CellBorder"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding VerticalGridLinesBrush}"
                    BorderThickness="{Binding VerticalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Right}"
                    Margin="0 0 0 1"/>
            <Border x:Name="Background_Over"
                    Background="{TemplateBinding MouseOverBackground}"
                    BorderBrush="{TemplateBinding VerticalGridLinesBrush}"
                    BorderThickness="{Binding VerticalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Right}"
                    Visibility="Collapsed"/>
            <Border x:Name="Background_Invalid_Unfocused" Visibility="Collapsed" Background="{telerik1:FluentResource ResourceKey=ValidationBrush}" Opacity="0.3"/>
            <Border x:Name="Background_Selected"
                    Background="{TemplateBinding SelectedBackground}"
                    BorderBrush="{TemplateBinding VerticalGridLinesBrush}"
                    BorderThickness="{Binding VerticalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Right}"
                    Margin="0 0 0 1"
                    Visibility="Collapsed"/>
            <Border x:Name="Background_Current"
                    BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                    Background="{x:Null}"
                    Opacity=".8"
                    BorderBrush="{TemplateBinding CurrentBorderBrush}"
                    Visibility="Collapsed"
                    Margin="0 0 1 1"/>
            <Border x:Name="Background_Invalid"
                    BorderBrush="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                    Background="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed">
                <ToolTipService.ToolTip>
                    <ToolTip x:Name="validationTooltip" Placement="Right" Content="{TemplateBinding Errors}" Template="{StaticResource GridViewValidationToolTipTemplate}"/>
                </ToolTipService.ToolTip>
                <Grid Background="Transparent" HorizontalAlignment="Right" Height="18" VerticalAlignment="Top" Width="18">
                    <Path
                            Data="{StaticResource ArrowTopRight8x8}"
                            Fill="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                            Width="8"
                            Height="8"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Top"
                            Margin="0 -1 -1 0"/>
                </Grid>
            </Border>
            <ContentControl x:Name="PART_ContentPresenter"
                    Margin="{TemplateBinding Padding}"
                    Content="{TemplateBinding Content}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    VerticalContentAlignment="Stretch"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    TextBlock.FontSize="{TemplateBinding FontSize}"
                    TextBlock.FontFamily="{TemplateBinding FontFamily}"
                    IsTabStop="{TemplateBinding IsTabStop}"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="PART_ContentPresenter" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="Background_Current" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger Property="IsInEditMode" Value="True">
                <Setter Property="Padding" Value="0"/>
                <Setter Property="VerticalContentAlignment" Value="Stretch"/>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                    <Condition Property="ParentRowValid" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="Background_Invalid_Unfocused" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="Background_Selected" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="Background_Over" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsCurrent" Value="True"/>
                    <Condition Property="IsInEditMode" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="Background_Current" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <Trigger Property="IsValid" Value="False">
                <Setter TargetName="Background_Invalid" Property="Visibility" Value="Visible"/>
            </Trigger>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=ParentRow.HorizontalGridLinesWidth}" Value="0">
                <Setter TargetName="PART_CellBorder" Property="Margin" Value="0"/>
                <Setter TargetName="Background_Selected" Property="Margin" Value="0"/>
                <Setter TargetName="Background_Current" Property="Margin" Value="0 0 1 0"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=ParentRow.VerticalGridLinesWidth}" Value="0">
                <Setter TargetName="Background_Current" Property="Margin" Value="0 0 0 1"/>
            </DataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=ParentRow.HorizontalGridLinesWidth}" Value="0"/>
                    <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=ParentRow.VerticalGridLinesWidth}" Value="0"/>
                </MultiDataTrigger.Conditions>
                <Setter TargetName="Background_Current" Property="Margin" Value="0"/>
            </MultiDataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="GridViewCellStyle" TargetType="grid:GridViewCell">
        <Setter Property="Template" Value="{StaticResource GridViewCellTemplate}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="SelectedBackground" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="CurrentBorderBrush" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
        <Setter Property="MouseOverBackground" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
        <Setter Property="Padding" Value="5 0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisualStyle}"/>
    </Style>
    <Style TargetType="grid:GridViewCell" BasedOn="{StaticResource GridViewCellStyle}"/>
    <ext:DynamicResourceProxy x:Key="MarkerBrushProxy" ProxyValue="{Binding Source={x:Static telerik:FluentPalette.Palette}, Path=MarkerColor}"/>
    <SolidColorBrush x:Key="MergedCellBackgroundOverlayBrush" Color="{Binding Source={StaticResource MarkerBrushProxy}, Path=ProxyValue}" Opacity="0.15"/>
    <Style x:Key="GridViewMergedCell_FocusVisualStyle">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}" BorderBrush="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="GridViewMergedCellTemplate" TargetType="grid:GridViewMergedCell">
        <Grid>
            <Border x:Name="PART_MergedCellBorder"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Margin="0 0 1 1"/>
            <Border x:Name="MergedCellBackgroundOverlay"
                    Background="{StaticResource MergedCellBackgroundOverlayBrush}"
                    BorderBrush="Transparent"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Margin="0 0 1 1"/>
            <Border x:Name="Background_Over"
                    Background="{telerik1:FluentResource ResourceKey=MouseOverBrush}"
                    Grid.Column="2"
                    Grid.ColumnSpan="2"
                    Visibility="Collapsed"
                    Margin="0 0 1 1"/>
            <Border x:Name="Background_Selected"
                    Grid.Column="2"
                    Grid.ColumnSpan="2"
                    Background="{telerik1:FluentResource ResourceKey=PressedBrush}"
                    Visibility="Collapsed"
                    Margin="0 0 1 1"/>
            <Border x:Name="Background_Edited"
                    Grid.Column="2"
                    Grid.ColumnSpan="2"
                    BorderThickness="1"
                    BorderBrush="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"
                    Background="Transparent"
                    IsHitTestVisible="False"
                    Visibility="Collapsed"/>
            <Border x:Name="Background_Current"
                    Grid.Column="2"
                    Grid.ColumnSpan="2"
                    BorderThickness="1"
                    BorderBrush="{telerik1:FluentResource ResourceKey=AccentBrush}"
                    IsHitTestVisible="False"
                    Visibility="Collapsed"/>
            <ContentPresenter x:Name="PART_ContentPresenter"
                    TextBlock.Foreground="{telerik1:FluentResource ResourceKey=MarkerBrush}"
                    Margin="{TemplateBinding Padding}"
                    Content="{TemplateBinding Content}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
        </Grid>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="Background_Selected" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="Background_Over" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <Trigger Property="IsInEditMode" Value="True">
                <Setter TargetName="PART_MergedCellBorder" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="MergedCellBackgroundOverlay" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="PART_ContentPresenter" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="Background_Over" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="Background_Selected" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="Background_Edited" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="PART_ContentPresenter" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger Property="IsCurrent" Value="True">
                <Setter TargetName="Background_Current" Property="Visibility" Value="Visible"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="GridViewMergedCellStyle" TargetType="grid:GridViewMergedCell">
        <Setter Property="Template" Value="{StaticResource GridViewMergedCellTemplate}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Padding" Value="5 0"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="AllowDrop" Value="True"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{StaticResource GridViewMergedCell_FocusVisualStyle}"/>
    </Style>
    <Style TargetType="grid:GridViewMergedCell" BasedOn="{StaticResource GridViewMergedCellStyle}"/>
    <ControlTemplate x:Key="GridViewColumnGroupRowTemplate" TargetType="grid:GridViewColumnGroupRow">
        <Border Background="{TemplateBinding Background}">
            <grid:SelectiveScrollingGrid>
                <grid:DataCellsPresenter x:Name="PART_ColumnGroupsDataCellsPresenter">
                    <grid:DataCellsPresenter.Template>
                        <ControlTemplate TargetType="grid:DataCellsPresenter">
                            <ItemsPresenter/>
                        </ControlTemplate>
                    </grid:DataCellsPresenter.Template>
                    <grid:DataCellsPresenter.ItemsPanel>
                        <ItemsPanelTemplate>
                            <grid:CommonColumnHeadersPanel/>
                        </ItemsPanelTemplate>
                    </grid:DataCellsPresenter.ItemsPanel>
                </grid:DataCellsPresenter>
            </grid:SelectiveScrollingGrid>
        </Border>
    </ControlTemplate>
    <Style x:Key="GridViewColumnGroupRowStyle" TargetType="grid:GridViewColumnGroupRow">
        <Setter Property="Template" Value="{StaticResource GridViewColumnGroupRowTemplate}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="MinHeight" Value="31"/>
    </Style>
    <Style TargetType="grid:GridViewColumnGroupRow" BasedOn="{StaticResource GridViewColumnGroupRowStyle}"/>
    <Style x:Key="ColumnHeaderGripperStyle" TargetType="Thumb">
        <Setter Property="Width" Value="6"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Cursor" Value="SizeWE"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Border
                            Padding="{TemplateBinding Padding}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="GridViewHeaderCellTemplate" TargetType="grid:GridViewHeaderCell">
        <Grid x:Name="PART_OuterGrid">
            <Grid.RowDefinitions>
                <RowDefinition Height="2*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid x:Name="PART_HeaderCellGrid">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="4"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="GridViewHeaderCell"
                        Grid.ColumnSpan="5"
                        MinHeight="{TemplateBinding MinHeight}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                    <Grid>
                        <Border x:Name="GridViewHeaderCell_Over" Background="{TemplateBinding mat:MaterialAssist.MouseOverBrush}" Visibility="Collapsed"/>
                        <Border x:Name="GridViewHeaderCell_Selected" Background="{TemplateBinding mat:MaterialAssist.CheckedBrush}" Visibility="Collapsed"/>
                    </Grid>
                </Border>
                <ContentControl x:Name="ContentPresenter"
                        Grid.Column="0"
                        Foreground="{TemplateBinding Foreground}"
                        Margin="{TemplateBinding Padding}"
                        IsTabStop="{TemplateBinding IsTabStop}"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
                <telerik:RadGlyph x:Name="PART_SortIndicator"
                        Grid.ColumnSpan="5"
                        Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                        FontSize="16"
                        Margin="0 -2 0 0"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Top"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphArrowChevronUp}"/>
                <ContentControl x:Name="ContentControl"
                        Grid.Column="2"
                        Foreground="{telerik1:FluentResource ResourceKey=MarkerBrush}"
                        VerticalAlignment="Center"
                        FontSize="{telerik1:FluentResource ResourceKey=FontSizeS}"
                        Content="{Binding SortingIndex, Converter={StaticResource SortingIndexConverter}, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding SortingIndex, Converter={StaticResource SortingIndexToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}"
                        IsTabStop="{TemplateBinding IsTabStop}"
                        Margin="0 0 2 4"/>
                <grid:FilteringDropDown Name="PART_DistinctFilterControl" Grid.Column="3" VerticalAlignment="Center" Visibility="{TemplateBinding FilteringUIVisibility}"/>
                <Thumb x:Name="PART_LeftHeaderGripper"
                        Grid.ColumnSpan="5"
                        HorizontalAlignment="Left"
                        IsTabStop="{TemplateBinding IsTabStop}"
                        Style="{StaticResource ColumnHeaderGripperStyle}"/>
                <Thumb x:Name="PART_RightHeaderGripper"
                        Grid.ColumnSpan="5"
                        HorizontalAlignment="Right"
                        IsTabStop="{TemplateBinding IsTabStop}"
                        Style="{StaticResource ColumnHeaderGripperStyle}"/>
            </Grid>
            <grid:FieldFilterControl x:Name="PART_FieldFilterControl" MinHeight="31" Visibility="{TemplateBinding FieldFilterControlVisibility}" Grid.Row="1"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="SortingState" Value="None">
                <Setter TargetName="PART_SortIndicator" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="PART_DistinctFilterControl" Property="Foreground" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="GridViewHeaderCell_Over" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="SortingState" Value="Ascending">
                <Setter TargetName="GridViewHeaderCell_Selected" Property="Visibility" Value="Visible"/>
                <Setter TargetName="PART_SortIndicator" Property="Visibility" Value="Visible"/>
                <Setter TargetName="PART_SortIndicator" Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"/>
                <Setter TargetName="ContentControl" Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"/>
                <Setter TargetName="ContentPresenter" Property="TextBlock.Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"/>
                <Setter TargetName="PART_DistinctFilterControl" Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"/>
            </Trigger>
            <Trigger Property="SortingState" Value="Descending">
                <Setter TargetName="PART_SortIndicator" Property="Visibility" Value="Visible"/>
                <Setter TargetName="PART_SortIndicator" Property="Glyph" Value="{StaticResource GlyphArrowChevronDown}"/>
                <Setter TargetName="PART_SortIndicator" Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"/>
                <Setter TargetName="PART_DistinctFilterControl" Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"/>
                <Setter TargetName="ContentControl" Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"/>
                <Setter TargetName="GridViewHeaderCell_Selected" Property="Visibility" Value="Visible"/>
                <Setter TargetName="ContentPresenter" Property="TextBlock.Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="GridViewHeaderCellStyle" TargetType="grid:GridViewHeaderCell">
        <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
        <Setter Property="mat:MaterialAssist.CheckedBrush" Value="{telerik1:FluentResource ResourceKey=AccentBrush}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Template" Value="{StaticResource GridViewHeaderCellTemplate}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="BorderThickness" Value="0 0 0 1"/>
        <Setter Property="MinHeight" Value="31"/>
        <Setter Property="Padding" Value="5 3"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="FontWeight" Value="SemiBold"/>
        <Setter Property="DropIndicatorBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="DropIndicatorThickness" Value="4"/>
        <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}"
                    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="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSizeXL}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Padding" Value="5 0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <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}"
                    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="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSizeXL}"/>
        <Setter Property="Padding" Value="5 0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>

        <!-- Stretch so that the FooterTextAlignment property to be respected -->
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewGroupFooterCell" BasedOn="{StaticResource GridViewGroupFooterCellStyle}"/>
    <Style x:Key="GridViewIndentCellStyle" TargetType="grid:GridViewIndentCell">
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="BorderThickness" Value="0 0 1 0"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="grid:GridViewIndentCell">
                    <Border
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Width="31"
                            Background="{TemplateBinding Background}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}"
                            BorderThickness="{TemplateBinding BorderThickness}"/>
                </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
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Background="{TemplateBinding Background}"
                            Padding="{TemplateBinding Padding}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            BorderThickness="{TemplateBinding BorderThickness}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Width" Value="31"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="BorderThickness" Value="0 1 1 1"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    </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
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Width" Value="31"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="BorderThickness" Value="0 0 1 1"/>
        <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="31"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}"
                            Background="{TemplateBinding Background}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderThickness" Value="0 0 1 1"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewHeaderIndentCell" BasedOn="{StaticResource GridViewHeaderIndentCellStyle}"/>
    <sys:Double x:Key="IndentWidth">31</sys:Double>
    <Style x:Key="RowGripperStyle" TargetType="Thumb">
        <Setter Property="Height" Value="4"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="VerticalAlignment" Value="Bottom"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Cursor" Value="SizeNS"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Border
                            Padding="{TemplateBinding Padding}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="GridViewRowTemplate" TargetType="grid:GridViewRow">
        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="SelectionStates">
                    <VisualState x:Name="Unselected"/>
                    <VisualState x:Name="SelectedUnfocused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Selected_Unfocused" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Selected" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Selected">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Selected" 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/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Border x:Name="Background_Main"
                        Grid.Column="2"
                        Grid.ColumnSpan="2"
                        Background="{TemplateBinding Background}"
                        Margin="{TemplateBinding Margin}"
                        Padding="{TemplateBinding Padding}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        BorderThickness="{Binding HorizontalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Bottom}"
                        BorderBrush="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
                <grid:DetailsPresenter x:Name="PART_DetailsPresenter"
                        Grid.Column="2"
                        Grid.ColumnSpan="2"
                        Grid.Row="1"
                        BorderThickness="0"
                        DetailsProvider="{TemplateBinding DetailsProvider}"
                        Margin="0 -1 0 0"/>
                <ContentPresenter x:Name="PART_HierarchyChildPresenter"
                        Grid.Column="2"
                        Grid.ColumnSpan="2"
                        Grid.Row="2"
                        grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                        Margin="0 -1 0 0"
                        Visibility="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"/>
                <Border x:Name="Background_Invalid"
                        Grid.Column="1"
                        Grid.ColumnSpan="4"
                        Background="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                        Opacity="0.3"
                        Visibility="Collapsed"/>
                <Border
                        Grid.RowSpan="3"
                        Width="{StaticResource IndentWidth}"
                        Background="{TemplateBinding Background}"
                        Visibility="{TemplateBinding RowIndicatorVisibility}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
                <Border x:Name="PART_RowBorder"
                        Grid.ColumnSpan="4"
                        Grid.RowSpan="3"
                        BorderBrush="{TemplateBinding HorizontalGridLinesBrush}"
                        BorderThickness="{Binding HorizontalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Bottom}"/>
                <Border x:Name="Background_Over" Grid.ColumnSpan="4" Background="{TemplateBinding MouseOverBackground}" Visibility="Collapsed" Margin="0 0 0 1"/>
                <Border x:Name="Background_Selected_Unfocused" Grid.ColumnSpan="4" Background="{TemplateBinding MouseOverBackground}" Opacity="0.7" Visibility="Collapsed" Margin="0 0 0 1"/>
                <Border x:Name="Background_Selected" Grid.ColumnSpan="4" Background="{TemplateBinding SelectedBackground}" Visibility="Collapsed" Margin="0 0 0 1"/>
                <Border x:Name="PART_IndicatorPresenter"
                        Grid.RowSpan="3"
                        Width="{StaticResource IndentWidth}"
                        VerticalAlignment="Stretch"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="0 0 1 1"
                        Background="Transparent"
                        Visibility="{TemplateBinding RowIndicatorVisibility}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical">
                    <Grid>
                        <Grid x:Name="GridIndicatorPresenter">
                            <Grid x:Name="NavigatorIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed">
                                <telerik:RadGlyph x:Name="IconRight"
                                        Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                                        FontSize="16"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Glyph="{StaticResource GlyphArrowChevronRight}"/>
                            </Grid>
                            <Grid x:Name="EditIndicator" Width="16" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed">
                                <telerik:RadGlyph
                                        Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                                        FontSize="16"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Glyph="{StaticResource GlyphComment}"/>
                            </Grid>
                            <Grid x:Name="InvalidEditableIndicator" Visibility="Collapsed" Background="Transparent">
                                <telerik:RadGlyph
                                        Foreground="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                                        FontSize="16"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Glyph="{StaticResource GlyphComment}"/>
                                <ToolTipService.ToolTip>
                                    <ToolTip Placement="Bottom" Content="{TemplateBinding Errors}" Template="{StaticResource GridViewValidationToolTipTemplate}"/>
                                </ToolTipService.ToolTip>
                            </Grid>
                            <Grid x:Name="ErrorIndicator" HorizontalAlignment="Center" Width="16" Height="16" VerticalAlignment="Center" Visibility="Collapsed">
                                <telerik:RadGlyph
                                        Foreground="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                                        FontSize="16"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Glyph="{StaticResource GlyphWarning}"/>
                                <ToolTipService.ToolTip>
                                    <ToolTip Placement="Bottom" Content="{TemplateBinding Errors}" Template="{StaticResource GridViewValidationToolTipTemplate}"/>
                                </ToolTipService.ToolTip>
                            </Grid>
                            <Thumb x:Name="PART_RowResizer" Style="{StaticResource RowGripperStyle}"/>
                        </Grid>
                        <grid:GridViewPinButton x:Name="PinnedRowPresenter" IsPinned="{Binding IsPinned, RelativeSource={RelativeSource TemplatedParent}}" Visibility="Collapsed"/>
                    </Grid>
                </Border>
                <grid:DataCellsPresenter x:Name="PART_DataCellsPresenter" Grid.Column="3"/>
                <controls:GridViewToggleButton x:Name="PART_HierarchyExpandButton"
                        Grid.Column="2"
                        Width="{StaticResource IndentWidth}"
                        IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                        Opacity="{Binding IsExpandable, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToOpacityConverter}}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                        IsHitTestVisible="{TemplateBinding IsExpandable}"
                        Visibility="{Binding HasHierarchy, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                        IsTabStop="{TemplateBinding IsTabStop}"/>
                <grid:IndentPresenter x:Name="PART_IndentPresenter"
                        Margin="0 0 0 1"
                        Grid.Column="1"
                        Grid.RowSpan="4"
                        IndentLevel="{TemplateBinding IndentLevel}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            </grid:SelectiveScrollingGrid>
        </Border>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                    <Condition Property="IsValid" Value="True"/>
                    <Condition Property="IsSelected" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="Background_Over" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsValid" Value="False"/>
                    <Condition Property="IsInEditMode" Value="False"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="Background_Invalid" Property="Visibility" Value="Visible"/>
                <Setter TargetName="ErrorIndicator" Property="Visibility" Value="Visible"/>
                <Setter TargetName="Background_Selected_Unfocused" Property="Background" Value="{x:Null}"/>
                <Setter TargetName="Background_Selected" Property="Background" Value="{x:Null}"/>
                <Setter TargetName="Background_Main" Property="Visibility" Value="Collapsed"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsValid" Value="False"/>
                    <Condition Property="IsInEditMode" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="Background_Invalid" Property="Visibility" Value="Visible"/>
                <Setter TargetName="InvalidEditableIndicator" Property="Visibility" Value="Visible"/>
                <Setter TargetName="Background_Selected_Unfocused" Property="Background" Value="{x:Null}"/>
                <Setter TargetName="Background_Selected" Property="Background" Value="{x:Null}"/>
                <Setter TargetName="Background_Main" Property="Visibility" Value="Collapsed"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsValid" Value="True"/>
                    <Condition Property="IsInEditMode" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="EditIndicator" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsValid" Value="True"/>
                    <Condition Property="IsCurrent" Value="True"/>
                    <Condition Property="IsInEditMode" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="NavigatorIndicator" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsEnabled, ElementName=PinnedRowPresenter}" Value="True"/>
                    <Condition Binding="{Binding IsMouseOver, ElementName=PART_IndicatorPresenter}" Value="True"/>
                </MultiDataTrigger.Conditions>
                <Setter TargetName="GridIndicatorPresenter" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="PinnedRowPresenter" Property="Visibility" Value="Visible"/>
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsPinned, RelativeSource={RelativeSource Self}}" Value="True"/>
                    <Condition Binding="{Binding IsEnabled, ElementName=PinnedRowPresenter}" Value="True"/>
                </MultiDataTrigger.Conditions>
                <Setter TargetName="GridIndicatorPresenter" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="PinnedRowPresenter" Property="Visibility" Value="Visible"/>
            </MultiDataTrigger>
            <Trigger Property="HorizontalGridLinesWidth" Value="0">
                <Setter TargetName="PART_DetailsPresenter" Property="Margin" Value="0"/>
                <Setter TargetName="PART_HierarchyChildPresenter" Property="Margin" Value="0"/>
                <Setter TargetName="PART_IndentPresenter" Property="Margin" Value="0"/>
                <Setter TargetName="Background_Over" Property="Margin" Value="0"/>
                <Setter TargetName="Background_Selected_Unfocused" Property="Margin" Value="0"/>
                <Setter TargetName="Background_Selected" Property="Margin" Value="0"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="GridViewRowStyle" TargetType="grid:GridViewRow">
        <Setter Property="Template" Value="{StaticResource GridViewRowTemplate}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="SelectedBackground" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="MouseOverBackground" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="AllowDrop" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewRow" BasedOn="{StaticResource GridViewRowStyle}"/>
    <ControlTemplate x:Key="GridViewNewRow_ValidationToolTipTemplate" TargetType="ToolTip">
        <Grid x:Name="Root" Margin="2 0" Opacity="0" Background="Transparent" RenderTransformOrigin="0 0">
            <Grid.RenderTransform>
                <TranslateTransform x:Name="xform" X="-25"/>
            </Grid.RenderTransform>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Border MinHeight="28" Grid.Column="1" Background="{telerik1:FluentResource ResourceKey=ValidationBrush}">
                <ItemsControl ItemsSource="{TemplateBinding Content}">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <TextBlock
                                    MinHeight="28"
                                    Margin="5"
                                    MaxWidth="250"
                                    FontSize="{telerik1:FluentResource ResourceKey=FontSize}"
                                    FontFamily="{telerik1:FluentResource ResourceKey=FontFamily}"
                                    Foreground="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"
                                    VerticalAlignment="Center"
                                    Text="{Binding}"
                                    TextWrapping="Wrap"/>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                    <ItemsControl.ItemsPanel>
                        <ItemsPanelTemplate>
                            <StackPanel/>
                        </ItemsPanelTemplate>
                    </ItemsControl.ItemsPanel>
                </ItemsControl>
            </Border>
        </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>
            <Border x:Name="SelectionBackground"
                    Grid.Column="2"
                    Grid.ColumnSpan="2"
                    grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
            <Border
                    Grid.Column="2"
                    Width="31"
                    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.Column="2"
                    Grid.ColumnSpan="2"
                    Margin="0"
                    Background="{TemplateBinding Background}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingClip="True">
                <TextBlock
                        Foreground="{telerik1:FluentResource ResourceKey=AccentBrush}"
                        FontWeight="SemiBold"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        FontSize="{TemplateBinding FontSize}"
                        FontFamily="{TemplateBinding FontFamily}"
                        Margin="{TemplateBinding Padding}"
                        telerik:LocalizationManager.ResourceKey="GridViewAlwaysVisibleNewRow"/>
            </Border>
            <Border
                    Grid.RowSpan="3"
                    Width="31"
                    Background="{TemplateBinding Background}"
                    Visibility="{TemplateBinding RowIndicatorVisibility}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            <Border x:Name="PART_RowBorder"
                    Grid.Column="1"
                    Grid.RowSpan="4"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="0 0 0 1"
                    Grid.ColumnSpan="4"
                    VerticalAlignment="Bottom"
                    grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"/>
            <grid:DetailsPresenter x:Name="PART_DetailsPresenter" Grid.Column="3" Grid.Row="1" DetailsProvider="{TemplateBinding DetailsProvider}"/>
            <Border x:Name="ValidationLayer" Grid.ColumnSpan="4" Background="{TemplateBinding Background}" Visibility="Collapsed"/>
            <Border x:Name="PART_IndicatorPresenter"
                    Grid.RowSpan="2"
                    Width="31"
                    Background="Transparent"
                    BorderThickness="0 0 1 1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    VerticalAlignment="Stretch"
                    Visibility="{TemplateBinding RowIndicatorVisibility}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical">
                <Grid>
                    <Grid x:Name="NewRowIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16">
                        <telerik:RadGlyph Foreground="{TemplateBinding Foreground}" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphTableLightDialog}"/>
                    </Grid>
                    <Grid x:Name="EditIndicator" HorizontalAlignment="Center" Width="16" VerticalAlignment="Center" Visibility="Collapsed">
                        <telerik:RadGlyph
                                Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                                FontSize="16"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Glyph="{StaticResource GlyphComment}"/>
                    </Grid>
                    <Grid x:Name="InvalidEditableIndicator" Visibility="Collapsed" Background="Transparent">
                        <Grid HorizontalAlignment="Center" Width="16" Height="16" VerticalAlignment="Center">
                            <telerik:RadGlyph FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphComment}"/>
                        </Grid>
                        <ToolTipService.ToolTip>
                            <ToolTip Placement="Bottom" Content="{TemplateBinding Errors}" Template="{StaticResource GridViewNewRow_ValidationToolTipTemplate}"/>
                        </ToolTipService.ToolTip>
                    </Grid>
                    <Grid x:Name="ErrorIndicator" HorizontalAlignment="Center" Width="16" Height="16" VerticalAlignment="Center" Visibility="Collapsed">
                        <telerik:RadGlyph
                                Foreground="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                                FontSize="16"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Glyph="{StaticResource GlyphWarning}"/>
                        <ToolTipService.ToolTip>
                            <ToolTip x:Name="validationTooltip" Template="{StaticResource GridViewNewRow_ValidationToolTipTemplate}" Placement="Bottom" Content="{TemplateBinding Errors}"/>
                        </ToolTipService.ToolTip>
                    </Grid>
                </Grid>
            </Border>
            <Rectangle x:Name="Background_Invalid"
                    Grid.ColumnSpan="4"
                    Stroke="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                    StrokeThickness="1"
                    Visibility="Collapsed"
                    grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"/>
            <grid:DataCellsPresenter Grid.Column="3" Visibility="Collapsed" x:Name="PART_DataCellsPresenter"/>
            <grid:IndentPresenter x:Name="PART_IndentPresenter"
                    Grid.Column="1"
                    Grid.RowSpan="2"
                    IndentLevel="{TemplateBinding IndentLevel}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
        </grid:SelectiveScrollingGrid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsInEditMode" Value="True">
                <Setter TargetName="NewRowIndicator" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="EditIndicator" Property="Visibility" Value="Visible"/>
                <Setter TargetName="PART_DataCellsPresenter" Property="Visibility" Value="Visible"/>
                <Setter TargetName="PART_AlwaysVisibleNewRow" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="PART_RowBorder" Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
            </Trigger>
            <Trigger Property="IsValid" Value="False">
                <Setter TargetName="Background_Invalid" Property="Visibility" Value="Visible"/>
                <Setter TargetName="NewRowIndicator" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="EditIndicator" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="ErrorIndicator" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="IsInEditMode" Value="False">
                <Setter TargetName="PART_AlwaysVisibleNewRow" Property="Visibility" Value="Visible"/>
                <Setter TargetName="PART_DataCellsPresenter" Property="Visibility" Value="Collapsed"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="GridViewNewRowStyle" TargetType="grid:GridViewNewRow">
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Template" Value="{StaticResource GridViewNewRowTemplate}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="0 1 0 0"/>
        <Setter Property="MinHeight" Value="31"/>
        <Setter Property="Padding" Value="5 0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewNewRow" BasedOn="{StaticResource GridViewNewRowStyle}"/>
    <ControlTemplate x:Key="GridViewGroupHeaderCellTemplate" TargetType="grid:GridViewGroupHeaderCell">
        <Border x:Name="PART_CellBorder"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter
                    Margin="{TemplateBinding Padding}"
                    Content="{TemplateBinding Content}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
        </Border>
    </ControlTemplate>
    <Style x:Key="GridViewGroupHeaderCellStyle" TargetType="grid:GridViewGroupHeaderCell">
        <Setter Property="Template" Value="{StaticResource GridViewGroupHeaderCellTemplate}"/>
        <Setter Property="Padding" Value="0 0 1 0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Right"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewGroupHeaderCell" BasedOn="{StaticResource GridViewGroupHeaderCellStyle}"/>
    <DataTemplate x:Key="GroupHeaderTemplate">
        <ContentControl Content="{Binding Header}" Foreground="{telerik1:FluentResource ResourceKey=MarkerBrush}" FontWeight="SemiBold"/>
    </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="10 0 0 0"/>
    </Style>
    <ControlTemplate x:Key="GridViewGroupRowTemplate" TargetType="grid:GridViewGroupRow">
        <Grid x:Name="PART_GroupExpanderGrid">
            <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>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Collapsed"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition MinHeight="{TemplateBinding MinHeight}"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border x:Name="ToggleButtonBorder"
                    Grid.Column="2"
                    Grid.ColumnSpan="2"
                    MinHeight="{TemplateBinding MinHeight}"
                    Background="{TemplateBinding Background}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingClip="True">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="31"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Border
                            Grid.Column="2"
                            grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                            Visibility="{Binding ShowHeaderAggregates, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                        <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="{telerik1:FluentResource ResourceKey=BasicBrush}"
                            BorderThickness="0 0 0 1"
                            Background="Transparent"
                            HorizontalAlignment="Stretch"
                            grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical">
                        <telerik:RadGlyph x:Name="ExpanderButton"
                                Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                                FontSize="16"
                                HorizontalAlignment="Center"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Glyph="{StaticResource GlyphArrow60Up}"
                                RenderTransformOrigin="0.5,0.5">
                            <telerik:RadGlyph.RenderTransform>
                                <RotateTransform Angle="180"/>
                            </telerik:RadGlyph.RenderTransform>
                        </telerik:RadGlyph>
                    </Border>
                    <ToggleButton x:Name="HeaderButton"
                            Grid.Column="0"
                            Grid.ColumnSpan="3"
                            AutomationProperties.Name="group row"
                            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"
                            AutomationProperties.Name="group row header"
                            grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                            Background="Transparent"
                            Style="{StaticResource GridViewGroupToggleButtonStyle}"
                            BorderBrush="{x:Null}"
                            Foreground="{TemplateBinding Foreground}"
                            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}"
                                TextBlock.FontSize="{TemplateBinding FontSize}"
                                TextBlock.FontFamily="{TemplateBinding FontFamily}"/>
                    </ToggleButton>
                    <Border
                            grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                            Grid.Column="1"
                            Grid.ColumnSpan="2"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Margin="-1 0 0 0"
                            BorderThickness="0 0 0 1"/>
                </Grid>
            </Border>
            <Border x:Name="PART_IndicatorPresenter"
                    Width="31"
                    Background="Transparent"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="0 0 1 1"
                    VerticalAlignment="Stretch"
                    Visibility="{TemplateBinding RowIndicatorVisibility}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            <grid:IndentPresenter
                    Grid.Column="1"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                    IndentLevel="{TemplateBinding Level}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="0 0 0 1"/>
            <Border Grid.Column="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0" Margin="0 -1 0 0" VerticalAlignment="Top"/>
            <Border x:Name="Content" Grid.Row="1" Grid.ColumnSpan="3" 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="{TemplateBinding BorderBrush}"
                    VerticalAlignment="Bottom"
                    Visibility="Collapsed"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsExpanded" Value="True">
                <Setter TargetName="BottomBorder" Property="Visibility" Value="Visible"/>
                <Setter TargetName="IconOuterBorder" Property="BorderThickness" Value="0"/>
                <Trigger.EnterActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)">
                                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)">
                                <EasingDoubleKeyFrame KeyTime="0" Value="180"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.ExitActions>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="GridViewGroupRowStyle" TargetType="grid:GridViewGroupRow">
        <Setter Property="Template" Value="{StaticResource GridViewGroupRowTemplate}"/>
        <Setter Property="GroupHeaderTemplate" Value="{StaticResource GroupHeaderTemplate}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="AllowDrop" Value="True"/>
        <Setter Property="MinHeight" Value="31"/>
        <Setter Property="Padding" Value="10 0 0 0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="ClipToBounds" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewGroupRow" BasedOn="{StaticResource GridViewGroupRowStyle}"/>
    <DataTemplate x:Key="GroupHeaderRowHeaderTemplate">
        <ContentControl Content="{Binding Header}" FontWeight="SemiBold"/>
    </DataTemplate>
    <ControlTemplate x:Key="GroupHeaderRowToggleButtonTemplate" TargetType="ToggleButton">
        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentPresenter Margin="{TemplateBinding Padding}"/>
        </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="0 6 10 7"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="BorderThickness" Value="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 MinHeight="{TemplateBinding MinHeight}"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border x:Name="ToggleButtonBorder"
                    Grid.Column="2"
                    Grid.ColumnSpan="2"
                    MinHeight="{TemplateBinding MinHeight}"
                    Background="{TemplateBinding Background}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingClip="True">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="29"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border
                            Grid.Column="2"
                            grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                            Visibility="{Binding ShowHeaderAggregates, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                        <grid:AggregateResultsList x:Name="PART_AggregateResults"
                                ItemsSource="{Binding GroupAggregateResults, RelativeSource={RelativeSource TemplatedParent}}"
                                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>
                    <Grid x:Name="PART_DataCellsPresenterGrid"
                            Grid.Column="1"
                            grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                            Grid.ColumnSpan="2"
                            Visibility="Collapsed"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            IsHitTestVisible="False">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <grid:IndentPresenter Grid.Column="0" IndentLevel="{TemplateBinding IndentLevel}" Background="{x:Null}" BorderBrush="{x:Null}" Visibility="Hidden"/>
                        <grid:DataCellsPresenter x:Name="PART_DataCellsPresenter" Grid.Column="1">
                            <grid:DataCellsPresenter.Template>
                                <ControlTemplate>
                                    <Grid>
                                        <ItemsPresenter/>
                                    </Grid>
                                </ControlTemplate>
                            </grid:DataCellsPresenter.Template>
                        </grid:DataCellsPresenter>
                    </Grid>
                    <Border x:Name="IconOuterBorder"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="0 0 0 1"
                            Grid.RowSpan="2"
                            Background="Transparent"
                            HorizontalAlignment="Stretch"
                            grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <telerik:RadGlyph x:Name="ExpanderButton"
                                    Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                                    FontSize="16"
                                    Glyph="{StaticResource GlyphArrowChevronUp}"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    RenderTransformOrigin="0.5,0.5">
                                <telerik:RadGlyph.RenderTransform>
                                    <RotateTransform Angle="180"/>
                                </telerik:RadGlyph.RenderTransform>
                            </telerik:RadGlyph>
                        </Grid>
                    </Border>
                    <ToggleButton x:Name="HeaderButton"
                            Grid.Column="0"
                            Grid.ColumnSpan="3"
                            Grid.RowSpan="2"
                            AutomationProperties.Name="group row"
                            Background="{TemplateBinding Background}"
                            grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                            IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                            Opacity="0"
                            IsTabStop="{TemplateBinding IsTabStop}"/>
                    <ToggleButton
                            Grid.Column="1"
                            grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                            Background="{TemplateBinding Background}"
                            AutomationProperties.Name="group row header"
                            Style="{StaticResource GroupHeaderRowToggleButtonStyle}"
                            Foreground="{TemplateBinding Foreground}"
                            IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                            IsTabStop="{TemplateBinding IsTabStop}">
                        <ContentPresenter
                                Grid.Column="1"
                                Content="{TemplateBinding GroupViewModel}"
                                VerticalAlignment="Center"
                                ContentTemplate="{TemplateBinding GroupHeaderTemplate}"
                                TextBlock.FontSize="{TemplateBinding FontSize}"
                                TextBlock.FontFamily="{TemplateBinding FontFamily}"/>
                    </ToggleButton>
                    <Border
                            grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                            Grid.Column="1"
                            Grid.ColumnSpan="2"
                            Grid.RowSpan="2"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Margin="1 0 0 0"
                            BorderThickness="0 0 0 1"/>
                </Grid>
            </Border>
            <Border x:Name="PART_IndicatorPresenter"
                    Width="31"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="0 0 1 1"
                    VerticalAlignment="Stretch"
                    Visibility="{TemplateBinding RowIndicatorVisibility}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            <grid:IndentPresenter
                    Grid.Column="1"
                    Background="{TemplateBinding Background}"
                    IndentLevel="{TemplateBinding Level}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            <Border Grid.Column="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0" Margin="0 -1 0 0" VerticalAlignment="Top"/>
            <grid:GridViewGroupFooterRow x:Name="FooterRowForHeaderAggregates"
                    Grid.Row="1"
                    Grid.ColumnSpan="3"
                    Visibility="{Binding ShowGroupHeaderColumnAggregates, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsExpanded" Value="True">
                <Setter TargetName="IconOuterBorder" Property="BorderThickness" Value="0"/>
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=AccentBrush}"/>
                <Setter Property="Foreground" TargetName="ExpanderButton" Value="{telerik1:FluentResource ResourceKey=AccentBrush}"/>
                <Trigger.EnterActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)">
                                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)">
                                <EasingDoubleKeyFrame KeyTime="0" Value="180"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.ExitActions>
            </Trigger>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type controls:RadGridView}}, Path=ColumnAggregatesAlignment, Mode=OneWay}" Value="NextToGroupKey">
                <Setter TargetName="PART_DataCellsPresenterGrid" Property="Visibility" Value="Visible"/>
                <Setter TargetName="PART_AggregateResults" Property="Visibility" Value="Collapsed"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type controls:RadGridView}}, Path=ColumnAggregatesAlignment, Mode=OneWay}" Value="BelowGroupKey">
                <Setter TargetName="PART_DataCellsPresenterGrid" Property="Visibility" Value="Visible"/>
                <Setter TargetName="PART_DataCellsPresenterGrid" Property="Grid.Row" Value="1"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding AggregateResults.Count, RelativeSource={RelativeSource Self}}" Value="0">
                <Setter TargetName="PART_DataCellsPresenterGrid" Property="Visibility" Value="Collapsed"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding ShowHeaderAggregates, RelativeSource={RelativeSource Self}}" Value="False">
                <Setter TargetName="PART_DataCellsPresenterGrid" Property="Visibility" Value="Collapsed"/>
            </DataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="GroupHeaderRowStyle" TargetType="grid:GroupHeaderRow">
        <Setter Property="Template" Value="{StaticResource GroupHeaderRowTemplate}"/>
        <Setter Property="GroupHeaderTemplate" Value="{StaticResource GroupHeaderRowHeaderTemplate}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="Padding" Value="5 0 0 0"/>
        <Setter Property="AllowDrop" Value="True"/>
        <Setter Property="MinHeight" Value="31"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="ClipToBounds" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GroupHeaderRow" BasedOn="{StaticResource GroupHeaderRowStyle}"/>
    <sys:Double x:Key="GridViewHeaderRowIndentWidth">31</sys:Double>
    <DataTemplate x:Key="GridViewHeaderIndentCellDataTemplate">
        <grid:GridViewHeaderIndentCell/>
    </DataTemplate>
    <ControlTemplate x:Key="GridViewHeaderRowTemplate" TargetType="grid:GridViewHeaderRow">
        <grid:SelectiveScrollingGrid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Border x:Name="PART_GridViewHeaderRowBorder"
                    Grid.ColumnSpan="4"
                    Grid.RowSpan="2"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Padding="{TemplateBinding Padding}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <Border x:Name="CommonHeaderIndent"
                    Grid.ColumnSpan="2"
                    BorderThickness="0 0 1 0"
                    Margin="-1 0 0 0"
                    Visibility="{Binding Visibility, ElementName=PART_CommonHeaderPresenter}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"/>
            <grid:CommonHeaderPresenter x:Name="PART_CommonHeaderPresenter" Grid.Column="3"/>
            <Border x:Name="PART_IndicatorPresenter"
                    Grid.RowSpan="2"
                    Width="{StaticResource GridViewHeaderRowIndentWidth}"
                    BorderThickness="0 0 1 1"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Visibility="{TemplateBinding RowIndicatorVisibility}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            <grid:IndentPresenter x:Name="PART_IndentPresenter"
                    Grid.RowSpan="2"
                    Grid.Column="1"
                    IndentLevel="{TemplateBinding IndentLevel}"
                    ItemTemplate="{StaticResource GridViewHeaderIndentCellDataTemplate}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            <Border x:Name="PART_HierarchyIndentPresenter"
                    Grid.RowSpan="2"
                    Grid.Column="2"
                    Width="{StaticResource GridViewHeaderRowIndentWidth}"
                    BorderThickness="0 0 1 1"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Visibility="{Binding HasHierarchy, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            <grid:DataCellsPresenter x:Name="PART_DataCellsPresenter" Grid.Row="1" Grid.Column="3" MinHeight="{TemplateBinding MinHeight}"/>
        </grid:SelectiveScrollingGrid>
    </ControlTemplate>
    <Style x:Key="GridViewHeaderRowStyle" TargetType="grid:GridViewHeaderRow">
        <Setter Property="Template" Value="{StaticResource GridViewHeaderRowTemplate}"/>
        <Setter Property="MinHeight" Value="31"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="BorderThickness" Value="0 0 0 1"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    </Style>
    <Style TargetType="grid:GridViewHeaderRow" BasedOn="{StaticResource GridViewHeaderRowStyle}"/>
    <sys:Double x:Key="FooterRowIndentWidth">31</sys:Double>
    <DataTemplate x:Key="GridViewFooterIndentCellDataTemplate">
        <grid:GridViewFooterIndentCell/>
    </DataTemplate>
    <ControlTemplate x:Key="GridViewFooterRowTemplate" TargetType="grid:GridViewFooterRow">
        <grid:SelectiveScrollingGrid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="PART_FooterRowBorder"
                    Grid.Column="3"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    Padding="{TemplateBinding Padding}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
            <Border x:Name="PART_HierarchyIndent"
                    Grid.Column="2"
                    Width="{StaticResource FooterRowIndentWidth}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="0 1"
                    Visibility="{Binding HasHierarchy, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            <Border
                    Width="{StaticResource FooterRowIndentWidth}"
                    Background="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"
                    VerticalAlignment="Stretch"
                    Visibility="{TemplateBinding RowIndicatorVisibility}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            <Border x:Name="PART_IndicatorPresenter"
                    Width="{StaticResource FooterRowIndentWidth}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="0 1 1 1"
                    VerticalAlignment="Stretch"
                    Visibility="{TemplateBinding RowIndicatorVisibility}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            <grid:IndentPresenter x:Name="PART_IndentPresenter"
                    IndentLevel="{TemplateBinding IndentLevel}"
                    ItemTemplate="{StaticResource GridViewFooterIndentCellDataTemplate}"
                    Grid.Column="1"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            <grid:DataCellsPresenter x:Name="PART_DataCellsPresenter" Grid.Column="3"/>
        </grid:SelectiveScrollingGrid>
    </ControlTemplate>
    <Style x:Key="GridViewFooterRowStyle" TargetType="grid:GridViewFooterRow">
        <Setter Property="Template" Value="{StaticResource GridViewFooterRowTemplate}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="BorderThickness" Value="0 1 1 1"/>
        <Setter Property="MinHeight" Value="31"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="FontWeight" Value="SemiBold"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewFooterRow" BasedOn="{StaticResource GridViewFooterRowStyle}"/>
    <sys:Double x:Key="GroupIndentWidth">31</sys:Double>
    <DataTemplate x:Key="GridViewGroupFooterIndentCellDataTemplate">
        <grid:GridViewGroupFooterIndentCell/>
    </DataTemplate>
    <ControlTemplate x:Key="GridViewGroupFooterRowTemplate" TargetType="grid:GridViewGroupFooterRow">
        <grid:SelectiveScrollingGrid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="PART_FooterRowBorder"
                    Grid.Column="3"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    Padding="{TemplateBinding Padding}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
            <Border x:Name="PART_HierarchyIndent"
                    Grid.Column="2"
                    Width="{StaticResource GroupIndentWidth}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="0 1 0 0"
                    Visibility="{Binding HasHierarchy, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            <Border
                    Width="{StaticResource GroupIndentWidth}"
                    Background="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"
                    VerticalAlignment="Stretch"
                    Visibility="{TemplateBinding RowIndicatorVisibility}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            <Border x:Name="PART_IndicatorPresenter"
                    Width="{StaticResource GroupIndentWidth}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="0 0 1 1"
                    VerticalAlignment="Stretch"
                    Visibility="{TemplateBinding RowIndicatorVisibility}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            <grid:IndentPresenter x:Name="PART_IndentPresenter"
                    IndentLevel="{TemplateBinding IndentLevel}"
                    ItemTemplate="{StaticResource GridViewGroupFooterIndentCellDataTemplate}"
                    Grid.Column="1"
                    grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            <grid:DataCellsPresenter x:Name="PART_DataCellsPresenter" Grid.Column="3"/>
        </grid:SelectiveScrollingGrid>
    </ControlTemplate>
    <Style x:Key="GridViewGroupFooterRowStyle" TargetType="grid:GridViewGroupFooterRow">
        <Setter Property="Template" Value="{StaticResource GridViewGroupFooterRowTemplate}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="BorderThickness" Value="0 0 1 1"/>
        <Setter Property="MinHeight" Value="31"/>
        <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" Width="18" Height="18" VerticalAlignment="Center">
            <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>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_RootElement" Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </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>
            <Grid Background="Transparent">
                <Border x:Name="PART_RootElement"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        Background="{TemplateBinding Background}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadius}"/>
                <Border x:Name="IndeterminatePath"
                        Width="10"
                        Height="10"
                        Opacity="{telerik1:FluentResource ResourceKey=DisabledOpacity}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Background="{telerik1:FluentResource ResourceKey=IconBrush}"
                        Visibility="Collapsed"/>
                <telerik:RadGlyph x:Name="CheckedPath"
                        Opacity="{telerik1:FluentResource ResourceKey=DisabledOpacity}"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Foreground="{TemplateBinding Foreground}"
                        Margin="0"
                        Visibility="Collapsed"
                        Glyph="{StaticResource GlyphCheck}"/>
            </Grid>
        </Grid>
    </ControlTemplate>
    <Style x:Key="GridViewCheckBoxStyle" TargetType="grid:GridViewCheckBox">
        <Setter Property="Template" Value="{StaticResource GridViewCheckBoxTemplate}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="2"/>
    </Style>
    <Style TargetType="grid:GridViewCheckBox" BasedOn="{StaticResource GridViewCheckBoxStyle}"/>
    <ControlTemplate x:Key="GridViewEditorPresenterValidationToolTipTemplate" TargetType="ToolTip">
        <Grid x:Name="Root" Opacity="0" Margin="2 0 0 0" Background="Transparent" RenderTransformOrigin="0 0">
            <Grid.RenderTransform>
                <TranslateTransform x:Name="xform" X="-25"/>
            </Grid.RenderTransform>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Border Padding="4 3" Grid.Column="1" MinHeight="20" Background="{telerik1:FluentResource ResourceKey=ValidationBrush}">
                <TextBlock
                        MaxWidth="250"
                        FontSize="{telerik1:FluentResource ResourceKey=FontSize}"
                        FontFamily="{telerik1:FluentResource ResourceKey=FontFamily}"
                        Foreground="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"
                        VerticalAlignment="Center"
                        Text="{TemplateBinding Content}"
                        TextWrapping="Wrap"/>
            </Border>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsOpen" Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard x:Name="OpenAnimation">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="xform" Storyboard.TargetProperty="X" To="0" Duration="0:0:0.2"/>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard x:Name="CloseAnimation">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="xform" Storyboard.TargetProperty="X" To="-25" Duration="0:0:0.2"/>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.ExitActions>
                <Setter TargetName="Root" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsOpen" Value="False">
                <Setter TargetName="Root" Property="Opacity" Value="0"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="GridViewEditorPresenterTemplate" TargetType="grid:GridViewEditorPresenter">
        <Grid Background="Transparent">
            <ContentPresenter x:Name="ContentPresenter" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            <Border x:Name="ValidationErrorElement" Visibility="Collapsed" BorderThickness="1" BorderBrush="{telerik1:FluentResource ResourceKey=ValidationBrush}">
                <ToolTipService.ToolTip>
                    <ToolTip x:Name="validationTooltip"
                            VerticalContentAlignment="Center"
                            Placement="Right"
                            Content="{TemplateBinding ErrorMessage}"
                            Template="{StaticResource GridViewEditorPresenterValidationToolTipTemplate}"/>
                </ToolTipService.ToolTip>
                <Grid Background="Transparent" Width="32" HorizontalAlignment="Right" VerticalAlignment="Top">
                    <Path
                            Data="{StaticResource ArrowTopRight8x8}"
                            Fill="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                            Stretch="None"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Top"
                            Margin="0 -1 -1 0"/>
                </Grid>
            </Border>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsContentValid" Value="False">
                <Setter TargetName="ValidationErrorElement" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="IsContentValid" Value="True">
                <Setter Property="Margin" Value="1 1 2 2"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </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="0"/>
    </Style>
    <Style TargetType="grid:GridViewEditorPresenter" BasedOn="{StaticResource GridViewEditorPresenterStyle}"/>
    <ControlTemplate x:Key="GridViewToggleButtonTemplate" TargetType="controls:GridViewToggleButton">
        <Border Background="Transparent" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
            <Border
                    Background="{TemplateBinding Background}"
                    VerticalAlignment="Stretch"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                <Grid Margin="{TemplateBinding Padding}">
                    <telerik:RadGlyph x:Name="plus"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                            Foreground="{TemplateBinding Foreground}"
                            FontSize="16"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Glyph="{StaticResource GlyphPlus}"/>
                    <telerik:RadGlyph x:Name="minus"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                            Foreground="{TemplateBinding Foreground}"
                            FontSize="16"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Opacity="0"
                            Glyph="{StaticResource GlyphMinus}"/>
                </Grid>
            </Border>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsChecked" Value="True">
                <Setter TargetName="plus" Property="Opacity" Value="0"/>
                <Setter TargetName="minus" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=AccentMouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=AccentPressedBrush}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="GridViewToggleButtonArrowTemplate" TargetType="controls:GridViewToggleButton">
        <Border
                Background="Transparent"
                VerticalAlignment="Stretch"
                HorizontalAlignment="Stretch"
                UseLayoutRounding="True"
                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
            <Grid Background="Transparent" Height="18" Width="18">
                <telerik:RadGlyph x:Name="plus"
                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                        Foreground="{TemplateBinding Foreground}"
                        FontSize="16"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronRight}"/>
                <telerik:RadGlyph x:Name="minus"
                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                        Foreground="{TemplateBinding Foreground}"
                        FontSize="16"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Opacity="0"
                        Glyph="{StaticResource GlyphArrowChevronDown}"/>
            </Grid>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsChecked" Value="True">
                <Setter TargetName="plus" Property="Opacity" Value="0"/>
                <Setter TargetName="minus" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=AccentMouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=AccentPressedBrush}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="GridViewToggleButtonStyle" TargetType="controls:GridViewToggleButton">
        <Setter Property="Template" Value="{StaticResource GridViewToggleButtonTemplate}"/>
        <Setter Property="PlusMinusTemplate" Value="{StaticResource GridViewToggleButtonTemplate}"/>
        <Setter Property="ArrowTemplate" Value="{StaticResource GridViewToggleButtonArrowTemplate}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="Width" Value="21"/>
        <Setter Property="Margin" Value="0"/>
        <Setter Property="Padding" Value="0 0 0 2"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="telerik:TouchManager.TouchMode" Value="None"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="controls:GridViewToggleButton" BasedOn="{StaticResource GridViewToggleButtonStyle}"/>
    <ControlTemplate x:Key="GridViewGroupPanelTemplate" TargetType="grid:GridViewGroupPanel">
        <Grid>
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
            <StackPanel Orientation="Horizontal">
                <TextBlock x:Name="panelText"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        Margin="{TemplateBinding Padding}"
                        FontSize="{telerik1:FluentResource ResourceKey=FontSize}"
                        FontFamily="{telerik1:FluentResource ResourceKey=FontFamily}"
                        telerik:LocalizationManager.ResourceKey="GridViewGroupPanelText"
                        IsHitTestVisible="False"/>
                <TextBlock x:Name="panelTextGrouped"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        Margin="{TemplateBinding Padding}"
                        Visibility="Collapsed"
                        FontSize="{telerik1:FluentResource ResourceKey=FontSize}"
                        FontFamily="{telerik1:FluentResource ResourceKey=FontFamily}"
                        telerik:LocalizationManager.ResourceKey="GridViewGroupPanelTopTextGrouped"
                        IsHitTestVisible="False"/>
                <ItemsPresenter VerticalAlignment="Center"/>
            </StackPanel>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="True">
                <Setter TargetName="panelText" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="panelTextGrouped" Property="Visibility" Value="Visible"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ItemsPanelTemplate x:Key="GridViewGroupPanelItemsPanelTemplate">
        <StackPanel Orientation="Horizontal" VerticalAlignment="Stretch"/>
    </ItemsPanelTemplate>
    <Style x:Key="GridViewGroupPanelStyle" TargetType="grid:GridViewGroupPanel">
        <Setter Property="MinHeight" Value="36"/>
        <Setter Property="Template" Value="{StaticResource GridViewGroupPanelTemplate}"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="Padding" Value="10 0 0 0"/>
        <Setter Property="Margin" Value="0 0 0 -1"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="ItemsPanel" Value="{StaticResource GridViewGroupPanelItemsPanelTemplate}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="grid:GridViewGroupPanel" BasedOn="{StaticResource GridViewGroupPanelStyle}"/>
    <ControlTemplate x:Key="CloseButtonTemplate" TargetType="Button">
        <Border x:Name="CloseButton" Background="{TemplateBinding Background}" UseLayoutRounding="True">
            <telerik:RadGlyph FontSize="16" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center" Glyph="{StaticResource GlyphClose}"/>
        </Border>
    </ControlTemplate>
    <Style x:Key="ButtonCloseStyle" TargetType="Button">
        <Setter Property="Template" Value="{StaticResource CloseButtonTemplate}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
    </Style>
    <ControlTemplate x:Key="GridViewGroupPanelCellTemplate" TargetType="grid:GridViewGroupPanelCell">
        <Grid UseLayoutRounding="True">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0:0:0.2" To="MouseOver"/>
                        <VisualTransition GeneratedDuration="0:0:0.2" To="Normal"/>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder_Over" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames
                                    BeginTime="0"
                                    Duration="0"
                                    Storyboard.TargetName="ContentElement"
                                    Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                                <EasingDoubleKeyFrame KeyTime="0" Value="-5"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="0" Duration="0:001" Storyboard.TargetName="PART_CloseButton" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="OuterBorder"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadius}"
                    UseLayoutRounding="True"/>
            <Border x:Name="OuterBorder_Over"
                    Grid.ColumnSpan="2"
                    Background="{telerik1:FluentResource ResourceKey=MouseOverBrush}"
                    CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadius}"
                    UseLayoutRounding="True"
                    Visibility="Collapsed"/>
            <telerik:RadGlyph x:Name="PART_SortIndicator"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"
                    Grid.ColumnSpan="2"
                    FontSize="16"
                    Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                    VerticalAlignment="Top"
                    Margin="0 -3 0 0"
                    Glyph="{StaticResource GlyphArrowChevronDown}"/>
            <ContentControl x:Name="ContentElement"
                    Content="{TemplateBinding Content}"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="{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"
                    AutomationProperties.Name="close"
                    Grid.Column="1"
                    Style="{StaticResource ButtonCloseStyle}"
                    VerticalAlignment="Center"
                    Margin="5 0"
                    Opacity="0"/>
        </Grid>
        <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding Path=SortDirection}" Value="Ascending">
                <Setter Property="Visibility" TargetName="PART_SortIndicator" Value="Visible"/>
                <Setter TargetName="PART_SortIndicator" Property="Glyph" Value="{StaticResource GlyphArrowChevronUp}"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding Path=SortDirection}" Value="Descending">
                <Setter Property="Visibility" TargetName="PART_SortIndicator" Value="Visible"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding Path=SortDirection}" Value="{x:Null}">
                <Setter Property="Visibility" TargetName="PART_SortIndicator" Value="Collapsed"/>
            </DataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="GridViewGroupPanelCellStyle" TargetType="grid:GridViewGroupPanelCell">
        <Setter Property="Template" Value="{StaticResource GridViewGroupPanelCellTemplate}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Padding" Value="10 2 5 2"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="MinHeight" Value="28"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <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>
                <telerik:RadGlyph x:Name="PART_InsertionPoint"
                        Glyph="{StaticResource GlyphArrow60Down}"
                        FontSize="16"
                        Foreground="{TemplateBinding Foreground}"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Top"
                        Visibility="{TemplateBinding InsertionPointVisibility}"/>
                <telerik:RadGlyph x:Name="PART_ConnectingLine"
                        Opacity="{Binding IsFirst, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanToOpacityConverter}}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="Center"
                        Glyph="{StaticResource GlyphArrowChevronRight}"
                        FontSize="16"
                        Foreground="{TemplateBinding Foreground}"
                        Margin="3 0"/>
            </Grid>
            <grid:GridViewGroupPanelCell x:Name="PART_Cell" Content="{TemplateBinding Content}" Margin="0 0 0 1" SortDirection="{Binding Path=SortDirection}"/>
            <telerik:RadGlyph x:Name="PART_RightInsertionPoint"
                    Glyph="{StaticResource GlyphArrow60Down}"
                    Foreground="{TemplateBinding Foreground}"
                    FontSize="16"
                    Margin="3 0"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Top"
                    Visibility="{TemplateBinding RightInsertionPointVisibility}"/>
        </StackPanel>
    </ControlTemplate>
    <Style x:Key="GridViewGroupPanelItemStyle" TargetType="grid:GridViewGroupPanelItem">
        <Setter Property="Template" Value="{StaticResource GridViewGroupPanelItemTemplate}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
        <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">
        <telerik1:RadBusyIndicator
                IsBusy="{TemplateBinding IsBusy}"
                IsIndeterminate="{TemplateBinding IsIndeterminate}"
                ProgressValue="{TemplateBinding ProgressValue}"
                BusyContent="{TemplateBinding BusyContent}"
                BusyContentTemplate="{TemplateBinding BusyContentTemplate}"/>
    </ControlTemplate>
    <Style x:Key="GridViewLoadingIndicatorStyle" TargetType="grid:GridViewLoadingIndicator">
        <Setter Property="Template" Value="{StaticResource GridViewLoadingIndicatorTemplate}"/>
        <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"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="2" CanContentScroll="{TemplateBinding CanContentScroll}"/>
            <Border x:Name="ScrollViewerCornerBorder" Grid.Column="1" Grid.Row="4" Background="{Binding ElementName=PART_HorizontalScrollBar, Path=Background}"/>
            <Border x:Name="VerticalScrollBarPlaceholder" Grid.RowSpan="4" Grid.Column="1" Width="0.1" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
            <ScrollBar x:Name="PART_VerticalScrollBar"
                    Grid.RowSpan="4"
                    HorizontalAlignment="Right"
                    Grid.ColumnSpan="2"
                    Grid.Row="1"
                    Orientation="Vertical"
                    IsTabStop="False"
                    Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                    ViewportSize="{TemplateBinding ViewportHeight}"
                    Maximum="{TemplateBinding ScrollableHeight}"
                    Value="{TemplateBinding VerticalOffset}"/>
            <ScrollBar x:Name="PART_HorizontalScrollBar"
                    Grid.RowSpan="4"
                    VerticalAlignment="Bottom"
                    Grid.ColumnSpan="2"
                    Orientation="Horizontal"
                    IsTabStop="False"
                    Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                    ViewportSize="{TemplateBinding ViewportWidth}"
                    Maximum="{TemplateBinding ScrollableWidth}"
                    Value="{TemplateBinding HorizontalOffset}"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="helpers:ThemeHelper.ScrollBarsMode" Value="Normal">
                <Setter TargetName="PART_VerticalScrollBar" Property="Grid.Column" Value="2"/>
                <Setter TargetName="PART_HorizontalScrollBar" Property="Grid.Row" Value="5"/>
                <Setter TargetName="ScrollViewerCornerBorder" Property="Grid.Column" Value="2"/>
                <Setter TargetName="ScrollViewerCornerBorder" Property="Grid.Row" Value="5"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="GridViewScrollViewerStyle" TargetType="grid:GridViewScrollViewer">
        <Setter Property="helpers:ThemeHelper.ScrollBarsMode" Value="{telerik:FluentResource ResourceKey=ScrollBarsMode}"/>
        <Setter Property="Template" Value="{StaticResource GridViewScrollViewerTemplate}"/>
        <Setter Property="Margin" Value="1"/>
    </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="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>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <grid:GridViewSearchPanel x:Name="PART_SearchPanel"
                    Grid.ColumnSpan="4"
                    Visibility="{Binding ShowSearchPanel, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                    Background="{TemplateBinding SearchPanelBackground}"
                    Foreground="{TemplateBinding SearchPanelForeground}"/>
            <grid:GridViewGroupPanel x:Name="PART_GroupPanel" Grid.Row="1" Grid.ColumnSpan="4" Background="{TemplateBinding GroupPanelBackground}" Foreground="{TemplateBinding GroupPanelForeground}"/>
            <telerik:RadDropDownButton x:Name="PART_GridViewColumnsSelectionButton"
                    Grid.Column="4"
                    Grid.Row="1"
                    VerticalAlignment="Center"
                    DropDownIndicatorVisibility="Collapsed"
                    BorderThickness="0"
                    Padding="0"
                    IsTabStop="False"
                    Style="{StaticResource ControlPanelItem_DropDownButtonStyle}"
                    Visibility="{Binding ColumnsSelectionButtonVisibility, RelativeSource={RelativeSource TemplatedParent}}"
                    MinWidth="26"
                    MinHeight="26">
                <ToolTipService.ToolTip>
                    <ToolTip Placement="Right" telerik:LocalizationManager.ResourceKey="GridViewColumnsSelectionButtonTooltip"/>
                </ToolTipService.ToolTip>
                <telerik:RadDropDownButton.Content>
                    <Path
                            Data="M14.7,9 L16,10.2 L10.1,17 L6,13 L7.2,11.8 L10.1,14.6 z M12,4 L16,4 L16,8 L12,8 z M6,4 L10,4 L10,11 L6,11 z M0,4 L4,4 L4,16 L0,16 z M12,0 L16,0 L16,2 L12,2 z M6,0 L10,0 L10,2 L6,2 z M0,0 L4,0 L4,2 L0,2 z"
                            Height="17"
                            Width="16"
                            Fill="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadDropDownButton}}, Path=Foreground}"
                            Stretch="Fill"
                            UseLayoutRounding="True"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"/>
                </telerik:RadDropDownButton.Content>
                <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadListBox ItemsSource="{Binding Columns}" BorderThickness="0" Padding="4 1" MaxWidth="200" MaxHeight="250">
                        <telerik:RadListBox.ItemsPanel>
                            <ItemsPanelTemplate>
                                <StackPanel/>
                            </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBox.ItemContainerStyle>
                            <Style TargetType="telerik:RadListBoxItem">
                                <Setter Property="Padding" Value="5 3 3 3"/>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="telerik:RadListBoxItem">
                                            <CheckBox Padding="{TemplateBinding Padding}" Content="{Binding Converter={StaticResource ColumnHeaderConverter}}" IsChecked="{Binding IsSelected, Mode=TwoWay}"/>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </telerik:RadListBox.ItemContainerStyle>
                    </telerik:RadListBox>
                </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
            <Border x:Name="PART_MasterGridContainer"
                    Grid.Row="2"
                    Grid.ColumnSpan="4"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}"/>
            <ItemsControl Name="PART_ControlPanelItemsControl" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Right" ItemsSource="{TemplateBinding ControlPanelItems}" IsTabStop="False">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <grid:ControlPanelItemControl/>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
            <grid:GridViewScrollViewer x:Name="PART_ItemsScrollViewer" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="4" Margin="1" CanContentScroll="True">
                <grid:GridViewScrollViewer.HeaderRow>
                    <grid:GridViewHeaderRow x:Name="PART_HeaderRow" Grid.ColumnSpan="3" IndentLevel="{TemplateBinding GroupCount}"/>
                </grid:GridViewScrollViewer.HeaderRow>
                <grid:GridViewScrollViewer.NewRow>
                    <grid:GridViewNewRow Name="PART_AddNewRow" IndentLevel="{TemplateBinding GroupCount}"/>
                </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"
                    IsHitTestVisible="False"
                    HorizontalAlignment="Right"
                    Grid.Row="2"
                    Grid.ColumnSpan="4"
                    Margin="0 0 28 0"
                    Visibility="{Binding IsScrolling, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                    ContentTemplate="{TemplateBinding ScrollPositionIndicatorTemplate}"/>
            <Border x:Name="PART_FrozenColumnsPreview"
                    Grid.Row="2"
                    Grid.RowSpan="3"
                    Width="5"
                    Background="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"
                    Opacity="0.3"
                    Visibility="Collapsed"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch">
                <Border BorderThickness="1 0 0 0" BorderBrush="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}" HorizontalAlignment="Right" Width="5"/>
            </Border>
            <Border x:Name="PART_FrozenColumnsPreviewRight"
                    Grid.Row="2"
                    Grid.RowSpan="3"
                    Width="5"
                    Background="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"
                    Opacity="0.3"
                    Visibility="Collapsed"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"/>
            <grid:GridViewLoadingIndicator x:Name="PART_GridViewLoadingIndicator"
                    Grid.RowSpan="4"
                    Grid.ColumnSpan="4"
                    Visibility="Collapsed"
                    IsBusy="{TemplateBinding IsBusy}"
                    ProgressValue="{Binding BusyIndicatorProgressValue, RelativeSource={RelativeSource TemplatedParent}}"
                    IsIndeterminate="{Binding BusyIndicatorIsIndeterminate, RelativeSource={RelativeSource TemplatedParent}}"
                    BusyContent="{Binding BusyIndicatorContent, RelativeSource={RelativeSource TemplatedParent}}"
                    BusyContentTemplate="{Binding BusyIndicatorContentTemplate, RelativeSource={RelativeSource TemplatedParent}}"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsBusy" Value="True">
                <Setter TargetName="PART_GridViewLoadingIndicator" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="ShowColumnFooters" Value="false">
                <Setter TargetName="PART_FooterRow" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="ShowColumnHeaders" Value="false">
                <Setter TargetName="PART_HeaderRow" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="NewRowPosition" Value="None">
                <Setter TargetName="PART_AddNewRow" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger SourceName="PART_ControlPanelItemsControl" Property="HasItems" Value="True">
                <Setter TargetName="PART_ControlPanelItemsControl" Property="MinHeight" Value="36"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadGridViewStyle" TargetType="controls:RadGridView">
        <Setter Property="Template" Value="{StaticResource RadGridViewTemplate}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="GroupPanelBackground" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="GroupPanelForeground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="SearchPanelBackground" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="SearchPanelForeground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="VerticalGridLinesBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="HorizontalGridLinesBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="GridLinesVisibility" Value="Horizontal"/>
        <Setter Property="AlternateRowBackground" Value="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
        <Setter Property="RowHeight" Value="31"/>
        <Setter Property="Tag" Value="Fluent"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    </Style>
    <Style TargetType="controls:RadGridView" BasedOn="{StaticResource RadGridViewStyle}"/>
    <Style x:Key="TreeListViewDragCueStyle" TargetType="controls:TreeListViewDragCue">
        <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
        <Setter Property="IsHitTestVisible" Value="False"/>
        <Setter Property="Padding" Value="5"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Opacity" Value="0.75"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:TreeListViewDragCue">
                    <Grid>
                        <mat:Shadow Background="{telerik1:FluentResource ResourceKey=PrimaryBrush}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
                        <StackPanel>
                            <Grid HorizontalAlignment="Left" Visibility="{TemplateBinding DragPreviewVisibility}" MinHeight="28">
                                <Grid.Resources>
                                    <Style TargetType="TextBlock">
                                        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
                                    </Style>
                                </Grid.Resources>
                                <Border BorderBrush="{telerik1:FluentResource ResourceKey=PrimaryBrush}" Background="{telerik1:FluentResource ResourceKey=PrimaryBrush}" BorderThickness="0">
                                    <ItemsPresenter Margin="{TemplateBinding Padding}"/>
                                </Border>
                            </Grid>
                            <Border
                                    BorderBrush="{telerik1:FluentResource ResourceKey=BasicBrush}"
                                    Background="{telerik1:FluentResource ResourceKey=PrimaryBrush}"
                                    MinHeight="36"
                                    BorderThickness="0"
                                    Opacity="0.9"
                                    Visibility="{TemplateBinding DragTooltipVisibility}">
                                <StackPanel Orientation="Horizontal" Margin="5 0 0 0">
                                    <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}"
                                            FontSize="{TemplateBinding FontSize}"
                                            FontFamily="{TemplateBinding FontFamily}"
                                            VerticalAlignment="Center"
                                            Foreground="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
                                    <ContentControl
                                            Foreground="{telerik1:FluentResource ResourceKey=MarkerBrush}"
                                            Content="{TemplateBinding DragTooltipContent}"
                                            ContentTemplate="{TemplateBinding DragTooltipContentTemplate}"
                                            FontSize="{TemplateBinding FontSize}"
                                            FontFamily="{TemplateBinding FontFamily}"
                                            VerticalAlignment="Center"/>
                                </StackPanel>
                            </Border>
                        </StackPanel>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsDropPossible" Value="False">
                            <Setter TargetName="DropImpossibleIconElement" Property="Visibility" Value="Visible"/>
                            <Setter TargetName="DropPossibleIconElement" Property="Visibility" Value="Collapsed"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="DropImpossibleIconTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid UseLayoutRounding="True">
                        <telerik:RadGlyph
                                Glyph="{StaticResource GlyphCancel}"
                                Foreground="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                                FontSize="16"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"/>
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="DropPossibleIconTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid UseLayoutRounding="True">
                        <telerik:RadGlyph
                                Glyph="{StaticResource GlyphCheck}"
                                Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                                FontSize="16"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"/>
                    </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>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="0"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="PART_MasterGridContainer"
                    Grid.Row="2"
                    Grid.RowSpan="2"
                    Grid.ColumnSpan="3"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}"/>
            <ItemsControl Name="PART_ControlPanelItemsControl" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Right" ItemsSource="{TemplateBinding ControlPanelItems}" IsTabStop="False">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <grid:ControlPanelItemControl/>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
            <grid:GridViewScrollViewer x:Name="PART_ItemsScrollViewer" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="3" CanContentScroll="True">
                <grid:GridViewScrollViewer.HeaderRow>
                    <grid:GridViewHeaderRow x:Name="PART_HeaderRow" IndentLevel="{TemplateBinding GroupCount}"/>
                </grid:GridViewScrollViewer.HeaderRow>
                <grid:GridViewScrollViewer.NewRow>
                    <grid:GridViewNewRow Name="PART_AddNewRow" IndentLevel="{TemplateBinding GroupCount}"/>
                </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"
                    IsHitTestVisible="False"
                    HorizontalAlignment="Right"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    Margin="0 0 28 0"
                    Visibility="{Binding IsScrolling, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                    ContentTemplate="{TemplateBinding ScrollPositionIndicatorTemplate}"/>
            <Border x:Name="PART_FrozenColumnsPreview"
                    Grid.Row="2"
                    Grid.RowSpan="3"
                    Width="5"
                    Background="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"
                    Opacity="0.3"
                    Visibility="Collapsed"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"/>
            <Border x:Name="PART_FrozenColumnsPreviewRight"
                    Grid.Row="2"
                    Grid.RowSpan="3"
                    Width="5"
                    Background="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"
                    Opacity="0.3"
                    Visibility="Collapsed"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"/>
            <grid:GridViewLoadingIndicator x:Name="PART_GridViewLoadingIndicator"
                    Grid.RowSpan="4"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    IsBusy="{TemplateBinding IsBusy}"
                    ProgressValue="{Binding BusyIndicatorProgressValue, RelativeSource={RelativeSource TemplatedParent}}"
                    IsIndeterminate="{Binding BusyIndicatorIsIndeterminate, RelativeSource={RelativeSource TemplatedParent}}"
                    BusyContent="{Binding BusyIndicatorContent, RelativeSource={RelativeSource TemplatedParent}}"
                    BusyContentTemplate="{Binding BusyIndicatorContentTemplate, RelativeSource={RelativeSource TemplatedParent}}"/>
            <Grid x:Name="DragBetweenItemsFeedback"
                    Grid.Row="2"
                    Grid.ColumnSpan="3"
                    Height="8"
                    Visibility="Collapsed"
                    HorizontalAlignment="Left"
                    IsHitTestVisible="False"
                    VerticalAlignment="Top"
                    Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="8"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Ellipse Stroke="{telerik1:FluentResource ResourceKey=AccentBrush}" Width="8" Height="8" StrokeThickness="2" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                <Rectangle Grid.Column="1" Height="2" Fill="{telerik1:FluentResource ResourceKey=AccentBrush}" RadiusX="2" RadiusY="2" Margin="-2 3 0 0" VerticalAlignment="Top"/>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsBusy" Value="True">
                <Setter TargetName="PART_GridViewLoadingIndicator" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="ShowColumnFooters" Value="false">
                <Setter Property="Visibility" Value="Collapsed" TargetName="PART_FooterRow"/>
            </Trigger>
            <Trigger Property="ShowColumnHeaders" Value="false">
                <Setter Property="Visibility" Value="Collapsed" TargetName="PART_HeaderRow"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadTreeListViewStyle" TargetType="controls:RadTreeListView">
        <Setter Property="Template" Value="{StaticResource RadTreeListViewTemplate}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="VerticalGridLinesBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="HorizontalGridLinesBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="AlternateRowBackground" Value="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
        <Setter Property="GridLinesVisibility" Value="Horizontal"/>
        <Setter Property="RowHeight" Value="31"/>
        <Setter Property="Tag" Value="Fluent"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="TreeLinesBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="TreeLinesStrokeThickness" Value="1"/>
    </Style>
    <Style TargetType="controls:RadTreeListView" BasedOn="{StaticResource RadTreeListViewStyle}"/>
    <ControlTemplate x:Key="TreeListViewRowTemplate" TargetType="treeList:TreeListViewRow">
        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup>
                    <VisualState x:Name="Unselected"/>
                    <VisualState x:Name="SelectedUnfocused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Selected_Unfocused" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Selected" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Selected">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Selected" 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/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Border x:Name="Background_Main"
                        Grid.Column="2"
                        Grid.ColumnSpan="2"
                        Background="{TemplateBinding Background}"
                        Margin="{TemplateBinding Margin}"
                        Padding="{TemplateBinding Padding}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                <grid:DetailsPresenter x:Name="PART_DetailsPresenter"
                        Grid.Column="2"
                        Grid.ColumnSpan="2"
                        Grid.Row="1"
                        Margin="0 -1 0 0"
                        BorderThickness="0"
                        DetailsProvider="{TemplateBinding DetailsProvider}"/>
                <Border x:Name="Background_Invalid"
                        Grid.Column="1"
                        Grid.ColumnSpan="4"
                        Background="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                        Opacity="0.3"
                        Visibility="Collapsed"/>
                <Border
                        Grid.RowSpan="3"
                        Width="31"
                        Background="{TemplateBinding Background}"
                        Visibility="{TemplateBinding RowIndicatorVisibility}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
                <Border x:Name="PART_RowBorder"
                        Grid.ColumnSpan="4"
                        Grid.RowSpan="3"
                        BorderBrush="{TemplateBinding HorizontalGridLinesBrush}"
                        BorderThickness="{Binding HorizontalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Bottom}"/>
                <Border x:Name="Background_Over" Grid.ColumnSpan="4" Background="{TemplateBinding mat:MaterialAssist.MouseOverBrush}" Visibility="Collapsed" Margin="0 0 0 1"/>
                <Border x:Name="Background_Selected_Unfocused" Grid.ColumnSpan="4" Background="{TemplateBinding mat:MaterialAssist.CheckedBrush}" Visibility="Collapsed" Margin="0 0 0 1"/>
                <Border x:Name="Background_Selected" Grid.ColumnSpan="4" Background="{TemplateBinding mat:MaterialAssist.CheckedBrush}" Visibility="Collapsed"/>
                <controls:GridViewToggleButton x:Name="PART_ExpandButton"
                        AutomationProperties.Name="expander"
                        Width="31"
                        Height="NaN"
                        Grid.Column="1"
                        Grid.ColumnSpan="2"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Stretch"
                        IsTabStop="False"
                        IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                        PresentationMode="Arrow"/>
                <Border x:Name="PART_IndicatorPresenter"
                        Grid.RowSpan="3"
                        Width="31"
                        VerticalAlignment="Stretch"
                        BorderBrush="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"
                        BorderThickness="0 0 1 0"
                        Visibility="{TemplateBinding RowIndicatorVisibility}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical">
                    <Grid>
                        <Grid x:Name="NavigatorIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed">
                            <telerik:RadGlyph x:Name="IconRight"
                                    Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                                    FontSize="16"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
                        </Grid>
                        <Grid x:Name="EditIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed">
                            <telerik:RadGlyph
                                    Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                                    FontSize="16"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Glyph="{StaticResource GlyphComment}"/>
                        </Grid>
                        <Grid x:Name="InvalidEditableIndicator" Visibility="Collapsed" Background="Transparent">
                            <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
                                <telerik:RadGlyph
                                        Foreground="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                                        FontSize="16"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Glyph="{StaticResource GlyphComment}"/>
                            </Grid>
                            <ToolTipService.ToolTip>
                                <ToolTip Placement="Bottom" Content="{TemplateBinding Errors}" Template="{StaticResource GridViewValidationToolTipTemplate}"/>
                            </ToolTipService.ToolTip>
                        </Grid>
                        <Grid x:Name="ErrorIndicator" HorizontalAlignment="Center" Width="16" Height="16" VerticalAlignment="Center" Visibility="Collapsed">
                            <telerik:RadGlyph
                                    Foreground="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                                    FontSize="16"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Glyph="{StaticResource GlyphWarning}"/>
                            <ToolTipService.ToolTip>
                                <ToolTip Placement="Bottom" Content="{TemplateBinding Errors}" Template="{StaticResource GridViewValidationToolTipTemplate}"/>
                            </ToolTipService.ToolTip>
                        </Grid>
                        <Border x:Name="PART_RowResizer" Background="Transparent" Height="4" VerticalAlignment="Bottom" Cursor="SizeNS"/>
                    </Grid>
                </Border>
                <grid:DataCellsPresenter x:Name="PART_DataCellsPresenter" Grid.ColumnSpan="2" Grid.Column="1">
                    <grid:DataCellsPresenter.ItemsPanel>
                        <ItemsPanelTemplate>
                            <treeList:TreeListCellsPanel/>
                        </ItemsPanelTemplate>
                    </grid:DataCellsPresenter.ItemsPanel>
                </grid:DataCellsPresenter>
            </grid:SelectiveScrollingGrid>
        </Border>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                    <Condition Property="IsValid" Value="True"/>
                    <Condition Property="IsSelected" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="Background_Over" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsValid" Value="False"/>
                    <Condition Property="IsInEditMode" Value="False"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="Background_Invalid" Property="Visibility" Value="Visible"/>
                <Setter TargetName="ErrorIndicator" Property="Visibility" Value="Visible"/>
                <Setter TargetName="Background_Selected_Unfocused" Property="Background" Value="{x:Null}"/>
                <Setter TargetName="Background_Main" Property="Visibility" Value="Collapsed"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsValid" Value="False"/>
                    <Condition Property="IsInEditMode" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="Background_Invalid" Property="Visibility" Value="Visible"/>
                <Setter TargetName="InvalidEditableIndicator" Property="Visibility" Value="Visible"/>
                <Setter TargetName="Background_Selected_Unfocused" Property="Background" Value="{x:Null}"/>
                <Setter TargetName="Background_Main" Property="Visibility" Value="Collapsed"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsValid" Value="True"/>
                    <Condition Property="IsInEditMode" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="EditIndicator" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsValid" Value="True"/>
                    <Condition Property="IsCurrent" Value="True"/>
                    <Condition Property="IsInEditMode" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="NavigatorIndicator" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="TreeListViewRowStyle" TargetType="treeList:TreeListViewRow">
        <Setter Property="Template" Value="{StaticResource TreeListViewRowTemplate}"/>
        <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
        <Setter Property="mat:MaterialAssist.CheckedBrush" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="AllowDrop" 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="{TemplateBinding Foreground}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                IsEditable="False"
                NonEditableTemplate="{StaticResource NonEditableComboBox}"
                ItemTemplate="{TemplateBinding ItemTemplate}"
                SelectedValuePath="{TemplateBinding SelectedValuePath}"
                DisplayMemberPath="{TemplateBinding DisplayMemberPath}"
                SelectedValue="{TemplateBinding SelectedValue}"
                ItemsSource="{TemplateBinding ItemsSource}"
                EmptyText="{TemplateBinding EmptyText}"
                Margin="{TemplateBinding Padding}"
                IsTabStop="{TemplateBinding IsTabStop}"
                IsSynchronizedWithCurrentItem="False"
                FontSize="{TemplateBinding FontSize}"
                FontFamily="{TemplateBinding FontFamily}"
                FontWeight="{TemplateBinding FontWeight}"/>
    </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
                Background="{TemplateBinding Background}"
                HorizontalAlignment="Right"
                VerticalAlignment="Center"
                BorderThickness="{TemplateBinding BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}">
            <ContentPresenter
                    Margin="{TemplateBinding Padding}"
                    TextBlock.Foreground="{TemplateBinding Foreground}"
                    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="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="Padding" Value="10 5"/>
    </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}"
                    Margin="0 0 0 1"/>
            <Border x:Name="Background_Current"
                    Background="{x:Null}"
                    BorderBrush="{TemplateBinding CurrentBorderBrush}"
                    BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                    Margin="0 0 1 1"
                    Visibility="Collapsed"/>
            <ContentControl x:Name="PART_ContentPresenter"
                    IsTabStop="{TemplateBinding IsTabStop}"
                    Content="{TemplateBinding Content}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Margin="{TemplateBinding Padding}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    VerticalContentAlignment="Stretch"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsInEditMode" Value="True">
                <Setter Property="Padding" Value="0"/>
                <Setter Property="VerticalContentAlignment" Value="Stretch"/>
                <Setter TargetName="PART_CellBorder" Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="PART_CellBorder" Property="Background" Value="{Binding MouseOverBackground, RelativeSource={RelativeSource TemplatedParent}}"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="PART_CellBorder" Property="Background" Value="{Binding SelectedBackground, RelativeSource={RelativeSource TemplatedParent}}"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsCurrent" Value="True"/>
                    <Condition Property="IsInEditMode" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="Background_Current" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="PART_ContentPresenter" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="Background_Current" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=ParentRow.HorizontalGridLinesWidth}" Value="0">
                <Setter TargetName="PART_CellBorder" Property="Margin" Value="0"/>
                <Setter TargetName="Background_Current" Property="Margin" Value="0 0 1 0"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=ParentRow.VerticalGridLinesWidth}" Value="0">
                <Setter TargetName="Background_Current" Property="Margin" Value="0 0 0 1"/>
            </DataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=ParentRow.HorizontalGridLinesWidth}" Value="0"/>
                    <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=ParentRow.VerticalGridLinesWidth}" Value="0"/>
                </MultiDataTrigger.Conditions>
                <Setter TargetName="Background_Current" Property="Margin" Value="0"/>
            </MultiDataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="GridViewCellCoreStyle" TargetType="grid:GridViewCell">
        <Setter Property="Template" Value="{StaticResource GridViewCellCoreTemplate}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="SelectedBackground" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="CurrentBorderBrush" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
        <Setter Property="MouseOverBackground" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
        <Setter Property="BorderThickness" Value="0 0 1 0"/>
        <Setter Property="Padding" Value="8 0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisualStyle}"/>
    </Style>
    <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}"
                    Margin="0 0 0 1"/>
            <Border x:Name="Background_Invalid"
                    BorderBrush="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                    Background="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"
                    BorderThickness="1"
                    Visibility="Collapsed">
                <ToolTipService.ToolTip>
                    <ToolTip x:Name="validationTooltip" Placement="Right" Content="{TemplateBinding Errors}" Template="{StaticResource GridViewValidationToolTipTemplate}"/>
                </ToolTipService.ToolTip>
                <Grid Background="Transparent" HorizontalAlignment="Right" Height="18" VerticalAlignment="Top" Width="18">
                    <Path
                            Data="{StaticResource ArrowTopRight8x8}"
                            Fill="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                            Stretch="None"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Top"
                            Margin="0 -1 -1 0"/>
                </Grid>
            </Border>
            <Border x:Name="Background_Current"
                    Background="{x:Null}"
                    BorderBrush="{TemplateBinding CurrentBorderBrush}"
                    BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                    Margin="0 0 1 1"
                    Visibility="Collapsed"/>
            <ContentControl x:Name="PART_ContentPresenter"
                    IsTabStop="{TemplateBinding IsTabStop}"
                    Content="{TemplateBinding Content}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Margin="{TemplateBinding Padding}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    VerticalContentAlignment="Stretch"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsInEditMode" Value="True">
                <Setter Property="Padding" Value="0"/>
                <Setter Property="VerticalContentAlignment" Value="Stretch"/>
                <Setter TargetName="PART_CellBorder" Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="PART_CellBorder" Property="Background" Value="{Binding MouseOverBackground, RelativeSource={RelativeSource TemplatedParent}}"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="PART_CellBorder" Property="Background" Value="{Binding SelectedBackground, RelativeSource={RelativeSource TemplatedParent}}"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                    <Condition Property="ParentRowValid" Value="false"/>
                    <Condition Property="IsValid" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="PART_CellBorder" Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=ValidationBrush}"/>
                <Setter TargetName="PART_CellBorder" Property="BorderThickness" Value="1"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsCurrent" Value="True"/>
                    <Condition Property="IsInEditMode" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="Background_Current" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="PART_ContentPresenter" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="Background_Current" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger Property="IsValid" Value="False">
                <Setter TargetName="Background_Invalid" Property="Visibility" Value="Visible"/>
                <Setter TargetName="PART_ContentPresenter" Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
            </Trigger>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=ParentRow.HorizontalGridLinesWidth}" Value="0">
                <Setter TargetName="PART_CellBorder" Property="Margin" Value="0"/>
                <Setter TargetName="Background_Current" Property="Margin" Value="0 0 1 0"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=ParentRow.VerticalGridLinesWidth}" Value="0">
                <Setter TargetName="Background_Current" Property="Margin" Value="0 0 0 1"/>
            </DataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=ParentRow.HorizontalGridLinesWidth}" Value="0"/>
                    <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=ParentRow.VerticalGridLinesWidth}" Value="0"/>
                </MultiDataTrigger.Conditions>
                <Setter TargetName="Background_Current" Property="Margin" Value="0"/>
            </MultiDataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="GridViewCellCoreValidationStyle" TargetType="grid:GridViewCell">
        <Setter Property="Template" Value="{StaticResource GridViewCellCoreValidationTemplate}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="SelectedBackground" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="CurrentBorderBrush" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
        <Setter Property="MouseOverBackground" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
        <Setter Property="BorderThickness" Value="0 0 1 0"/>
        <Setter Property="Padding" Value="5 0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisualStyle}"/>
    </Style>
    <ControlTemplate x:Key="GridViewRowCoreTemplate" TargetType="grid:GridViewRow">
        <grid:SelectiveScrollingGrid x:Name="grid">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="SelectionBackground"
                    Grid.Column="1"
                    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="2" x:Name="PART_DataCellsPresenter"/>
            <grid:IndentPresenter x:Name="PART_IndentPresenter" IndentLevel="{TemplateBinding IndentLevel}" grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
        </grid:SelectiveScrollingGrid>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                    <Condition Property="IsMouseOver" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="SelectionBackground" Property="Background" Value="{Binding MouseOverBackground, RelativeSource={RelativeSource TemplatedParent}}"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="SelectionBackground" Property="Background" Value="{Binding SelectedBackground, RelativeSource={RelativeSource TemplatedParent}}"/>
            </MultiTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="GridViewRowCoreStyle" TargetType="grid:GridViewRow">
        <Setter Property="Template" Value="{StaticResource GridViewRowCoreTemplate}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="SelectedBackground" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="MouseOverBackground" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="AllowDrop" Value="True"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <sys:Double x:Key="RowValidationIndentWidth">31</sys:Double>
    <ControlTemplate x:Key="GridViewRowCoreValidationTemplate" TargetType="grid:GridViewRow">
        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup>
                    <VisualState x:Name="Unselected"/>
                    <VisualState x:Name="SelectedUnfocused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Selected_Unfocused" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Selected" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Selected">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Selected" 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/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Background_Main"
                        Grid.Column="2"
                        Grid.ColumnSpan="2"
                        Background="{TemplateBinding Background}"
                        Margin="{TemplateBinding Margin}"
                        Padding="{TemplateBinding Padding}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                <Border x:Name="Background_Invalid"
                        Grid.Column="1"
                        Grid.ColumnSpan="4"
                        Background="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                        Opacity="0.3"
                        Visibility="Collapsed"/>
                <Border
                        Width="{StaticResource RowValidationIndentWidth}"
                        Background="{TemplateBinding Background}"
                        Visibility="{TemplateBinding RowIndicatorVisibility}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
                <Border x:Name="PART_RowBorder"
                        Grid.ColumnSpan="4"
                        BorderBrush="{TemplateBinding HorizontalGridLinesBrush}"
                        BorderThickness="{Binding HorizontalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Bottom}"/>
                <Border x:Name="Background_Over" Grid.ColumnSpan="4" Background="{TemplateBinding MouseOverBackground}" Visibility="Collapsed" Margin="0 0 0 1"/>
                <Border x:Name="Background_Selected_Unfocused" Grid.ColumnSpan="4" Background="{TemplateBinding MouseOverBackground}" Opacity="0.7" Visibility="Collapsed" Margin="0 0 0 1"/>
                <Border x:Name="Background_Selected" Grid.ColumnSpan="4" Background="{TemplateBinding SelectedBackground}" Visibility="Collapsed" Margin="0 0 0 1"/>
                <Border x:Name="PART_IndicatorPresenter"
                        Width="{StaticResource RowValidationIndentWidth}"
                        VerticalAlignment="Stretch"
                        BorderBrush="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"
                        BorderThickness="0 0 1 0"
                        Background="Transparent"
                        Visibility="{TemplateBinding RowIndicatorVisibility}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical">
                    <Grid>
                        <Grid x:Name="NavigatorIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed">
                            <telerik:RadGlyph x:Name="IconRight"
                                    Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                                    FontSize="16"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
                        </Grid>
                        <Grid x:Name="EditIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed">
                            <telerik:RadGlyph
                                    Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                                    FontSize="16"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Glyph="{StaticResource GlyphComment}"/>
                        </Grid>
                        <Grid x:Name="InvalidEditableIndicator" Visibility="Collapsed" Background="Transparent">
                            <telerik:RadGlyph
                                    Foreground="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                                    FontSize="16"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Glyph="{StaticResource GlyphComment}"/>
                            <ToolTipService.ToolTip>
                                <ToolTip Placement="Bottom" Content="{TemplateBinding Errors}" Template="{StaticResource GridViewValidationToolTipTemplate}"/>
                            </ToolTipService.ToolTip>
                        </Grid>
                        <Grid x:Name="ErrorIndicator" HorizontalAlignment="Center" Width="16" Height="16" VerticalAlignment="Center" Visibility="Collapsed">
                            <telerik:RadGlyph
                                    Foreground="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                                    FontSize="16"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Glyph="{StaticResource GlyphWarning}"/>
                            <ToolTipService.ToolTip>
                                <ToolTip Placement="Bottom" Content="{TemplateBinding Errors}" Template="{StaticResource GridViewValidationToolTipTemplate}"/>
                            </ToolTipService.ToolTip>
                        </Grid>
                        <Thumb x:Name="PART_RowResizer" Style="{StaticResource RowGripperStyle}"/>
                    </Grid>
                </Border>
                <grid:DataCellsPresenter x:Name="PART_DataCellsPresenter" Grid.Column="3"/>
                <Grid
                        Grid.Column="2"
                        Width="{StaticResource RowValidationIndentWidth}"
                        Opacity="{Binding IsExpandable, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToOpacityConverter}}"
                        Visibility="{Binding HasHierarchy, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical">
                    <controls:GridViewToggleButton x:Name="PART_HierarchyExpandButton"
                            IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                            IsHitTestVisible="{TemplateBinding IsExpandable}"
                            IsTabStop="{TemplateBinding IsTabStop}"/>
                </Grid>
                <grid:IndentPresenter x:Name="PART_IndentPresenter" Grid.Column="1" IndentLevel="{TemplateBinding IndentLevel}" grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
            </grid:SelectiveScrollingGrid>
        </Border>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                    <Condition Property="IsValid" Value="True"/>
                    <Condition Property="IsSelected" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="Background_Over" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsValid" Value="False"/>
                    <Condition Property="IsInEditMode" Value="False"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="Background_Invalid" Property="Visibility" Value="Visible"/>
                <Setter TargetName="ErrorIndicator" Property="Visibility" Value="Visible"/>
                <Setter TargetName="Background_Selected_Unfocused" Property="Background" Value="{x:Null}"/>
                <Setter TargetName="Background_Selected" Property="Background" Value="{x:Null}"/>
                <Setter TargetName="Background_Main" Property="Visibility" Value="Collapsed"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsValid" Value="False"/>
                    <Condition Property="IsInEditMode" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="Background_Invalid" Property="Visibility" Value="Visible"/>
                <Setter TargetName="InvalidEditableIndicator" Property="Visibility" Value="Visible"/>
                <Setter TargetName="Background_Selected_Unfocused" Property="Background" Value="{x:Null}"/>
                <Setter TargetName="Background_Selected" Property="Background" Value="{x:Null}"/>
                <Setter TargetName="Background_Main" Property="Visibility" Value="Collapsed"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsValid" Value="True"/>
                    <Condition Property="IsInEditMode" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="EditIndicator" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsValid" Value="True"/>
                    <Condition Property="IsCurrent" Value="True"/>
                    <Condition Property="IsInEditMode" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="NavigatorIndicator" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <Trigger Property="HorizontalGridLinesWidth" Value="0">
                <Setter TargetName="Background_Over" Property="Margin" Value="0"/>
                <Setter TargetName="Background_Selected_Unfocused" Property="Margin" Value="0"/>
                <Setter TargetName="Background_Selected" Property="Margin" Value="0"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="GridViewRowCoreValidationStyle" TargetType="grid:GridViewRow">
        <Setter Property="Template" Value="{StaticResource GridViewRowCoreValidationTemplate}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="SelectedBackground" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="MouseOverBackground" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="AllowDrop" Value="True"/>
    </Style>
    <ControlTemplate x:Key="TreeListViewRowCoreTemplate" TargetType="treeList:TreeListViewRow">
        <grid:SelectiveScrollingGrid x:Name="grid">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="SelectionBackground"
                    Grid.Column="1"
                    Grid.ColumnSpan="2"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding HorizontalGridLinesBrush}"
                    BorderThickness="{Binding HorizontalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Bottom}"
                    grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"/>
            <controls:GridViewToggleButton x:Name="PART_ExpandButton"
                    AutomationProperties.Name="expander"
                    Grid.Column="1"
                    Grid.ColumnSpan="2"
                    Width="31"
                    Height="NaN"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Stretch"
                    PresentationMode="Arrow"
                    IsTabStop="False"
                    IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
            <grid:DataCellsPresenter Grid.Column="2" x:Name="PART_DataCellsPresenter">
                <grid:DataCellsPresenter.ItemsPanel>
                    <ItemsPanelTemplate>
                        <treeList:TreeListCellsPanel/>
                    </ItemsPanelTemplate>
                </grid:DataCellsPresenter.ItemsPanel>
            </grid:DataCellsPresenter>
        </grid:SelectiveScrollingGrid>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                    <Condition Property="IsMouseOver" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="SelectionBackground" Property="Background" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="SelectionBackground" Property="Background" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
            </MultiTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="TreeListViewRowCoreStyle" TargetType="treeList:TreeListViewRow">
        <Setter Property="Template" Value="{StaticResource TreeListViewRowCoreTemplate}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="AllowDrop" Value="True"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <ControlTemplate x:Key="TreeListViewRowCoreValidationTemplate" TargetType="treeList:TreeListViewRow">
        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup>
                    <VisualState x:Name="Unselected"/>
                    <VisualState x:Name="SelectedUnfocused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Selected_Unfocused" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Selected" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Selected">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Selected" 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/>
                </Grid.ColumnDefinitions>
                <Border x:Name="Background_Main"
                        Grid.Column="2"
                        Grid.ColumnSpan="2"
                        Background="{TemplateBinding Background}"
                        Margin="{TemplateBinding Margin}"
                        Padding="{TemplateBinding Padding}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                <Border x:Name="Background_Invalid"
                        Grid.Column="1"
                        Grid.ColumnSpan="4"
                        Background="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                        Opacity="0.3"
                        Visibility="Collapsed"/>
                <Border
                        Width="31"
                        Background="{TemplateBinding Background}"
                        Visibility="{TemplateBinding RowIndicatorVisibility}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
                <Border x:Name="PART_RowBorder"
                        Grid.ColumnSpan="4"
                        BorderBrush="{TemplateBinding HorizontalGridLinesBrush}"
                        BorderThickness="{Binding HorizontalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Bottom}"/>
                <Border x:Name="Background_Over" Grid.ColumnSpan="4" Background="{telerik1:FluentResource ResourceKey=MouseOverBrush}" Visibility="Collapsed" Margin="0 0 0 1"/>
                <Border x:Name="Background_Selected_Unfocused" Grid.ColumnSpan="4" Background="{telerik1:FluentResource ResourceKey=PressedBrush}" Visibility="Collapsed" Margin="0 0 0 1"/>
                <Border x:Name="Background_Selected" Grid.ColumnSpan="4" Background="{telerik1:FluentResource ResourceKey=PressedBrush}" Visibility="Collapsed"/>
                <controls:GridViewToggleButton x:Name="PART_ExpandButton"
                        AutomationProperties.Name="expander"
                        Width="31"
                        Height="NaN"
                        Grid.Column="1"
                        Grid.ColumnSpan="2"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Stretch"
                        IsTabStop="False"
                        IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                        PresentationMode="Arrow"/>
                <Border x:Name="PART_IndicatorPresenter"
                        Width="31"
                        VerticalAlignment="Stretch"
                        BorderBrush="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"
                        BorderThickness="0 0 1 0"
                        Visibility="{TemplateBinding RowIndicatorVisibility}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical">
                    <Grid>
                        <Grid x:Name="NavigatorIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed">
                            <telerik:RadGlyph x:Name="IconRight"
                                    Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                                    FontSize="16"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Glyph="{StaticResource GlyphArrowChevronRight}"/>
                        </Grid>
                        <Grid x:Name="EditIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed">
                            <telerik:RadGlyph
                                    Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                                    FontSize="16"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Glyph="{StaticResource GlyphComment}"/>
                        </Grid>
                        <Grid x:Name="InvalidEditableIndicator" Visibility="Collapsed" Background="Transparent">
                            <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
                                <telerik:RadGlyph
                                        Foreground="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                                        FontSize="16"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Glyph="{StaticResource GlyphComment}"/>
                            </Grid>
                            <ToolTipService.ToolTip>
                                <ToolTip Placement="Bottom" Content="{TemplateBinding Errors}" Template="{StaticResource GridViewValidationToolTipTemplate}"/>
                            </ToolTipService.ToolTip>
                        </Grid>
                        <Grid x:Name="ErrorIndicator" HorizontalAlignment="Center" Width="16" Height="16" VerticalAlignment="Center" Visibility="Collapsed">
                            <telerik:RadGlyph
                                    Foreground="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                                    FontSize="16"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Glyph="{StaticResource GlyphWarning}"/>
                            <ToolTipService.ToolTip>
                                <ToolTip Placement="Bottom" Content="{TemplateBinding Errors}" Template="{StaticResource GridViewValidationToolTipTemplate}"/>
                            </ToolTipService.ToolTip>
                        </Grid>
                        <Border x:Name="PART_RowResizer" Background="Transparent" Height="4" VerticalAlignment="Bottom" Cursor="SizeNS"/>
                    </Grid>
                </Border>
                <grid:DataCellsPresenter x:Name="PART_DataCellsPresenter" Grid.ColumnSpan="2" Grid.Column="1">
                    <grid:DataCellsPresenter.ItemsPanel>
                        <ItemsPanelTemplate>
                            <treeList:TreeListCellsPanel/>
                        </ItemsPanelTemplate>
                    </grid:DataCellsPresenter.ItemsPanel>
                </grid:DataCellsPresenter>
            </grid:SelectiveScrollingGrid>
        </Border>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                    <Condition Property="IsValid" Value="True"/>
                    <Condition Property="IsSelected" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="Background_Over" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsValid" Value="False"/>
                    <Condition Property="IsInEditMode" Value="False"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="Background_Invalid" Property="Visibility" Value="Visible"/>
                <Setter TargetName="ErrorIndicator" Property="Visibility" Value="Visible"/>
                <Setter TargetName="Background_Selected_Unfocused" Property="Background" Value="{x:Null}"/>
                <Setter TargetName="Background_Main" Property="Visibility" Value="Collapsed"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsValid" Value="False"/>
                    <Condition Property="IsInEditMode" Value="True"/>
                    <Condition Property="DisplayVisualCues" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="Background_Invalid" Property="Visibility" Value="Visible"/>
                <Setter TargetName="InvalidEditableIndicator" Property="Visibility" Value="Visible"/>
                <Setter TargetName="Background_Selected_Unfocused" Property="Background" Value="{x:Null}"/>
                <Setter TargetName="Background_Main" Property="Visibility" Value="Collapsed"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsValid" Value="True"/>
                    <Condition Property="IsInEditMode" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="EditIndicator" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsValid" Value="True"/>
                    <Condition Property="IsCurrent" Value="True"/>
                    <Condition Property="IsInEditMode" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="NavigatorIndicator" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="TreeListViewRowCoreValidationStyle" TargetType="treeList:TreeListViewRow">
        <Setter Property="Template" Value="{StaticResource TreeListViewRowCoreValidationTemplate}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="AllowDrop" Value="True"/>
    </Style>
    <ControlTemplate x:Key="ClearSearchValueButtonTemplate" TargetType="telerik:RadButton">
        <Border x:Name="ButtonBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <telerik:RadGlyph Foreground="{TemplateBinding Foreground}" FontSize="16" Glyph="{StaticResource GlyphClose}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        </Border>
    </ControlTemplate>
    <Style x:Key="ClearSearchValueButtonStyle" TargetType="telerik:RadButton">
        <Setter Property="Template" Value="{StaticResource ClearSearchValueButtonTemplate}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Width" Value="28"/>
        <Setter Property="Height" Value="28"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=AccentMouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=AccentPressedBrush}"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="CloseSearchValueButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource ClearSearchValueButtonStyle}">
        <Setter Property="Margin" Value="0 5 5 5"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="GridViewSearchPanelTemplate" TargetType="grid:GridViewSearchPanel">
        <Border BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid UseLayoutRounding="True">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock
                            telerik:LocalizationManager.ResourceKey="GridViewSearchPanelTopText"
                            TextWrapping="Wrap"
                            Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            IsHitTestVisible="False"/>
                    <Grid Grid.Column="1" Margin="10 0" VerticalAlignment="Center">
                        <TextBox x:Name="PART_SearchAsYouTypeTextBox"
                                AutomationProperties.Name="search as you type textBox"
                                Text="{Binding SearchText, Mode=TwoWay}"
                                MinWidth="160"
                                MaxWidth="200"
                                Padding="5 3 15 3"
                                telerik:TextBoxBehavior.UpdateTextOnEnter="True"
                                IsTabStop="{TemplateBinding IsTabStop}"
                                FontSize="{TemplateBinding FontSize}"
                                FontFamily="{TemplateBinding FontFamily}"
                                MinHeight="28"/>
                        <telerik:RadButton x:Name="ClearButton"
                                IsTabStop="False"
                                Visibility="Collapsed"
                                Style="{StaticResource ClearSearchValueButtonStyle}"
                                Command="searchPanel:GridViewSearchPanelCommands.ClearSearchValue"/>
                        <Grid.Triggers>
                            <EventTrigger RoutedEvent="MouseEnter">
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ClearButton" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </EventTrigger>
                            <EventTrigger RoutedEvent="MouseLeave">
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ClearButton" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </EventTrigger>
                        </Grid.Triggers>
                    </Grid>
                </Grid>
                <telerik:RadButton x:Name="CloseButton"
                        Style="{StaticResource CloseSearchValueButtonStyle}"
                        Visibility="{TemplateBinding CloseButtonVisibility}"
                        Grid.Column="1"
                        IsBackgroundVisible="False"
                        IsTabStop="False"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"
                        Command="controls:RadGridViewCommands.CloseSearchPanel"/>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="GridViewSearchPanelStyle" TargetType="grid:GridViewSearchPanel">
        <Setter Property="Template" Value="{StaticResource GridViewSearchPanelTemplate}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Padding" Value="5"/>
        <Setter Property="MinHeight" Value="38"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="IsTabStop" Value="False"/>
    </Style>
    <Style TargetType="grid:GridViewSearchPanel" BasedOn="{StaticResource GridViewSearchPanelStyle}"/>
    <Style x:Key="HighlightTextBlockStyle" TargetType="grid:HighlightTextBlock">
        <Setter Property="HighlightBrush" Value="{telerik1:FluentResource ResourceKey=ValidationBrush}"/>
    </Style>
    <Style TargetType="grid:HighlightTextBlock" BasedOn="{StaticResource HighlightTextBlockStyle}"/>
    <Style x:Key="PinUnpinPathStyle" TargetType="Path">
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="StrokeThickness" Value="0"/>
        <Setter Property="Width" Value="12"/>
        <Setter Property="Height" Value="12"/>
        <Setter Property="Stretch" Value="Uniform"/>
    </Style>
    <Style x:Key="GridViewPinButtonStyle" TargetType="grid:GridViewPinButton">
        <Setter Property="PathStyle" Value="{StaticResource PinUnpinPathStyle}"/>
        <Setter Property="PathGeometry" Value="{telerik:RadGlyph Glyph={StaticResource GlyphUnpin}, Font=TelerikWebUI, Type=Path}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
        <Setter Property="MinHeight" Value="28"/>
        <Setter Property="MinWidth" Value="22"/>
        <Setter Property="IsBackgroundVisible" Value="False"/>
        <Setter Property="Command" Value="{x:Static telerik:RadGridViewCommands.TogglePinnedRowState}"/>
        <Setter Property="CommandParameter" Value="{Binding}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Padding" Value="0 0 2 0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadPathButton">
                    <Grid Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="BackgroundVisibility">
                                <VisualState x:Name="BackgroundIsHidden">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="BackgroundIsVisible"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="OuterBorder"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding CornerRadius}"/>
                        <Path x:Name="Path"
                                Fill="{TemplateBinding Foreground}"
                                Style="{TemplateBinding PathStyle}"
                                Data="{TemplateBinding PathGeometry}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                Margin="{TemplateBinding Padding}"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=AccentMouseOverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=AccentPressedBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsPinned" Value="True">
                <Setter Property="PathGeometry" Value="{telerik:RadGlyph Glyph={StaticResource GlyphPin}, Font=TelerikWebUI, Type=Path}"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style TargetType="grid:GridViewPinButton" BasedOn="{StaticResource GridViewPinButtonStyle}"/>
    <ControlTemplate x:Key="SearchAutoCompleteBoxCloseButtonControlTemplate" TargetType="telerik:RadButton">
        <Grid x:Name="LayoutRoot" Background="Transparent">
            <Ellipse x:Name="Background" Fill="{TemplateBinding Background}" Stroke="{x:Null}" StrokeThickness="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
            <telerik:RadGlyph x:Name="Content"
                    Margin="{TemplateBinding Padding}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    FontSize="16"
                    Foreground="{TemplateBinding Foreground}"
                    Glyph="{StaticResource GlyphClose}"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" TargetName="Content" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="SearchAutoCompleteBoxCloseButtonStyle" TargetType="telerik:RadButton">
        <Setter Property="Template" Value="{StaticResource SearchAutoCompleteBoxCloseButtonControlTemplate}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"/>
        <Setter Property="Width" Value="16"/>
        <Setter Property="Height" Value="16"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Margin" Value="2 1"/>
        <Setter Property="BorderThickness" Value="0"/>
    </Style>
    <Style x:Key="SearchAutoCompleteBoxItemStyle" TargetType="mccb:SearchAutoCompleteBoxItem">
        <Setter Property="mat:MaterialAssist.CornerRadius" Value="12"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=AccentBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Padding" Value="5 4"/>
        <Setter Property="Margin" Value="1 1 0 0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="mccb:SearchAutoCompleteBoxItem">
                    <Grid>
                        <Border x:Name="BorderVisual"
                                Background="{TemplateBinding Background}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <ContentPresenter x:Name="contentPresenter"
                                        Margin="{TemplateBinding Padding}"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                        TextBlock.Foreground="{TemplateBinding Foreground}"/>
                                <telerik:RadButton x:Name="RemoveItemButton"
                                        Grid.Column="1"
                                        HorizontalAlignment="Right"
                                        VerticalAlignment="Stretch"
                                        CommandParameter="{Binding}"
                                        Cursor="Arrow"
                                        IsTabStop="False"
                                        Focusable="False"
                                        Command="mccb:SearchAutoCompleteBoxCommands.RemoveItem"
                                        Style="{StaticResource SearchAutoCompleteBoxCloseButtonStyle}"/>
                            </Grid>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="SearchAutoCompleteBoxTemplate" TargetType="mccb:SearchAutoCompleteBox">
        <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="ReadOnlyVisual"
                    BorderBrush="{telerik1:FluentResource ResourceKey=ReadOnlyBorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{telerik1:FluentResource ResourceKey=ReadOnlyBackgroundBrush}"
                    CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Visibility="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"/>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Height="{TemplateBinding Height}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    BorderThickness="0"
                    Padding="0"
                    Background="Transparent"
                    IsTabStop="False"
                    Focusable="False"
                    Margin="{TemplateBinding BorderThickness}"
                    HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                    VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                <mccb:SearchAutoCompleteBoxesItemsControl x:Name="PART_Boxes"
                        SelectionBoxesVisibility="{TemplateBinding SelectionBoxesVisibility}"
                        IsTabStop="False"
                        Foreground="{TemplateBinding Foreground}"
                        Margin="{TemplateBinding Padding}"
                        ItemsSource="{TemplateBinding SelectedItems}">
                    <mccb:SearchAutoCompleteBoxesItemsControl.Editor>
                        <telerik:RadWatermarkTextBox x:Name="WatermarkTextBox"
                                AutomationProperties.Name="{TemplateBinding AutomationProperties.Name}"
                                SelectionOnFocus="{TemplateBinding SelectionOnFocus}"
                                BorderThickness="0"
                                Background="Transparent"
                                mat:MaterialAssist.FocusBrush="{x:Null}"
                                IsReadOnly="{TemplateBinding IsReadOnly}"
                                ReadOnlyBackground="{x:Null}"
                                DisabledBackground="{x:Null}"
                                WatermarkBehavior="HideOnTextEntered"
                                WatermarkContent="{TemplateBinding NullText}"
                                MinWidth="{TemplateBinding EditorMinWidth}"
                                Foreground="{TemplateBinding Foreground}"
                                FontSize="{TemplateBinding FontSize}"
                                FontFamily="{TemplateBinding FontFamily}"/>
                    </mccb:SearchAutoCompleteBoxesItemsControl.Editor>
                    <mccb:SearchAutoCompleteBoxesItemsControl.ItemsPanel>
                        <ItemsPanelTemplate>
                            <mccb:SearchAutoCompleteBoxWrapPanel/>
                        </ItemsPanelTemplate>
                    </mccb:SearchAutoCompleteBoxesItemsControl.ItemsPanel>
                </mccb:SearchAutoCompleteBoxesItemsControl>
            </ScrollViewer>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="ShowNullText" Value="False">
                <Setter TargetName="WatermarkTextBox" Property="WatermarkContent" Value="{x:Null}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="SearchAutoCompleteBoxStyle" TargetType="mccb:SearchAutoCompleteBox">
        <Setter Property="Template" Value="{StaticResource SearchAutoCompleteBoxTemplate}"/>
        <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadius}"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    </Style>
    <Style TargetType="mccb:SearchAutoCompleteBoxItem" BasedOn="{StaticResource SearchAutoCompleteBoxItemStyle}"/>
    <Style TargetType="mccb:SearchAutoCompleteBox" BasedOn="{StaticResource SearchAutoCompleteBoxStyle}"/>
    <Style TargetType="controls:RadMultiColumnComboBox" x:Key="RadMultiColumnComboBoxStyle">
        <Style.Setters>
            <Setter Property="mat:MaterialAssist.FocusBrush" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
            <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=PrimaryMouseOverBrush}"/>
            <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBrush}"/>
            <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
            <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
            <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
            <Setter Property="MinHeight" Value="28"/>
            <Setter Property="DropDownMinWidth" Value="125"/>
            <Setter Property="DropDownMinHeight" Value="100"/>
            <Setter Property="DropDownHeight" Value="330"/>
            <Setter Property="DropDownMaxHeight" Value="500"/>
            <Setter Property="DropDownMaxWidth" Value="1000"/>
            <Setter Property="EditorMinWidth" Value="50"/>
            <Setter Property="SnapsToDevicePixels" Value="True"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="IsTabStop" Value="False"/>
            <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="controls:RadMultiColumnComboBox">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Border x:Name="BackgroundVisual"
                                    Grid.ColumnSpan="2"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                    Background="{TemplateBinding Background}"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"/>
                            <mccb:SearchAutoCompleteBox x:Name="PART_SearchAutoCompleteBox"
                                    Grid.Column="0"
                                    AutomationProperties.Name="{TemplateBinding AutomationProperties.Name}"
                                    SelectionOnFocus="{TemplateBinding SelectionOnFocus}"
                                    SelectionBoxesVisibility="{TemplateBinding SelectionBoxesVisibility}"
                                    IsReadOnly="{TemplateBinding IsReadOnly}"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                    DeferTextChange="{TemplateBinding DeferTextChange}"
                                    NullText="{TemplateBinding NullText}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    SelectedItems="{TemplateBinding SelectedItems}"
                                    EditorMinWidth="{TemplateBinding EditorMinWidth}"
                                    SelectionBoxTemplate="{TemplateBinding SelectionBoxTemplate}"
                                    SelectionBoxTemplateSelector="{TemplateBinding SelectionBoxTemplateSelector}"
                                    SelectionBoxStyle="{TemplateBinding SelectionBoxStyle}"
                                    SelectionBoxStyleSelector="{TemplateBinding SelectionBoxStyleSelector}"
                                    AutoCompleteProvider="{TemplateBinding AutoCompleteProvider}"/>
                            <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                                    Grid.Column="1"
                                    Padding="0"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                    BorderThickness="{Binding RelativeSource={RelativeSource TemplatedParent},Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                                    BorderBrush="Transparent"
                                    IsTabStop="False"
                                    mat:MaterialAssist.FocusBrush="{x:Null}"
                                    KeepOpen="{TemplateBinding KeepDropDownOpen}"
                                    PopupPlacementTarget="{Binding ElementName=BackgroundVisual}"
                                    DropDownWidth="{TemplateBinding DropDownWidth}"
                                    DropDownHeight="{TemplateBinding DropDownHeight}"
                                    DropDownMinWidth="{TemplateBinding DropDownMinWidth}"
                                    DropDownMinHeight="{TemplateBinding DropDownMinHeight}"
                                    DropDownMaxHeight="{TemplateBinding DropDownMaxHeight}"
                                    DropDownMaxWidth="{TemplateBinding DropDownMaxWidth}"
                                    DropDownPlacement="{TemplateBinding DropDownPlacement}">
                                <telerik:RadDropDownButton.DropDownContent>
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition/>
                                            <ColumnDefinition Width="Auto"/>
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition/>
                                            <RowDefinition Height="Auto"/>
                                        </Grid.RowDefinitions>
                                        <ContentControl Content="{TemplateBinding ItemsSourceProvider}" Grid.ColumnSpan="2" Grid.RowSpan="1">
                                            <ContentControl.ContentTemplate>
                                                <DataTemplate>
                                                    <controls:RadGridView
                                                            GroupRenderMode="Flat"
                                                            CanUserSearchInHiddenColumns="{Binding CanUserSearchInHiddenColumns}"
                                                            AutoGenerateColumns="{Binding AutoGenerateColumns}"
                                                            AlternateRowStyle="{Binding AlternateRowStyle}"
                                                            AlternateRowStyleSelector="{Binding AlternateRowStyleSelector}"
                                                            RowStyle="{Binding RowStyle}"
                                                            RowStyleSelector="{Binding RowStyleSelector}"
                                                            AlternationCount="{Binding AlternationCount}"
                                                            ShowColumnFooters="{Binding ShowColumnFooters}"
                                                            ShowColumnHeaders="{Binding ShowColumnHeaders}"
                                                            ColumnWidth="{Binding ColumnWidth}"
                                                            ContextMenu="{Binding ContextMenu}"
                                                            IsReadOnly="{Binding IsReadOnly}"
                                                            RowIndicatorVisibility="{Binding RowIndicatorVisibility}"
                                                            ShowSearchPanel="False"
                                                            ShowGroupPanel="False"
                                                            CanUserGroupColumns="False"
                                                            CanUserSearch="False"
                                                            DataContext="{Binding}"
                                                            SelectionMode="Extended"
                                                            EnableLostFocusSelectedState="False"
                                                            SearchStateManager="{Binding SearchStateManager}"
                                                            ItemsSource="{Binding CollectionView}"
                                                            IsSynchronizedWithCurrentItem="False"
                                                            BorderThickness="0"/>
                                                </DataTemplate>
                                            </ContentControl.ContentTemplate>
                                        </ContentControl>
                                        <Border
                                                Grid.Row="1"
                                                Grid.ColumnSpan="2"
                                                BorderThickness="0 1 0 0"
                                                BorderBrush="{telerik1:FluentResource ResourceKey=BasicBrush}"
                                                Background="{telerik1:FluentResource ResourceKey=AlternativeBrush}"
                                                Visibility="{TemplateBinding FooterVisibility}">
                                            <ContentPresenter x:Name="Footer" Margin="5" Content="{TemplateBinding FooterContent}" ContentTemplate="{TemplateBinding FooterContentTemplate}" VerticalAlignment="Center">
                                                <ContentPresenter.Resources>
                                                    <Style TargetType="TextBlock">
                                                        <Setter Property="TextTrimming" Value="CharacterEllipsis"/>
                                                        <Setter Property="Margin" Value="{Binding ElementName=CornerResizerIcon, Path=ActualWidth, Converter={StaticResource DoubleToThicknessConverter}, ConverterParameter=Right}"/>
                                                    </Style>
                                                </ContentPresenter.Resources>
                                            </ContentPresenter>
                                        </Border>
                                        <Path x:Name="CornerResizerIcon"
                                                Grid.Row="1"
                                                Grid.ColumnSpan="2"
                                                Data="M8.0,0 L12,0 12,8 12,12 8.0,12 0,12 0,8 8.0,8 z"
                                                Fill="{telerik1:FluentResource ResourceKey=ComplementaryBrush}"
                                                Stretch="Fill"
                                                StrokeThickness="0"
                                                HorizontalAlignment="Right"
                                                VerticalAlignment="Bottom"
                                                Width="12"
                                                Height="12"
                                                Margin="2"
                                                Visibility="{TemplateBinding FooterVisibility}"/>
                                        <Thumb x:Name="PART_HorizontalResizer"
                                                Grid.Column="1"
                                                Grid.RowSpan="2"
                                                Opacity="0"
                                                Width="3"
                                                Cursor="SizeWE"
                                                HorizontalAlignment="Right"
                                                Visibility="{Binding CanUserResizeDropDown, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"/>
                                        <Thumb x:Name="PART_CornerResizer"
                                                Grid.Column="1"
                                                Grid.RowSpan="2"
                                                Opacity="0"
                                                Height="3"
                                                Width="3"
                                                Cursor="SizeNWSE"
                                                VerticalAlignment="Bottom"
                                                HorizontalAlignment="Right"
                                                Visibility="{Binding CanUserResizeDropDown, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"/>
                                        <Thumb x:Name="PART_VerticalResizer"
                                                Grid.Column="0"
                                                Grid.RowSpan="2"
                                                Opacity="0"
                                                Height="3"
                                                Cursor="SizeNS"
                                                VerticalAlignment="Bottom"
                                                Visibility="{Binding CanUserResizeDropDown, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"/>
                                    </Grid>
                                </telerik:RadDropDownButton.DropDownContent>
                            </telerik:RadDropDownButton>
                            <Border x:Name="FocusVisual"
                                    Grid.ColumnSpan="2"
                                    IsHitTestVisible="False"
                                    BorderBrush="{TemplateBinding mat:MaterialAssist.FocusBrush}"
                                    BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                                    CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"
                                    Visibility="Collapsed"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="PART_SearchAutoCompleteBox" Property="Background" Value="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"/>
                                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
                            </Trigger>
                            <Trigger SourceName="PART_DropDownButton" Property="IsOpen" Value="True">
                                <Setter TargetName="PART_SearchAutoCompleteBox" Property="Background" Value="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"/>
                            </Trigger>
                            <Trigger Property="IsReadOnly" Value="True">
                                <Setter Property="BorderThickness" Value="{telerik1:FluentResource ResourceKey=FocusThickness}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter TargetName="PART_DropDownButton" Property="Background" Value="{x:Null}"/>
                            </Trigger>
                            <Trigger Property="IsKeyboardFocusWithin" Value="True">
                                <Setter TargetName="PART_SearchAutoCompleteBox" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                                <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
                                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
                            </Trigger>
                            <Trigger Property="Validation.HasError" Value="True">
                                <Setter TargetName="FocusVisual" Property="Visibility" Value="Collapsed"/>
                            </Trigger>
                            <Trigger Property="DropDownWidth" Value="NaN">
                                <Setter TargetName="PART_DropDownButton" Property="DropDownWidth" Value="{Binding RelativeSource={RelativeSource AncestorType=controls:RadMultiColumnComboBox}, Path=ActualWidth}"/>
                            </Trigger>
                            <Trigger Property="FooterVisibility" Value="Visible">
                                <Setter TargetName="PART_CornerResizer" Property="Width" Value="{Binding ElementName=CornerResizerIcon, Path=Width}"/>
                                <Setter TargetName="PART_CornerResizer" Property="Height" Value="{Binding ElementName=CornerResizerIcon, Path=Height}"/>
                                <Setter TargetName="PART_CornerResizer" Property="Grid.Row" Value="1"/>
                                <Setter TargetName="PART_VerticalResizer" Property="Grid.Row" Value="1"/>
                            </Trigger>
                            <Trigger Property="CanUserResizeDropDown" Value="False">
                                <Setter TargetName="CornerResizerIcon" Property="Visibility" Value="Collapsed"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style.Setters>
    </Style>
    <Style TargetType="controls:RadMultiColumnComboBox" BasedOn="{StaticResource RadMultiColumnComboBoxStyle}"/>
</ResourceDictionary>
