<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:dataPager="clr-namespace:Telerik.Windows.Controls.Data.DataPager;assembly=Telerik.Windows.Controls.Data"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="c"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Data"
        xmlns:telerikData="clr-namespace:Telerik.Windows.Data;assembly=Telerik.Windows.Data"
        xmlns:dataFilter="clr-namespace:Telerik.Windows.Controls.Data.DataFilter;assembly=Telerik.Windows.Controls.Data"
        xmlns:dataForm="clr-namespace:Telerik.Windows.Controls.Data.DataForm;assembly=Telerik.Windows.Controls.Data"
        xmlns:propertyGrid="clr-namespace:Telerik.Windows.Controls.Data.PropertyGrid;assembly=Telerik.Windows.Controls.Data"
        xmlns:collectionNavigator="clr-namespace:Telerik.Windows.Controls.Data.CollectionNavigator;assembly=Telerik.Windows.Controls.Data">
    <dataFilter:LogicalOperatorToCheckedConverter x:Key="LogicalOperatorToCheckedConverter"/>
    <dataFilter:FilterMemberToEnabledConverter x:Key="FilterMemberToEnabledConverter"/>
    <dataFilter:FilterOperatorToSelectedItemConverter x:Key="FilterOperatorToSelectedItemConverter"/>
    <collectionNavigator:CommandsButtonsVisibilityConverter x:Key="VisibilityConverter"/>
    <telerik:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
    <telerik:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
    <telerikData:FilterCompositionLogicalOperatorConverter x:Key="LogicalOperatorConverter"/>
    <telerikData:FilterOperatorConverter x:Key="FilterOperatorConverter"/>
    <dataForm:DescriptionVisibilityConverter x:Key="DescriptionVisibilityConverter"/>
    <propertyGrid:FlatItemSourceConverter x:Key="FlatItemSourceConverter"/>
    <propertyGrid:HeaderVisibilityConverter x:Key="HeaderVisibilityConverter"/>
    <LinearGradientBrush x:Key="RadPager_Background" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB5B5B5"/>
        <GradientStop Color="#FFF0F0F0" Offset="0.5"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RadPager_Border" Color="#FF848484"/>
    <SolidColorBrush x:Key="RadPager_Foreground" Color="Black"/>
    <SolidColorBrush x:Key="RadPager_Indicator" Color="Black"/>
    <SolidColorBrush x:Key="RadPager_Separator1" Color="White"/>
    <SolidColorBrush x:Key="RadPager_Separator2" Color="#FF848484"/>
    <LinearGradientBrush x:Key="RadPager_Page_Background" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="White" Offset="0.216"/>
        <GradientStop Color="#FFBDBDBD"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RadPager_Page_Border" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF494949" Offset="0"/>
        <GradientStop Color="#FF9D9D9D" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RadPager_Page_TopShadow" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#66000000" Offset="0"/>
        <GradientStop Offset="0.3"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RadPager_Page_Checked" EndPoint="0.5,0.99" StartPoint="0.5,0.01">
        <GradientStop Color="#FFFFDB7B" Offset="0.5"/>
        <GradientStop Color="#FFC58124"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RadPager_Page_Over" EndPoint="0.5,0.99" StartPoint="0.5,0.01">
        <GradientStop Color="#FFFFFBB7" Offset="0.216"/>
        <GradientStop Color="#FFBDBDBD"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RadPager_Page_Disabled" EndPoint="0.5,0.99" StartPoint="0.5,0.01">
        <GradientStop Color="#FFD8D8D8" Offset="0.216"/>
        <GradientStop Color="#FFBDBDBD"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RadPager_NumericPresenter_Background" Color="#FF929292"/>
    <LinearGradientBrush x:Key="RadPager_NumericPresenter_Border" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF494949" Offset="0"/>
        <GradientStop Color="#FF9D9D9D" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="FilterControl_Background" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="White" Offset="0"/>
        <GradientStop Color="#FFCDCDCD" Offset="1"/>
        <GradientStop Color="#FFCECECE" Offset="0.42"/>
        <GradientStop Color="#FFAFAFAF" Offset="0.43"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="FilterControl_Border" Color="#FF5F5F5F"/>
    <SolidColorBrush x:Key="FilterControl_InnerBorder" Color="White"/>
    <SolidColorBrush x:Key="FilterControl_Foreground" Color="Black"/>
    <LinearGradientBrush x:Key="RemoveFilterButton_Border" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF83A5D2" Offset="0"/>
        <GradientStop Color="#FFE7F1FF" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RemoveFilterButton_Background" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF943434" Offset="1"/>
        <GradientStop Color="#FFFF3800"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RemoveFilterButton_Background_Over" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFDE4646" Offset="1"/>
        <GradientStop Color="#FFFF8B6A"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RemoveFilterButton_Background_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF943434"/>
        <GradientStop Color="#FFFF3800" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RemoveFilterButton_Foreground" Color="White"/>
    <LinearGradientBrush x:Key="AddFilterButton_Border" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF83A5D2" Offset="0"/>
        <GradientStop Color="#FFE7F1FF" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="AddFilterButton_Background" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF4D9434" Offset="1"/>
        <GradientStop Color="#FF71FF00"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="AddFilterButton_Background_Over" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF5AB13C" Offset="1"/>
        <GradientStop Color="#FFB1FF72"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="AddFilterButton_Background_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF4D9434"/>
        <GradientStop Color="#FF71FF00" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="AddFilterButton_Foreground" Color="White"/>
    <SolidColorBrush x:Key="ControlBackground" Color="White"/>
    <SolidColorBrush x:Key="ControlOuterBorder" Color="#FF848484"/>
    <SolidColorBrush x:Key="DataForm_HeaderOuterBorder" Color="#FF282828"/>
    <SolidColorBrush x:Key="DataForm_HeaderInnerBorder" Color="#FFB5B5B5"/>
    <LinearGradientBrush x:Key="DataForm_HeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF5B5B5B" Offset="1"/>
        <GradientStop Color="#FF868686"/>
        <GradientStop Color="#FF4F4F4F" Offset="0.42"/>
        <GradientStop Color="#FF0E0E0E" Offset="0.43"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="DataForm_CollectionNavigatorBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="White" Offset="0"/>
        <GradientStop Color="#FFCDCDCD" Offset="1"/>
        <GradientStop Color="#FFCECECE" Offset="0.42"/>
        <GradientStop Color="#FFAFAFAF" Offset="0.43"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="DataForm_FooterPanel_Background" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB5B5B5"/>
        <GradientStop Color="#FFF0F0F0" Offset="0.5"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="DataForm_HeaderForeground" Color="White"/>
    <SolidColorBrush x:Key="DataForm_CollectionNavigator_Border" Color="#FF848484"/>
    <SolidColorBrush x:Key="DataFormPanel_Border" Color="#FF848484"/>
    <SolidColorBrush x:Key="NagigatorIconColor" Color="Black"/>
    <SolidColorBrush x:Key="DataField_Background" Color="Transparent"/>
    <SolidColorBrush x:Key="DataField_BorderBrush" Color="Transparent"/>
    <SolidColorBrush x:Key="DataField_Foreground" Color="Black"/>
    <LinearGradientBrush x:Key="Background_Disabled" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#7F000000"/>
        <GradientStop Color="#7F000000" Offset="1"/>
        <GradientStop Color="#33000000" Offset="0.5"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ValidationSummary_Foreground" Color="#FFFF0000"/>
    <SolidColorBrush x:Key="ValidationSummary_Background" Color="#FFBFBFBF"/>
    <SolidColorBrush x:Key="ValidationSummary_BorderBrush" Color="White"/>
    <SolidColorBrush x:Key="PropertyGrid_NavigatorIndicatorBackground" Color="#FF848484"/>
    <SolidColorBrush x:Key="ControlInnerBorder" Color="White"/>
    <SolidColorBrush x:Key="PropertyGrid_IndentCellBackground" Color="#FFE4E4E4"/>
    <LinearGradientBrush x:Key="PropertyGrid_HeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="White" Offset="0"/>
        <GradientStop Color="#FFCDCDCD" Offset="1"/>
        <GradientStop Color="#FFCECECE" Offset="0.42"/>
        <GradientStop Color="#FFAFAFAF" Offset="0.43"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlForeground" Color="#FF000000"/>
    <SolidColorBrush x:Key="PropertyGrid_DescriptionBackground" Color="#FFBFBFBF"/>
    <SolidColorBrush x:Key="PropertyGrid_TemplatesBorderBrush" Color="#FFCBCBCB"/>
    <SolidColorBrush x:Key="PropertyGrid_SearchIndicator_Background" Color="#FF919191"/>
    <SolidColorBrush x:Key="ToggleButton_Indicator" Color="Black"/>
    <SolidColorBrush x:Key="RadioButton_Indicator" Color="Black"/>
    <SolidColorBrush x:Key="ItemOuterBorder_Selected" Color="#FFFFC92B"/>
    <SolidColorBrush x:Key="ItemInnerBorder_Selected" Color="White"/>
    <LinearGradientBrush x:Key="ItemBackground_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFCE79F" Offset="1"/>
        <GradientStop Color="#FFFDD3A8"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ItemOuterBorder_Over" Color="#FFFFC92B"/>
    <SolidColorBrush x:Key="ItemInnerBorder_Over" Color="White"/>
    <LinearGradientBrush x:Key="ItemBackground_Over" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFBA3" Offset="1"/>
        <GradientStop Color="#FFFFFBDA" Offset="0"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="GridView_ToggleButtonBorder" EndPoint="0.854,0.854" StartPoint="0.146,0.146">
        <GradientStop Color="#FF282828" Offset="1"/>
        <GradientStop Color="#FFBFBFBF"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="GridView_ToggleButtonBackground" EndPoint="0.854,0.854" StartPoint="0.146,0.146">
        <GradientStop Color="#FFD1D1D1" Offset="1"/>
        <GradientStop Color="White"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="GridView_ToggleButtonForeground" Color="#FF9D9D9D"/>
    <SolidColorBrush x:Key="GridView_ToggleButtonStroke" Color="Black"/>
    <SolidColorBrush x:Key="CollectionEditor_HeaderOuterBorder" Color="#FF282828"/>
    <SolidColorBrush x:Key="CollectionEditor_HeaderInnerBorder" Color="#FFB5B5B5"/>
    <LinearGradientBrush x:Key="CollectionEditor_HeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF5B5B5B" Offset="1"/>
        <GradientStop Color="#FF868686"/>
        <GradientStop Color="#FF4F4F4F" Offset="0.42"/>
        <GradientStop Color="#FF0E0E0E" Offset="0.43"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="CollectionEditor_CollectionNavigatorBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="White" Offset="0"/>
        <GradientStop Color="#FFCDCDCD" Offset="1"/>
        <GradientStop Color="#FFCECECE" Offset="0.42"/>
        <GradientStop Color="#FFAFAFAF" Offset="0.43"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="CollectionEditor_FooterPanel_Background" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB5B5B5"/>
        <GradientStop Color="#FFF0F0F0" Offset="0.5"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="CollectionEditor_HeaderForeground" Color="White"/>
    <SolidColorBrush x:Key="TextBoxBackground_ReadOnly" Color="#5EC9C9C9"/>
    <CornerRadius x:Key="ControlOuterBorder_CornerRadius">1</CornerRadius>
    <SolidColorBrush x:Key="ControlOuterBorder_Disabled" Color="#FF989898"/>
    <SolidColorBrush x:Key="ControlForeground_Normal" Color="#FF000000"/>
    <SolidColorBrush x:Key="ControlOuterBorder_Normal" Color="#FF848484"/>
    <SolidColorBrush x:Key="ControlOuterBorder_MouseOver" Color="#FFFFC92B"/>
    <SolidColorBrush x:Key="ControlOuterBorder_Focused" Color="#FFFFC92B"/>
    <SolidColorBrush x:Key="PickerBackground_Normal" Color="#FFFFFFFF"/>
    <CornerRadius x:Key="ValidationTooltipCornerRadius">1</CornerRadius>
    <CornerRadius x:Key="ValidationTooltip_CornerRadius">1</CornerRadius>
    <SolidColorBrush x:Key="ValidationTooltipForeground" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="ValidationTooltipOuterBorder" Color="#FFDC000C"/>
    <SolidColorBrush x:Key="ValidationTooltipInnerBorder" Color="#FFFFFFFF"/>
    <LinearGradientBrush x:Key="ValidationTooltipBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFF424C" Offset="1"/>
        <GradientStop Color="#FFC92931"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ValidationInnerTick" Color="#FFCB576E"/>
    <SolidColorBrush x:Key="ValidationOuterTick" Color="#FFFFFFFF"/>
    <ControlTemplate x:Key="ErrorTooltipTemplate" TargetType="ToolTip">
        <Grid x:Name="RootVisual" HorizontalAlignment="Right" RenderTransformOrigin="0 0" Opacity="0" Margin="5 0">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0"/>
                        <VisualTransition To="Open" GeneratedDuration="0:0:0.2">
                            <Storyboard>
                                <DoubleAnimation Storyboard.TargetName="xform" Storyboard.TargetProperty="X" To="0" Duration="0:0:0.2">
                                    <DoubleAnimation.EasingFunction>
                                        <BackEase Amplitude=".3" EasingMode="EaseOut"/>
                                    </DoubleAnimation.EasingFunction>
                                </DoubleAnimation>
                                <DoubleAnimation Storyboard.TargetName="RootVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.2"/>
                            </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
                    MinHeight="22"
                    Background="{StaticResource ValidationTooltipBackground}"
                    BorderBrush="{StaticResource ValidationTooltipOuterBorder}"
                    BorderThickness="1"
                    CornerRadius="{StaticResource ValidationTooltipCornerRadius}">
                <Border BorderBrush="{StaticResource ValidationTooltipInnerBorder}" BorderThickness="1">
                    <ContentPresenter TextBlock.Foreground="{StaticResource ValidationTooltipForeground}" Content="{Binding ErrorContent}" Margin="4 0 4 1"/>
                </Border>
            </Border>
            <ContentControl/>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="ValidationTooltipTemplate">
        <Grid SnapsToDevicePixels="True" VerticalAlignment="Top">
            <Border Background="Transparent" HorizontalAlignment="Right" VerticalAlignment="Top" Width="3" Height="3"/>
            <AdornedElementPlaceholder x:Name="Holder"/>
            <Border BorderBrush="{StaticResource ValidationTooltipOuterBorder}" BorderThickness="1" CornerRadius="{StaticResource ValidationTooltip_CornerRadius}"/>
            <Path Data="M2,1 L6,1 6,5 Z" Fill="{StaticResource ValidationInnerTick}" Width="7" Height="7" HorizontalAlignment="Right" VerticalAlignment="Top"/>
            <Path Data="M0,0 L2,0 7,5 7,7 Z" Fill="{StaticResource ValidationOuterTick}" Width="7" Height="7" HorizontalAlignment="Right" VerticalAlignment="Top"/>
            <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>
    <ControlTemplate x:Key="RadPageTemplate" TargetType="telerik:RadRadioButton">
        <Border x:Name="PageButton"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="0,0,6,1">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="PageButton" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RadPager_Page_Over}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="PageButton" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RadPager_Page_Checked}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="PageButton" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RadPager_Page_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Checked">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="PageButton" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RadPager_Page_Checked}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocuseStatesGroup">
                    <VisualState x:Name="Unfocused"/>
                    <VisualState x:Name="Focused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="PageButton" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RadPager_Page_Over}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border Background="{StaticResource RadPager_Page_TopShadow}">
                <ContentControl
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        Margin="{TemplateBinding Padding}"
                        Content="{TemplateBinding Content}"
                        IsTabStop="False"/>
            </Border>
        </Border>
    </ControlTemplate>
    <Style x:Key="RadPageStyle" TargetType="telerik:RadRadioButton">
        <Setter Property="Template" Value="{StaticResource RadPageTemplate}"/>
        <Setter Property="Background" Value="{StaticResource RadPager_Page_Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource RadPager_Page_Border}"/>
        <Setter Property="BorderThickness" Value="0,0,1,1"/>
        <Setter Property="MinWidth" Value="21"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="0"/>
    </Style>
    <ControlTemplate x:Key="NumericElementsPresenterTemplate" TargetType="dataPager:NumericElementsPresenter">
        <ItemsControl ItemsSource="{Binding Pages}">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <VirtualizingStackPanel Orientation="Horizontal"/>
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <telerik:RadRadioButton
                            IsChecked="{Binding IsCurrent, Mode=OneWay}"
                            GroupName="{Binding GroupName}"
                            CommandParameter="{Binding PageIndex}"
                            Content="{Binding Content}"
                            Style="{Binding NumericButtonStyle}"
                            Command="{x:Static controls:RadDataPagerCommands.MoveToPage}"/>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </ControlTemplate>
    <Style x:Key="NumericElementsPresenterStyle" TargetType="dataPager:NumericElementsPresenter">
        <Setter Property="Template" Value="{StaticResource NumericElementsPresenterTemplate}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <ControlTemplate x:Key="DataPagerPresenterTemplate" TargetType="dataPager:DataPagerPresenter">
        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
                    <telerik:RadButton
                            Name="MoveToFirstPageButton"
                            Visibility="{Binding PagerControlsVisibility.MoveToFirstPageControlVisibility,RelativeSource={RelativeSource TemplatedParent}}"
                            Width="18"
                            Height="18"
                            Margin="2"
                            Command="{x:Static controls:RadDataPagerCommands.MoveToFirstPage}">
                        <StackPanel Orientation="Horizontal">
                            <Rectangle Fill="{StaticResource RadPager_Indicator}" VerticalAlignment="Center" HorizontalAlignment="Center" Width="1" Height="7"/>
                            <Path
                                    Fill="{StaticResource RadPager_Indicator}"
                                    VerticalAlignment="Center"
                                    HorizontalAlignment="Center"
                                    Data="M0,0 L3.5,3.5 0,7 Z"
                                    Width="4"
                                    Height="7"
                                    RenderTransformOrigin="0.5, 0.5">
                                <Path.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="-1" ScaleY="1"/>
                                        <SkewTransform AngleX="0" AngleY="0"/>
                                        <RotateTransform Angle="0"/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Path.RenderTransform>
                            </Path>
                        </StackPanel>
                    </telerik:RadButton>
                    <telerik:RadButton
                            Name="MoveToPreviousPageButton"
                            Visibility="{Binding PagerControlsVisibility.MoveToPreviousPageControlVisibility,RelativeSource={RelativeSource TemplatedParent}}"
                            Width="18"
                            Height="18"
                            Margin="2"
                            Command="{x:Static controls:RadDataPagerCommands.MoveToPreviousPage}">
                        <Path
                                Fill="{StaticResource RadPager_Indicator}"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Data="M0,0 L3.5,3.5 0,7 Z"
                                Width="4"
                                Height="7"
                                RenderTransformOrigin="0.5, 0.5">
                            <Path.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="-1" ScaleY="1"/>
                                    <SkewTransform AngleX="0" AngleY="0"/>
                                    <RotateTransform Angle="0"/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </Path.RenderTransform>
                        </Path>
                    </telerik:RadButton>
                    <Border
                            BorderThickness="1,0,0,0"
                            Background="{StaticResource RadPager_NumericPresenter_Background}"
                            BorderBrush="{StaticResource RadPager_NumericPresenter_Border}"
                            Height="20"
                            VerticalAlignment="Center"
                            Visibility="{Binding PagerControlsVisibility.NumericElementsControlVisibility,RelativeSource={RelativeSource TemplatedParent}}">
                        <dataPager:NumericElementsPresenter
                                NumericButtonStyle="{TemplateBinding NumericButtonStyle}"
                                AutoEllipsisMode="{TemplateBinding AutoEllipsisMode}"
                                PageIndex="{TemplateBinding PageIndex}"
                                PageCount="{TemplateBinding PageCount}"
                                NumericButtonCount="{TemplateBinding NumericButtonCount}"/>
                    </Border>
                    <telerik:RadButton
                            Name="MoveToNextPageButton"
                            Visibility="{Binding PagerControlsVisibility.MoveToNextPageControlVisibility,RelativeSource={RelativeSource TemplatedParent}}"
                            Width="18"
                            Height="18"
                            Margin="2"
                            Command="{x:Static controls:RadDataPagerCommands.MoveToNextPage}">
                        <Path Fill="{StaticResource RadPager_Indicator}" VerticalAlignment="Center" HorizontalAlignment="Center" Data="M0,0 L3.5,3.5 0,7 Z" Width="4" Height="7"/>
                    </telerik:RadButton>
                    <telerik:RadButton
                            Name="MoveToLastPageButton"
                            Visibility="{Binding PagerControlsVisibility.MoveToLastPageControlVisibility,RelativeSource={RelativeSource TemplatedParent}}"
                            Width="18"
                            Height="18"
                            Margin="2"
                            Command="{x:Static controls:RadDataPagerCommands.MoveToLastPage}">
                        <StackPanel Orientation="Horizontal">
                            <Path Fill="{StaticResource RadPager_Indicator}" VerticalAlignment="Center" HorizontalAlignment="Center" Data="M0,0 L3.5,3.5 0,7 Z" Width="4" Height="7"/>
                            <Rectangle Fill="{StaticResource RadPager_Indicator}" VerticalAlignment="Center" HorizontalAlignment="Center" Width="1" Height="7"/>
                        </StackPanel>
                    </telerik:RadButton>
                </StackPanel>
                <StackPanel
                        Orientation="Horizontal"
                        Grid.Column="1"
                        Visibility="{Binding PagerControlsVisibility.TextControlVisibility,RelativeSource={RelativeSource TemplatedParent}}"
                        Margin="5,0">
                    <Border HorizontalAlignment="Left" Margin="5,0,0,0" Width="1" Background="{StaticResource RadPager_Separator1}" VerticalAlignment="Center" Height="18"/>
                    <Border HorizontalAlignment="Left" Margin="0,0,10,0" Width="1" Background="{StaticResource RadPager_Separator2}" VerticalAlignment="Center" Height="18"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="RadDataPagerPage" VerticalAlignment="Center" Margin="2,0"/>
                    <dataPager:DataPagerTextBox
                            Width="48"
                            Height="22"
                            Margin="2,0"
                            VerticalContentAlignment="Center"
                            VerticalAlignment="Center"
                            PageIndex="{TemplateBinding PageIndex}"
                            Command="{x:Static controls:RadDataPagerCommands.MoveToPage}"/>
                    <TextBlock telerik:LocalizationManager.ResourceKey="RadDataPagerOf" VerticalAlignment="Center" Margin="2,0"/>
                    <TextBlock Text="{Binding PageCount, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Center" Margin="2,0"/>
                </StackPanel>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="DataPagerPresenterStyle" TargetType="dataPager:DataPagerPresenter">
        <Setter Property="Template" Value="{StaticResource DataPagerPresenterTemplate}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <ControlTemplate x:Key="RadDataPagerTemplate" TargetType="controls:RadDataPager">
        <dataPager:DataPagerPresenter
                NumericButtonStyle="{TemplateBinding NumericButtonStyle}"
                AutoEllipsisMode="{TemplateBinding AutoEllipsisMode}"
                DisplayMode="{TemplateBinding DisplayMode}"
                PageIndex="{TemplateBinding PageIndex}"
                PageCount="{TemplateBinding PageCount}"
                NumericButtonCount="{TemplateBinding NumericButtonCount}"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                PageSize="{Binding PageSize, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                ItemCount="{Binding ItemCount, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/>
    </ControlTemplate>
    <Style x:Key="RadDataPagerStyle" TargetType="controls:RadDataPager">
        <Setter Property="Template" Value="{StaticResource RadDataPagerTemplate}"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Background" Value="{StaticResource RadPager_Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource RadPager_Border}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="{StaticResource RadPager_Foreground}"/>
        <Setter Property="NumericButtonStyle" Value="{StaticResource RadPageStyle}"/>
        <Setter Property="Height" Value="28"/>
        <Setter Property="FontSize" Value="9"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="controls:RadDataPager" BasedOn="{StaticResource RadDataPagerStyle}"/>
    <Style TargetType="dataPager:DataPagerPresenter" BasedOn="{StaticResource DataPagerPresenterStyle}"/>
    <Style TargetType="dataPager:NumericElementsPresenter" BasedOn="{StaticResource NumericElementsPresenterStyle}"/>
    <DataTemplate x:Key="FilterOperatorTemplate">
        <TextBlock Text="{Binding Converter={StaticResource FilterOperatorConverter}}"/>
    </DataTemplate>
    <ControlTemplate x:Key="RemoveFilterButtonTemplate" TargetType="telerik:RadButton">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0:0:0.2"/>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation To="1" Storyboard.TargetName="ButtonBorder_Over" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <DoubleAnimation To="1" Storyboard.TargetName="ButtonBorder_Pressed" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused"/>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="ButtonBorder"
                    CornerRadius="8"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <Border x:Name="ButtonBorder_Over"
                    CornerRadius="8"
                    Opacity="0"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{StaticResource RemoveFilterButton_Background_Over}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <Border x:Name="ButtonBorder_Pressed"
                    CornerRadius="8"
                    Opacity="0"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{StaticResource RemoveFilterButton_Background_Pressed}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <Path
                    Stretch="Fill"
                    Height="8"
                    Width="8"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    RenderTransformOrigin="0.5,0.5"
                    Data="M4.0551758,5.1411133 L4.9467773,5.1411133 L4.9467773,8.0683594 L7.8740234,8.0683594 L7.8740234,8.9277344 L4.9467773,8.9277344 L4.9467773,11.85498 L4.0551758,11.85498 L4.0551758,8.9277344 L1.1279297,8.9277344 L1.1279297,8.0683594 L4.0551758,8.0683594 z"
                    Stroke="{TemplateBinding Foreground}">
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform Angle="-45"/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Path.RenderTransform>
            </Path>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RemoveFilterButtonStyle" TargetType="telerik:RadButton">
        <Setter Property="Template" Value="{StaticResource RemoveFilterButtonTemplate}"/>
        <Setter Property="Background" Value="{StaticResource RemoveFilterButton_Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource RemoveFilterButton_Border}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Width" Value="16"/>
        <Setter Property="Height" Value="16"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Foreground" Value="{StaticResource RemoveFilterButton_Foreground}"/>
        <Setter Property="Margin" Value="1,0,4,0"/>
    </Style>
    <ControlTemplate x:Key="AddFilterButtonTemplate" TargetType="telerik:RadButton">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0:0:0.2"/>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation To="1" Storyboard.TargetName="ButtonBorder_Over" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <DoubleAnimation To="1" Storyboard.TargetName="ButtonBorder_Pressed" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused"/>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="ButtonBorder"
                    CornerRadius="8"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <Border x:Name="ButtonBorder_Over"
                    CornerRadius="8"
                    Opacity="0"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{StaticResource AddFilterButton_Background_Over}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <Border x:Name="ButtonBorder_Pressed"
                    CornerRadius="8"
                    Opacity="0"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{StaticResource AddFilterButton_Background_Pressed}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="AddFilterButtonStyle" TargetType="telerik:RadButton">
        <Setter Property="Template" Value="{StaticResource AddFilterButtonTemplate}"/>
        <Setter Property="Background" Value="{StaticResource AddFilterButton_Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource AddFilterButton_Border}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Width" Value="16"/>
        <Setter Property="Height" Value="16"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Foreground" Value="{StaticResource AddFilterButton_Foreground}"/>
        <Setter Property="Margin" Value="4,0,1,0"/>
    </Style>
    <ControlTemplate x:Key="FilterControlTemplate" TargetType="dataFilter:FilterControl">
        <Border x:Name="OuterBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="11">
            <Border.OpacityMask>
                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                    <GradientStop Offset="0" Color="Black"/>
                    <GradientStop Offset="0.3"/>
                </LinearGradientBrush>
            </Border.OpacityMask>
            <Border.Triggers>
                <EventTrigger RoutedEvent="Canvas.Loaded">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation
                                    Duration="0:0:0.2"
                                    To="1"
                                    Storyboard.TargetProperty="(UIElement.OpacityMask).(GradientBrush.GradientStops)[0].(GradientStop.Offset)"
                                    Storyboard.TargetName="OuterBorder"/>
                            <DoubleAnimation
                                    Duration="0:0:0.2"
                                    To="1"
                                    Storyboard.TargetProperty="(UIElement.OpacityMask).(GradientBrush.GradientStops)[1].(GradientStop.Offset)"
                                    Storyboard.TargetName="OuterBorder"/>
                            <ColorAnimation
                                    Duration="0"
                                    BeginTime="0:0:0.2"
                                    To="Black"
                                    Storyboard.TargetProperty="(UIElement.OpacityMask).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
                                    Storyboard.TargetName="OuterBorder"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Border.Triggers>
            <Border x:Name="InnerBorder"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{StaticResource FilterControl_InnerBorder}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="10">
                <StackPanel Orientation="Horizontal">
                    <telerik:RadButton Name="PART_RemoveFilterButton" Command="{Binding RemoveFilter}" Style="{StaticResource RemoveFilterButtonStyle}"/>
                    <StackPanel Orientation="Horizontal" Visibility="{Binding IsComposite, Converter={StaticResource BooleanToVisibilityConverter}}">
                        <telerik:RadToggleButton
                                Name="PART_CompositeFilterLogicalOperatorToggleButton"
                                Height="18"
                                FontSize="10"
                                MinWidth="30"
                                IsChecked="{Binding CompositeFilter.LogicalOperator, Mode=TwoWay, Converter={StaticResource LogicalOperatorToCheckedConverter}}"
                                Content="{Binding CompositeFilter.LogicalOperator, Converter={StaticResource LogicalOperatorConverter}}"/>
                        <telerik:RadButton Name="PART_AddFilterButton" Command="{Binding AddFilter}" Style="{StaticResource AddFilterButtonStyle}">
                            <Path
                                    Stretch="Fill"
                                    Height="8"
                                    Width="8"
                                    RenderTransformOrigin="0.5,0.5"
                                    Data="M4.0551758,5.1411133 L4.9467773,5.1411133 L4.9467773,8.0683594 L7.8740234,8.0683594 L7.8740234,8.9277344 L4.9467773,8.9277344 L4.9467773,11.85498 L4.0551758,11.85498 L4.0551758,8.9277344 L1.1279297,8.9277344 L1.1279297,8.0683594 L4.0551758,8.0683594 z"
                                    Stroke="{StaticResource AddFilterButton_Foreground}">
                                <Path.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Path.RenderTransform>
                            </Path>
                        </telerik:RadButton>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Visibility="{Binding IsComposite, Converter={StaticResource InvertedBooleanToVisibilityConverter}}">
                        <telerik:RadComboBox
                                Name="PART_SimpleFilterMemberComboBox"
                                Margin="0,0,3,0"
                                MinWidth="100"
                                VerticalAlignment="Center"
                                ItemsSource="{Binding SimpleFilter.AvailableMembers}"
                                SelectedItem="{Binding SimpleFilter.SelectedMember, Mode=TwoWay}"/>
                        <telerik:RadComboBox
                                Name="PART_SimpleFilterOperatorComboBox"
                                Margin="0,0,3,0"
                                MinWidth="100"
                                VerticalAlignment="Center"
                                ItemsSource="{Binding SimpleFilter.AvailableOperators}"
                                SelectedItem="{Binding SimpleFilter.Operator, Mode=TwoWay, Converter={StaticResource FilterOperatorToSelectedItemConverter}}"
                                IsEnabled="{Binding SimpleFilter.Member, Converter={StaticResource FilterMemberToEnabledConverter}}"
                                ItemTemplate="{StaticResource FilterOperatorTemplate}"/>
                        <dataFilter:FilterEditor
                                DataContext="{Binding SimpleFilter}"
                                ItemPropertyDefinition="{Binding SelectedMember}"
                                FilterOperator="{Binding Operator}"
                                HorizontalContentAlignment="Stretch"
                                IsTabStop="False"
                                VerticalContentAlignment="Stretch"/>
                        <Border Width="8" BorderBrush="Transparent" Visibility="{Binding CanUserCreateCompositeFilters, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
                        <telerik:RadButton
                                Name="PART_ToCompositeFilterButton"
                                Command="{Binding ToCompositeFilter}"
                                Style="{StaticResource AddFilterButtonStyle}"
                                Visibility="{Binding CanUserCreateCompositeFilters, Converter={StaticResource BooleanToVisibilityConverter}}">
                            <Path
                                    Fill="{StaticResource AddFilterButton_Foreground}"
                                    Stretch="Fill"
                                    Margin="4.764,3.911,0.231,0.182"
                                    RenderTransformOrigin="0.178532408309272,0.500013572224711"
                                    Data="M2.0597237,0.00011700392 C2.3919959,0.0037145019 2.7279578,0.090300739 3.0362324,0.26828307 3.9928176,0.82056788 4.3205678,2.0437487 3.7682831,3.0003339 3.5047298,3.4568219 3.0883964,3.7701081 2.6211619,3.9128945 2.5376498,3.9384158 2.606295,8.1556374 2.6448601,8.1688096 2.7661251,8.2102287 2.8851618,8.2639664 3.0003339,8.3304611 3.119907,8.3994967 3.2296547,8.479015 3.3290861,8.567185 L3.3953214,8.6289421 7.0353448,6.5273734 7.032584,6.5179721 C6.9001091,6.0235683 6.9562423,5.4786268 7.2323849,5.0003339 7.5948217,4.3725749 8.2461894,4.0156323 8.921531,4.0005015 8.9436405,4.0000061 8.9657753,3.9998771 8.9879267,4.0001169 9.3201993,4.0037147 9.6561611,4.0903007 9.9644353,4.2682832 10.921021,4.8205677 11.248771,6.0437485 10.696486,7.0003339 10.144202,7.9569193 8.9210207,8.2846695 7.9644353,7.7323848 7.7908325,7.6321552 7.6379409,7.5098292 7.5072617,7.3710103 7.457924,7.3185995 3.8905699,9.3987923 3.9225863,9.510286 4.0671648,10.013763 4.0149822,10.573039 3.7323847,11.062512 3.1801,12.019097 1.9569192,12.346847 1.0003339,11.794563 0.043748736,11.242278 -0.28400159,10.019097 0.26828313,9.062512 0.56168437,8.5543262 1.0444304,8.2236139 1.5759602,8.108039 L1.6210667,8.099353 1.6210667,3.9568464 1.5962493,3.9518846 C1.4043243,3.9085528 1.2155921,3.8359381 1.0362324,3.7323848 0.079647064,3.1801001 -0.24810326,1.9569192 0.30418158,1.0003339 0.66661841,0.37257487 1.3179861,0.015632391 1.9933276,0.00050151348 2.0154371,6.1988831E-06 2.0375722,-0.00012278557 2.0597237,0.00011700392 z">
                                <Path.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="-1" ScaleY="1"/>
                                        <SkewTransform AngleX="0" AngleY="0"/>
                                        <RotateTransform Angle="120"/>
                                        <TranslateTransform X="1.7763568394002505E-15"/>
                                    </TransformGroup>
                                </Path.RenderTransform>
                            </Path>
                        </telerik:RadButton>
                    </StackPanel>
                </StackPanel>
            </Border>
        </Border>
    </ControlTemplate>
    <Style x:Key="FilterControlStyle" TargetType="dataFilter:FilterControl">
        <Setter Property="Template" Value="{StaticResource FilterControlTemplate}"/>
        <Setter Property="Background" Value="{StaticResource FilterControl_Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource FilterControl_Border}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Foreground" Value="{StaticResource FilterControl_Foreground}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
    </Style>
    <ControlTemplate x:Key="DataFilterPresenterTemplate" TargetType="dataFilter:DataFilterPresenter">
        <Border Padding="20, 2, 0, 2">
            <Grid x:Name="Root">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <ContentControl x:Name="HeaderContent" Grid.Row="0" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" IsTabStop="False"/>
                <ItemsPresenter x:Name="Items" Grid.Row="1"/>
            </Grid>
        </Border>
    </ControlTemplate>
    <HierarchicalDataTemplate x:Key="DataFilterPresenterItemTemplate" ItemsSource="{Binding CompositeFilter.Filters}">
        <dataFilter:FilterControl/>
    </HierarchicalDataTemplate>
    <DataTemplate x:Key="DataFilterPresenterHeaderTemplate">
        <dataFilter:FilterControl/>
    </DataTemplate>
    <Style x:Key="DataFilterPresenterStyle" TargetType="dataFilter:DataFilterPresenter">
        <Setter Property="Template" Value="{StaticResource DataFilterPresenterTemplate}"/>
        <Setter Property="ItemTemplate" Value="{StaticResource DataFilterPresenterItemTemplate}"/>
        <Setter Property="HeaderTemplate" Value="{StaticResource DataFilterPresenterHeaderTemplate}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <ControlTemplate x:Key="RadDataFilterTemplate" TargetType="controls:RadDataFilter">
        <ScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
            <dataFilter:DataFilterPresenter DataContext="{TemplateBinding ViewModel}" Header="{Binding .}" ItemsSource="{Binding CompositeFilter.Filters}"/>
        </ScrollViewer>
    </ControlTemplate>
    <Style x:Key="RadDataFilterStyle" TargetType="controls:RadDataFilter">
        <Setter Property="Template" Value="{StaticResource RadDataFilterTemplate}"/>
        <Setter Property="IsTabStop" Value="False"/>
    </Style>
    <Style TargetType="controls:RadDataFilter" BasedOn="{StaticResource RadDataFilterStyle}"/>
    <Style TargetType="dataFilter:FilterControl" BasedOn="{StaticResource FilterControlStyle}"/>
    <Style TargetType="dataFilter:DataFilterPresenter" BasedOn="{StaticResource DataFilterPresenterStyle}"/>
    <ControlTemplate x:Key="DataFormValidationSummaryTemplate" TargetType="dataForm:DataFormValidationSummary">
        <Border
                BorderThickness="0,1,0,0"
                BorderBrush="{StaticResource ValidationSummary_BorderBrush}"
                Background="{StaticResource ValidationSummary_Background}"
                Height="{TemplateBinding Height}">
            <ItemsControl IsTabStop="False" ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Errors}">
                <ItemsControl.Style>
                    <Style TargetType="ItemsControl">
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate>
                                    <ScrollViewer
                                            IsTabStop="False"
                                            Name="ScrollViewer"
                                            BorderBrush="{StaticResource ControlOuterBorder}"
                                            BorderThickness="0,0,0,1"
                                            ScrollViewer.VerticalScrollBarVisibility="Auto"
                                            ScrollViewer.HorizontalScrollBarVisibility="Auto">
                                        <ItemsPresenter/>
                                    </ScrollViewer>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="ItemTemplate">
                            <Setter.Value>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Foreground="{StaticResource ValidationSummary_Foreground}" Margin="5,5,0,5" FontWeight="Bold" Text="{Binding SourceFieldDisplayName}"/>
                                        <TextBlock Foreground="{StaticResource ValidationSummary_Foreground}" FontWeight="Bold" Text=":" Margin="0,5,0,0"/>
                                        <TextBlock Margin="5,5,0,5" Text="{Binding ErrorContent}"/>
                                    </StackPanel>
                                </DataTemplate>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="MaxHeight" Value="75"/>
                    </Style>
                </ItemsControl.Style>
            </ItemsControl>
        </Border>
    </ControlTemplate>
    <ControlTemplate x:Key="RadDataFormTemplate" TargetType="controls:RadDataForm">
        <Border x:Name="PART_RootElement" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid x:Name="PART_DataFormGrid" Background="{TemplateBinding Background}">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Border x:Name="Header"
                        Visibility="{Binding Header,RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DescriptionVisibilityConverter}}"
                        BorderThickness="1"
                        BorderBrush="{StaticResource DataForm_HeaderOuterBorder}"
                        Margin="-1,-1,-1,0">
                    <Border Background="{StaticResource DataForm_HeaderBackground}" BorderBrush="{StaticResource DataForm_HeaderInnerBorder}" BorderThickness="1">
                        <ContentControl x:Name="PART_ContentPresenter"
                                Margin="4,6,4,6"
                                Foreground="{StaticResource DataForm_HeaderForeground}"
                                FontWeight="Bold"
                                VerticalContentAlignment="Top"
                                HorizontalContentAlignment="Stretch"
                                Content="{TemplateBinding Header}"
                                VerticalAlignment="Center"/>
                    </Border>
                </Border>
                <dataForm:CollectionNavigator x:Name="CollectionNavigator" Grid.Row="1"/>
                <Border BorderBrush="{StaticResource DataFormPanel_Border}" Grid.Row="2" BorderThickness="0,0,0,1">
                    <ScrollViewer x:Name="PART_ItemsScrollViewer"
                            IsTabStop="False"
                            ScrollViewer.HorizontalScrollBarVisibility="Auto"
                            ScrollViewer.VerticalScrollBarVisibility="Auto"
                            FocusVisualStyle="{x:Null}">
                        <StackPanel Orientation="Vertical">
                            <dataForm:AutoGeneratedFieldsPresenter x:Name="PART_AutoGeneratedFieldsPresenter" AutoGenerateFields="{Binding AutoGenerateFields,RelativeSource={RelativeSource TemplatedParent}}"/>
                            <ContentPresenter x:Name="PART_FieldsContentPresenter"/>
                        </StackPanel>
                    </ScrollViewer>
                </Border>
                <dataForm:DataFormValidationSummary x:Name="PART_ValidationSummary" Grid.Row="3" Visibility="{TemplateBinding ValidationSummaryVisibility}" Margin="0,0,0,-1"/>
                <Border x:Name="FooterPanel_Background" Background="{StaticResource DataForm_FooterPanel_Background}" Grid.Row="4">
                    <StackPanel x:Name="PART_FooterPanel" Orientation="Horizontal" HorizontalAlignment="Right">
                        <telerik:RadButton x:Name="PART_CommitButton"
                                MinWidth="48"
                                MinHeight="20"
                                Margin="2,4,4,4"
                                Content="{TemplateBinding CommitButtonContent}"
                                Command="{x:Static controls:RadDataFormCommands.CommitEdit}"/>
                        <telerik:RadButton x:Name="PART_CancelButton"
                                MinWidth="48"
                                MinHeight="20"
                                Margin="2,4,4,4"
                                Content="{TemplateBinding CancelButtonContent}"
                                Command="{x:Static controls:RadDataFormCommands.CancelEdit}"/>
                    </StackPanel>
                </Border>
                <Border x:Name="Background_Disabled"
                        Visibility="{Binding IsEnabled, Converter={StaticResource InvertedBooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}"
                        Grid.RowSpan="5"
                        Background="{StaticResource Background_Disabled}"
                        IsHitTestVisible="False"/>
            </Grid>
        </Border>
    </ControlTemplate>
    <ControlTemplate x:Key="AutoGeneratedFieldsPresenterTemplate" TargetType="dataForm:AutoGeneratedFieldsPresenter">
        <ItemsControl IsTabStop="False" ItemsSource="{TemplateBinding Fields}">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <VirtualizingStackPanel Orientation="Vertical"/>
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
        </ItemsControl>
    </ControlTemplate>
    <ControlTemplate x:Key="DataFormDataFieldTemplate" TargetType="controls:DataFormDataField">
        <Border x:Name="PART_RootElement" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid x:Name="PART_DataFormDataFieldGrid" Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="2*"/>
                    <ColumnDefinition Width="24"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <ContentControl x:Name="PART_Label"
                        IsTabStop="False"
                        Content="{TemplateBinding Label}"
                        Foreground="{TemplateBinding Foreground}"
                        Margin="5,0"
                        ContentTemplate="{TemplateBinding LabelTemplate}"/>
                <ContentPresenter
                        Grid.Row="1"
                        x:Name="PART_ContentPresenter"
                        Grid.Column="1"
                        Content="{TemplateBinding Content}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="5,0"/>
                <Grid
                        Grid.Row="1"
                        x:Name="DescriptionIcon"
                        Visibility="{Binding Description, Converter={StaticResource DescriptionVisibilityConverter},RelativeSource={RelativeSource TemplatedParent}}"
                        Grid.Column="2"
                        Width="16"
                        Height="16"
                        Margin="4,0">
                    <ToolTipService.ToolTip>
                        <ToolTip Content="{TemplateBinding Description}"/>
                    </ToolTipService.ToolTip>
                    <Ellipse>
                        <Ellipse.Fill>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FF68A2DB" Offset="0"/>
                                <GradientStop Color="#FF2C6CC0" Offset="1"/>
                            </LinearGradientBrush>
                        </Ellipse.Fill>
                    </Ellipse>
                    <Ellipse Margin="1">
                        <Ellipse.Stroke>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FFA2C2E6" Offset="0"/>
                                <GradientStop Color="#FF558DD3" Offset="1"/>
                            </LinearGradientBrush>
                        </Ellipse.Stroke>
                    </Ellipse>
                    <Path
                            Data="M3.3820179,7.7910166 C3.9343026,7.7910166 4.3820181,8.2387314 4.3820181,8.7910166 C4.3820181,9.3433018 3.9343026,9.7910166 3.3820179,9.7910166 C2.8297331,9.7910166 2.3820179,9.3433018 2.3820179,8.7910166 C2.3820179,8.2387314 2.8297331,7.7910166 3.3820179,7.7910166 z M3.4866922,0 C4.5602031,0 5.4141321,0.28477871 6.0484791,0.8543362 C6.682826,1.423894 6.9999995,2.0868769 7.0000005,2.8432846 C6.9999995,3.2620106 6.8835549,3.6582246 6.6506658,4.0319262 C6.4177752,4.4056277 5.9253707,4.9212208 5.1568441,5.55825 C4.366394,6.2134514 4.350769,6.7758508 4.350769,6.7758508 C4.350769,6.7758508 2.382019,6.776 2.382019,6.776 C2.382019,6.776 2.460144,5.5571427 3.9524715,4.4033766 C4.511868,3.97089 4.8241448,3.6582246 4.9306087,3.5186491 C5.0947404,3.2980301 5.1768064,3.0548987 5.1768064,2.7892554 C5.1768064,2.4200568 5.0315275,2.103761 4.7409697,1.8403683 C4.4504123,1.5769768 4.0589356,1.4452807 3.56654,1.4452801 C3.0918882,1.4452807 2.6948667,1.5826048 2.3754754,1.8572525 C2.0560837,2.1319013 1.836502,2.5506272 1.7167301,3.1134305 L0,2.8973138 C0.048795935,2.0913794 0.38704056,1.40701 1.0147338,0.84420568 C1.6424271,0.28140187 2.4664133,0 3.4866922,0 z"
                            Margin="4.618,3.209,4.382,3"
                            RenderTransformOrigin="0.499999968851403,0.346031483547006"
                            Stretch="Fill">
                        <Path.Fill>
                            <SolidColorBrush Color="White">
                                <SolidColorBrush.RelativeTransform>
                                    <MatrixTransform Matrix="Identity"/>
                                </SolidColorBrush.RelativeTransform>
                                <SolidColorBrush.Transform>
                                    <MatrixTransform Matrix="Identity"/>
                                </SolidColorBrush.Transform>
                            </SolidColorBrush>
                        </Path.Fill>
                        <Path.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform/>
                                <SkewTransform/>
                                <RotateTransform/>
                                <TranslateTransform/>
                            </TransformGroup>
                        </Path.RenderTransform>
                    </Path>
                </Grid>
            </Grid>
        </Border>
    </ControlTemplate>
    <ControlTemplate x:Key="CollectionNavigatorTemplate" TargetType="dataForm:CollectionNavigator">
        <Border x:Name="PART_RootElement" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="PART_CollectionNavigatorGrid">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Grid.Column="0">
                    <telerik:RadButton x:Name="MoveCurrentToFirst"
                            Visibility="{Binding NavigationButtonsVisibility}"
                            Height="18"
                            Margin="4,4,2,4"
                            Width="18"
                            Command="{x:Static controls:RadDataFormCommands.MoveCurrentToFirst}">
                        <ToolTipService.ToolTip>
                            <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_MoveCurrentToFirst"/>
                        </ToolTipService.ToolTip>
                        <StackPanel Orientation="Horizontal">
                            <Rectangle Fill="{StaticResource NagigatorIconColor}" HorizontalAlignment="Center" Height="7" VerticalAlignment="Center" Width="1"/>
                            <Path
                                    Data="M0,0 L3.5,3.5 0,7 Z"
                                    Fill="{StaticResource NagigatorIconColor}"
                                    HorizontalAlignment="Center"
                                    Height="7"
                                    RenderTransformOrigin="0.5, 0.5"
                                    VerticalAlignment="Center"
                                    Width="4">
                                <Path.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleY="1" ScaleX="-1"/>
                                        <SkewTransform AngleY="0" AngleX="0"/>
                                        <RotateTransform Angle="0"/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Path.RenderTransform>
                            </Path>
                        </StackPanel>
                    </telerik:RadButton>
                    <telerik:RadButton x:Name="MoveCurrentToPrevious"
                            Visibility="{Binding NavigationButtonsVisibility}"
                            Height="18"
                            Margin="2,4,2,4"
                            Width="18"
                            Command="{x:Static controls:RadDataFormCommands.MoveCurrentToPrevious}">
                        <ToolTipService.ToolTip>
                            <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_MoveCurrentToPrevious"/>
                        </ToolTipService.ToolTip>
                        <Path
                                Data="M0,0 L3.5,3.5 0,7 Z"
                                Fill="{StaticResource NagigatorIconColor}"
                                HorizontalAlignment="Center"
                                Height="7"
                                RenderTransformOrigin="0.5, 0.5"
                                VerticalAlignment="Center"
                                Width="4">
                            <Path.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleY="1" ScaleX="-1"/>
                                    <SkewTransform AngleY="0" AngleX="0"/>
                                    <RotateTransform Angle="0"/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </Path.RenderTransform>
                        </Path>
                    </telerik:RadButton>
                    <telerik:RadButton x:Name="MoveCurrentToNext"
                            Visibility="{Binding NavigationButtonsVisibility}"
                            Height="18"
                            Margin="2,4,2,4"
                            Width="18"
                            Command="{x:Static controls:RadDataFormCommands.MoveCurrentToNext}">
                        <ToolTipService.ToolTip>
                            <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_MoveCurrentToNext"/>
                        </ToolTipService.ToolTip>
                        <Path Data="M0,0 L3.5,3.5 0,7 Z" Fill="{StaticResource NagigatorIconColor}" HorizontalAlignment="Center" Height="7" VerticalAlignment="Center" Width="4"/>
                    </telerik:RadButton>
                    <telerik:RadButton x:Name="MoveCurrentToLast"
                            Visibility="{Binding NavigationButtonsVisibility}"
                            Height="18"
                            Margin="2,4,2,4"
                            Width="18"
                            Command="{x:Static controls:RadDataFormCommands.MoveCurrentToLast}">
                        <ToolTipService.ToolTip>
                            <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_MoveCurrentToLast"/>
                        </ToolTipService.ToolTip>
                        <StackPanel Orientation="Horizontal">
                            <Path Data="M0,0 L3.5,3.5 0,7 Z" Fill="{StaticResource NagigatorIconColor}" HorizontalAlignment="Center" Height="7" VerticalAlignment="Center" Width="4"/>
                            <Rectangle Fill="{StaticResource NagigatorIconColor}" HorizontalAlignment="Center" Height="7" VerticalAlignment="Center" Width="1"/>
                        </StackPanel>
                    </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right">
                    <telerik:RadButton x:Name="AddNew" Visibility="{Binding AddNewButtonVisibility}" Height="18" Margin="2,4,2,4" Width="18" Command="{x:Static controls:RadDataFormCommands.AddNew}">
                        <ToolTipService.ToolTip>
                            <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_AddNew"/>
                        </ToolTipService.ToolTip>
                        <Path
                                Data="F1M8.334,13.301L4.889,13.301L4.889,2.699L12.599,2.699L12.599,9.037L12.559,9.077L8.346,9.078L8.346,13.29z M13.74,9.442L13.74,1.602L3.747,1.602L3.747,14.397L8.784,14.397z"
                                Stretch="Fill"
                                Width="8"
                                Height="11"
                                Fill="{StaticResource NagigatorIconColor}"
                                RenderTransformOrigin="0.5,0.5">
                            <Path.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="-1"/>
                                </TransformGroup>
                            </Path.RenderTransform>
                        </Path>
                    </telerik:RadButton>
                    <telerik:RadButton x:Name="BeginEdit" Visibility="{Binding EditButtonVisibility}" Height="18" Margin="2,4,2,4" Width="18" Command="{x:Static controls:RadDataFormCommands.BeginEdit}">
                        <ToolTipService.ToolTip>
                            <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_BeginEdit"/>
                        </ToolTipService.ToolTip>
                        <Path
                                Data="M3.6943,11.9199L4.1323,9.5549C4.1443,9.4019,4.1953,9.2459,4.2973,9.1289L9.4233,4.0049L11.8853,6.4669L6.7593,11.5919C6.7043,11.6469,6.4893,11.7749,6.4183,11.7869L4.0083,12.2339C3.7943,12.2749,3.6533,12.1349,3.6943,11.9199 M4.8903,11.4789L6.2383,11.2519L10.9273,6.5619L10.3673,6.0059L5.7093,10.6679L4.8153,9.7169L4.5693,11.1329C4.7253,11.1989,4.8253,11.3219,4.8903,11.4789 M12.4513,5.9019L9.9893,3.4399L10.7863,2.6439C11.0063,2.4229,11.3643,2.4229,11.5853,2.6439L13.2483,4.3069C13.4683,4.5269,13.4683,4.8849,13.2483,5.1059z"
                                Fill="{StaticResource NagigatorIconColor}"
                                Stretch="Fill"
                                Width="10"
                                Height="11"/>
                    </telerik:RadButton>
                    <telerik:RadButton x:Name="Delete"
                            Visibility="{Binding DeleteButtonVisibility}"
                            Height="18"
                            Margin="2,4,4,4"
                            Width="19"
                            Padding="0"
                            Command="{x:Static controls:RadDataFormCommands.Delete}">
                        <ToolTipService.ToolTip>
                            <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_Delete"/>
                        </ToolTipService.ToolTip>
                        <Path
                                Data="M1,3 L2,3 L2,9 L3,9 L3,3 L4,3 L4,9 L5,9 L5,3 L6,3 L6,9 L7,9 L7,3 L8,3 L8,10 L1,10 z M2,0 L7,0 L7,0.99999994 L9,0.99999994 L9,2 L0,2 L0,0.99999994 L2,0.99999994 z"
                                Fill="{StaticResource NagigatorIconColor}"
                                Stretch="Fill"
                                Width="9"
                                Height="11"/>
                    </telerik:RadButton>
                </StackPanel>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="RadDataFormStyle" TargetType="controls:RadDataForm">
        <Setter Property="Template" Value="{StaticResource RadDataFormTemplate}"/>
        <Setter Property="Foreground" Value="{StaticResource DataField_Foreground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="Background" Value="{StaticResource ControlBackground}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style x:Key="AutoGeneratedFieldsPresenterStyle" TargetType="dataForm:AutoGeneratedFieldsPresenter">
        <Setter Property="Template" Value="{StaticResource AutoGeneratedFieldsPresenterTemplate}"/>
        <Setter Property="IsTabStop" Value="False"/>
    </Style>
    <Style x:Key="DataFormDataFieldStyle" TargetType="controls:DataFormDataField">
        <Setter Property="Template" Value="{StaticResource DataFormDataFieldTemplate}"/>
        <Setter Property="Background" Value="{StaticResource DataField_Background}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="BorderBrush" Value="{StaticResource DataField_BorderBrush}"/>
        <Setter Property="Padding" Value="4"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
    </Style>
    <Style x:Key="CollectionNavigatorStyle" TargetType="dataForm:CollectionNavigator">
        <Setter Property="Template" Value="{StaticResource CollectionNavigatorTemplate}"/>
        <Setter Property="BorderBrush" Value="{StaticResource DataForm_CollectionNavigator_Border}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background" Value="{StaticResource DataForm_CollectionNavigatorBackground}"/>
        <Setter Property="BorderThickness" Value="0,0,0,1"/>
    </Style>
    <Style x:Key="DataFormValidationSummaryStyle" TargetType="dataForm:DataFormValidationSummary">
        <Setter Property="Template" Value="{StaticResource DataFormValidationSummaryTemplate}"/>
    </Style>
    <Style TargetType="controls:RadDataForm" BasedOn="{StaticResource RadDataFormStyle}"/>
    <Style TargetType="controls:DataFormDataField" BasedOn="{StaticResource DataFormDataFieldStyle}"/>
    <Style TargetType="dataForm:CollectionNavigator" BasedOn="{StaticResource CollectionNavigatorStyle}"/>
    <Style TargetType="dataForm:AutoGeneratedFieldsPresenter" BasedOn="{StaticResource AutoGeneratedFieldsPresenterStyle}"/>
    <Style TargetType="dataForm:DataFormValidationSummary" BasedOn="{StaticResource DataFormValidationSummaryStyle}"/>
    <Style TargetType="controls:DataFormCheckBoxField" BasedOn="{StaticResource DataFormDataFieldStyle}"/>
    <Style TargetType="controls:DataFormComboBoxField" BasedOn="{StaticResource DataFormDataFieldStyle}"/>
    <Style TargetType="controls:DataFormDateField" BasedOn="{StaticResource DataFormDataFieldStyle}"/>
    <ControlTemplate x:Key="ModalEditor_Template" TargetType="propertyGrid:ModalEditor">
        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="auto"/>
                </Grid.ColumnDefinitions>
                <TextBlock x:Name="PART_ModalEditorTextBlock" Text="{Binding SourceProperty, RelativeSource={RelativeSource TemplatedParent}}" Margin="4,0,0,0" VerticalAlignment="Center"/>
                <telerik:RadButton x:Name="PART_ShowEditorButton" Grid.Column="1" Margin="1" Width="24" Height="22" Command="{x:Static propertyGrid:ModalEditor.ShowEditorCommand}">
                    <Path
                            Data="M3.6943,11.9199L4.1323,9.5549C4.1443,9.4019,4.1953,9.2459,4.2973,9.1289L9.4233,4.0049L11.8853,6.4669L6.7593,11.5919C6.7043,11.6469,6.4893,11.7749,6.4183,11.7869L4.0083,12.2339C3.7943,12.2749,3.6533,12.1349,3.6943,11.9199 M4.8903,11.4789L6.2383,11.2519L10.9273,6.5619L10.3673,6.0059L5.7093,10.6679L4.8153,9.7169L4.5693,11.1329C4.7253,11.1989,4.8253,11.3219,4.8903,11.4789 M12.4513,5.9019L9.9893,3.4399L10.7863,2.6439C11.0063,2.4229,11.3643,2.4229,11.5853,2.6439L13.2483,4.3069C13.4683,4.5269,13.4683,4.8849,13.2483,5.1059z"
                            Fill="{StaticResource NagigatorIconColor}"
                            Stretch="Fill"
                            Width="14"
                            Height="14"
                            SnapsToDevicePixels="True"/>
                </telerik:RadButton>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="ModalEditorStyle" TargetType="propertyGrid:ModalEditor">
        <Setter Property="Template" Value="{StaticResource ModalEditor_Template}"/>
        <Setter Property="Background" Value="{StaticResource ControlBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="propertyGrid:ModalEditor" BasedOn="{StaticResource ModalEditorStyle}"/>
    <ControlTemplate x:Key="DropDownEditor_Template" TargetType="propertyGrid:DropDownEditor">
        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding SourceProperty, RelativeSource={RelativeSource TemplatedParent}}" Margin="4,0,0,0" VerticalAlignment="Center" x:Name="PART_DropDownEditorTextBlock"/>
                <telerik:RadDropDownButton x:Name="PART_DropDownEditorButton"
                        IsEnabled="{TemplateBinding IsEnabled}"
                        Grid.Column="1"
                        Margin="0,-1,-1,-1"
                        CornerRadius="0"
                        MinHeight="25"
                        Padding="0"
                        DropDownContent="{Binding Editor, RelativeSource={RelativeSource TemplatedParent}}"
                        PopupPlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}"/>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="DropDownEditorStyle" TargetType="propertyGrid:DropDownEditor">
        <Setter Property="Template" Value="{StaticResource DropDownEditor_Template}"/>
        <Setter Property="Background" Value="{StaticResource ControlBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="propertyGrid:DropDownEditor" BasedOn="{StaticResource DropDownEditorStyle}"/>
    <ControlTemplate x:Key="ToggleButtonTemplate" TargetType="telerik:RadToggleButton">
        <Border Background="Transparent" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver"/>
                    <VisualState x:Name="Disabled"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CheckStates">
                    <VisualState x:Name="Checked">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="plus" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="minus" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Unchecked"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused"/>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border
                    Width="9"
                    Height="9"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
                <Grid>
                    <Path x:Name="plus"
                            Fill="{StaticResource GridView_ToggleButtonStroke}"
                            Stretch="Fill"
                            Stroke="{x:Null}"
                            Margin="{TemplateBinding Padding}"
                            Data="M1.937,0 L2.937,0 2.937,2.0209999 5,2.0209999 5,3.0209999 2.937,3.0209999 2.937,5 1.937,5 1.937,3.0209999 0,3.0209999 0,2.0209999 1.937,2.0209999 z"
                            Width="5"
                            Height="5"/>
                    <Rectangle x:Name="minus"
                            Fill="{StaticResource GridView_ToggleButtonStroke}"
                            Stroke="{x:Null}"
                            RadiusX="0"
                            RadiusY="0"
                            Margin="{TemplateBinding Padding}"
                            VerticalAlignment="Center"
                            Height="1"
                            HorizontalAlignment="Center"
                            Width="5"
                            Opacity="0"/>
                </Grid>
            </Border>
        </Border>
    </ControlTemplate>
    <Style x:Key="PropertyGridNestedToggleButtonStyle" TargetType="telerik:RadToggleButton">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="{StaticResource GridView_ToggleButtonForeground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_ToggleButtonBorder}"/>
        <Setter Property="Background" Value="{StaticResource GridView_ToggleButtonBackground}"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Template" Value="{StaticResource ToggleButtonTemplate}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style x:Key="PropertyGridGripperStyle" TargetType="Thumb">
        <Setter Property="Width" Value="8"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Cursor" Value="SizeWE"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Border
                            Padding="{TemplateBinding Padding}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ItemsControlStyle" TargetType="ItemsControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ItemsControl">
                    <ScrollViewer Margin="0,-1,0,0" FocusVisualStyle="{x:Null}">
                        <ItemsPresenter/>
                    </ScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="VirtualizedItemsControlStyle" BasedOn="{StaticResource ItemsControlStyle}" TargetType="ItemsControl">
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <VirtualizingStackPanel/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    </Style>
    <ControlTemplate x:Key="PropertyGridFieldTemplate" TargetType="propertyGrid:PropertyGridField">
        <Border x:Name="PART_RootElement" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Unfocused"/>
                    <VisualState x:Name="Focused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NavigatorIndicator" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup Name="SelectionStates">
                    <VisualState x:Name="Unselected">
                        <Storyboard Duration="0">
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_SelectionBackgroundN" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Selected">
                        <Storyboard Duration="0">
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_SelectionBackgroundN" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid x:Name="PART_PropertyGridFieldGridN" MinHeight="25" Height="{TemplateBinding Height}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="{Binding LabelColumnWidth, ElementName=PropertyGridPresenter}"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Border x:Name="Background_Over"
                            BorderBrush="{StaticResource ItemOuterBorder_Over}"
                            BorderThickness="1"
                            Grid.Column="1"
                            Grid.ColumnSpan="2"
                            CornerRadius="1"
                            HorizontalAlignment="Stretch"
                            Margin="1,1,1,2"
                            Visibility="{Binding IsMouseOver, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}"
                            VerticalAlignment="Stretch">
                        <Border BorderBrush="{StaticResource ItemInnerBorder_Over}" BorderThickness="1" Background="{StaticResource ItemBackground_Over}" CornerRadius="1"/>
                    </Border>
                    <Border x:Name="PART_SelectionBackgroundN"
                            BorderBrush="{StaticResource ItemOuterBorder_Selected}"
                            BorderThickness="1"
                            Grid.Column="1"
                            CornerRadius="1"
                            HorizontalAlignment="Stretch"
                            Margin="1,1,1,2"
                            Visibility="Collapsed"
                            VerticalAlignment="Stretch">
                        <Border BorderBrush="{StaticResource ItemInnerBorder_Selected}" BorderThickness="1" Background="{StaticResource ItemBackground_Selected}" CornerRadius="1"/>
                    </Border>
                    <Grid x:Name="FieldIndicator" Visibility="{Binding RelativeSource={RelativeSource AncestorType=controls:RadPropertyGrid}, Path=FieldIndicatorVisibility}">
                        <Border BorderBrush="{StaticResource ControlOuterBorder}" BorderThickness="0,0,1,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="25">
                            <Border BorderBrush="{StaticResource ControlInnerBorder}" Margin="0,-1,0,0" BorderThickness="1,0,1,0" Background="{StaticResource PropertyGrid_IndentCellBackground}">
                                <Path x:Name="NavigatorIndicator"
                                        Visibility="Collapsed"
                                        Stretch="Fill"
                                        Data="F1 M 32.0234,6.66669L 24.2923,0.0248413L 28.3697,0.0248413L 32,3.14362L 36.1492,6.70819L 32,10.2728L 28.4664,13.3085L 24.2923,13.3085L 32.0234,6.66669 Z"
                                        Margin="0"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Width="8"
                                        Height="8"
                                        Fill="{StaticResource PropertyGrid_NavigatorIndicatorBackground}"/>
                            </Border>
                        </Border>
                    </Grid>
                    <Border BorderBrush="{StaticResource PropertyGrid_TemplatesBorderBrush}" BorderThickness="1,0,0,1" Grid.Column="4">
                        <ContentPresenter Margin="1" MinHeight="20" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Border>
                    <Border BorderBrush="{StaticResource PropertyGrid_TemplatesBorderBrush}" BorderThickness="0,0,0,1" Grid.Column="1">
                        <StackPanel Orientation="Horizontal">
                            <propertyGrid:PropertyGridIndentPresenter IndentLevel="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IndentLevel}">
                                <propertyGrid:PropertyGridIndentPresenter.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <StackPanel Orientation="Horizontal"/>
                                    </ItemsPanelTemplate>
                                </propertyGrid:PropertyGridIndentPresenter.ItemsPanel>
                                <propertyGrid:PropertyGridIndentPresenter.ItemTemplate>
                                    <DataTemplate>
                                        <propertyGrid:PropertyGridIndentCell/>
                                    </DataTemplate>
                                </propertyGrid:PropertyGridIndentPresenter.ItemTemplate>
                                <propertyGrid:PropertyGridIndentPresenter.Template>
                                    <ControlTemplate>
                                        <ItemsPresenter/>
                                    </ControlTemplate>
                                </propertyGrid:PropertyGridIndentPresenter.Template>
                            </propertyGrid:PropertyGridIndentPresenter>
                            <telerik:RadToggleButton x:Name="PART_NestedPropertiesButton"
                                    Style="{StaticResource PropertyGridNestedToggleButtonStyle}"
                                    Background="Transparent"
                                    Width="25"
                                    Visibility="{Binding ShouldDisplayNestedProperties, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                                    IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsExpanded, Mode=TwoWay}"/>
                            <TextBlock IsHitTestVisible="True" x:Name="PART_FieldLabelN" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="4,2,0,2" Text="{Binding DisplayName}"/>
                        </StackPanel>
                    </Border>
                    <propertyGrid:PropertyGridColumnResizer x:Name="ColumnResizer" Grid.Column="1" Margin="0,0,-4,0" HorizontalAlignment="Right"/>
                </Grid>
                <ItemsControl Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}, Path=ShouldDisplayNestedItemsControl }" Grid.Row="1" ItemsSource="{Binding NestedProperties, Converter={StaticResource FlatItemSourceConverter}}">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <propertyGrid:PropertyGridField Content="{Binding}" Visibility="{Binding Visibility}"/>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
            </Grid>
        </Border>
    </ControlTemplate>
    <ControlTemplate x:Key="PropertyGridColumnResizerTemplate" TargetType="propertyGrid:PropertyGridColumnResizer">
        <Border VerticalAlignment="Stretch" Background="{TemplateBinding Background}">
            <Thumb HorizontalAlignment="Right" Style="{StaticResource PropertyGridGripperStyle}"/>
        </Border>
    </ControlTemplate>
    <Style x:Key="PropertyGridToggleButtonStyle" TargetType="telerik:RadToggleButton">
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="MinHeight" Value="25"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="Foreground" Value="#FF000000"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Grid UseLayoutRounding="True">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver"/>
                                <VisualState x:Name="Disabled"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)" Storyboard.TargetName="ExpanderButton">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00.2" Value="180"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="IconOuterBorder">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0,0,0,0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="IconInnerBorder">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>1,1,0,0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused"/>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="IconOuterBorder"
                                BorderBrush="{StaticResource ControlOuterBorder}"
                                BorderThickness="0,0,0,1"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                Width="25">
                            <Border x:Name="IconInnerBorder"
                                    BorderBrush="{StaticResource ControlInnerBorder}"
                                    BorderThickness="1,1,0,1"
                                    Background="{StaticResource PropertyGrid_IndentCellBackground}">
                                <Path x:Name="ExpanderButton"
                                        Data="M0,0L1,0 2,0 2,0.99999991 3,0.99999991 3,2 4,2 4,0.99999991 5,0.99999991 5,0 5.9999999,0 7,0 7,0.99999991 5.9999999,0.99999991 5.9999999,2 5,2 5,3 4,3 4,4 3,4 3,3 2,3 2,2 1,2 1,0.99999991 0,0.99999991z"
                                        Fill="{StaticResource ToggleButton_Indicator}"
                                        HorizontalAlignment="Center"
                                        Height="5"
                                        RenderTransformOrigin="0.5,0.5"
                                        VerticalAlignment="Center"
                                        Width="7">
                                    <Path.RenderTransform>
                                        <RotateTransform/>
                                    </Path.RenderTransform>
                                </Path>
                            </Border>
                        </Border>
                        <Border Margin="-2,0,0,0" BorderBrush="{StaticResource ControlOuterBorder}" BorderThickness="0,0,0,1" Grid.ColumnSpan="2" Grid.Column="1">
                            <Border BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="0,1,1,1" Background="{StaticResource PropertyGrid_IndentCellBackground}">
                                <ContentPresenter x:Name="PART_ContentPresenter"
                                        ContentTemplate="{TemplateBinding ContentTemplate}"
                                        Content="{TemplateBinding Content}"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        Margin="{TemplateBinding Padding}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </Border>
                        </Border>
                        <Border x:Name="ExpandBorder" BorderBrush="{StaticResource ControlOuterBorder}" VerticalAlignment="Top" Margin="0,-1,0,0" BorderThickness="0,0,0,1" Grid.ColumnSpan="2"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <DataTemplate x:Key="flatTemplate">
        <ItemsControl ItemsSource="{Binding Converter={StaticResource FlatItemSourceConverter}}" Style="{StaticResource ItemsControlStyle}" IsTabStop="False">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <propertyGrid:PropertyGridField Content="{Binding}" Visibility="{Binding Visibility}"/>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </DataTemplate>
    <DataTemplate x:Key="virtualizedFlatTemplate">
        <ItemsControl ItemsSource="{Binding Converter={StaticResource FlatItemSourceConverter}}" Style="{StaticResource VirtualizedItemsControlStyle}" IsTabStop="False">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <propertyGrid:PropertyGridField Content="{Binding}" Visibility="{Binding Visibility}"/>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </DataTemplate>
    <DataTemplate x:Key="flatRenderingTemplate">
        <ItemsControl VirtualizingStackPanel.VirtualizationMode="Standard" ItemsSource="{Binding}" Style="{StaticResource VirtualizedItemsControlStyle}" IsTabStop="False">
            <ItemsControl.ItemTemplateSelector>
                <propertyGrid:FlatRenderingItemTemplateSelector>
                    <propertyGrid:FlatRenderingItemTemplateSelector.FieldTemplate>
                        <DataTemplate>
                            <propertyGrid:PropertyGridField Content="{Binding}" Visibility="{Binding Visibility}"/>
                        </DataTemplate>
                    </propertyGrid:FlatRenderingItemTemplateSelector.FieldTemplate>
                    <propertyGrid:FlatRenderingItemTemplateSelector.GroupTemplate>
                        <DataTemplate>
                            <telerik:RadToggleButton
                                    Content="{Binding DisplayName}"
                                    x:Name="expandCollapseButton"
                                    BorderBrush="{x:Null}"
                                    Style="{StaticResource PropertyGridToggleButtonStyle}"
                                    IsChecked="{Binding IsExpanded, Mode=TwoWay}"/>
                        </DataTemplate>
                    </propertyGrid:FlatRenderingItemTemplateSelector.GroupTemplate>
                </propertyGrid:FlatRenderingItemTemplateSelector>
            </ItemsControl.ItemTemplateSelector>
        </ItemsControl>
    </DataTemplate>
    <propertyGrid:GroupingItemsSourceConverter x:Key="GroupingItemsSourceConverter"/>
    <DataTemplate x:Key="groupTemplate">
        <ItemsControl ItemsSource="{Binding ., Converter={StaticResource GroupingItemsSourceConverter}}" Style="{StaticResource ItemsControlStyle}">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <Border BorderThickness="0,1,0,0" BorderBrush="{StaticResource ControlOuterBorder}" Margin="0,-1,0,0">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <telerik:RadToggleButton Content="{Binding Key}" x:Name="expandCollapseButton" BorderBrush="{x:Null}" Style="{StaticResource PropertyGridToggleButtonStyle}" IsChecked="True"/>
                            <ContentPresenter x:Name="PART_ContentPresenter"
                                    Grid.Row="1"
                                    Content="{Binding Items}"
                                    Visibility="{Binding IsChecked, Converter={StaticResource BooleanToVisibilityConverter}, ElementName=expandCollapseButton}">
                                <ContentPresenter.ContentTemplate>
                                    <DataTemplate>
                                        <ItemsControl ItemsSource="{Binding Converter={StaticResource FlatItemSourceConverter}}" IsTabStop="False">
                                            <ItemsControl.ItemTemplate>
                                                <DataTemplate>
                                                    <propertyGrid:PropertyGridField Content="{Binding}" Visibility="{Binding Visibility}"/>
                                                </DataTemplate>
                                            </ItemsControl.ItemTemplate>
                                        </ItemsControl>
                                    </DataTemplate>
                                </ContentPresenter.ContentTemplate>
                            </ContentPresenter>
                        </Grid>
                    </Border>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </DataTemplate>
    <propertyGrid:ItemTemplateConverter x:Key="ItemTemplateConverter"
            FlatTemplate="{StaticResource flatTemplate}"
            GroupTemplate="{StaticResource groupTemplate}"
            VirtualizedFlatTemplate="{StaticResource virtualizedFlatTemplate}"
            FlatRenderingTemplate="{StaticResource flatRenderingTemplate}"/>
    <ControlTemplate x:Key="RadPropertyGridTemplate" TargetType="controls:RadPropertyGrid">
        <Border x:Name="PART_RootElement" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="PART_PropertyGridContainer" Background="{TemplateBinding Background}">
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="auto"/>
                </Grid.RowDefinitions>
                <Border x:Name="Header"
                        BorderBrush="{StaticResource ControlOuterBorder}"
                        MinHeight="28"
                        Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource HeaderVisibilityConverter}}"
                        Margin="0, 0, 0, 2"
                        BorderThickness="0,0,0,1">
                    <Border BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="1" Background="{StaticResource PropertyGrid_HeaderBackground}">
                        <Grid Margin="1">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <telerik:RadRadioButton x:Name="groupButton"
                                    Visibility="{TemplateBinding SortAndGroupButtonsVisibility}"
                                    Margin="0,0,3,0"
                                    MinWidth="28"
                                    IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsGrouped, Mode=TwoWay}">
                                <ToolTipService.ToolTip>
                                    <ToolTip telerik:LocalizationManager.ResourceKey="Categorize"/>
                                </ToolTipService.ToolTip>
                                <Path
                                        Data="M7.0000019,8.9999981 L16.999998,8.9999981 L16.999998,9.9999981 L7.0000019,9.9999981 z M7.0000019,6.9999995 L16.999998,6.9999995 L16.999998,7.9999995 L7.0000019,7.9999995 z M0,6 L3.9999998,8.5 L0,11 z M6.999999,3.0000055 L16.999996,3.0000055 L16.999996,4.0000052 L6.999999,4.0000052 z M7.0000019,0.99999905 L16.999998,0.99999905 L16.999998,1.9999989 L7.0000019,1.9999989 z M0,0 L4,2.5000002 L0,5.0000005 z"
                                        Fill="{StaticResource RadioButton_Indicator}"
                                        Height="11"
                                        Stretch="Fill"
                                        StrokeThickness="0"
                                        Width="17"/>
                            </telerik:RadRadioButton>
                            <telerik:RadRadioButton x:Name="sortButton" Content="A-Z" Grid.Column="1" Visibility="{TemplateBinding SortAndGroupButtonsVisibility}" MinWidth="28">
                                <ToolTipService.ToolTip>
                                    <ToolTip telerik:LocalizationManager.ResourceKey="Alphabetical"/>
                                </ToolTipService.ToolTip>
                            </telerik:RadRadioButton>
                            <TextBox x:Name="searchAsYouTypeTextBox"
                                    Visibility="{TemplateBinding SearchBoxVisibility}"
                                    Grid.Column="2"
                                    HorizontalAlignment="Stretch"
                                    Margin="2,0,0,0"
                                    telerik:TextBoxBehavior.SelectAllOnGotFocus="True"
                                    Text="{Binding FilterText, ElementName=PropertyGridPresenter, Mode=TwoWay}"
                                    telerik:TextBoxBehavior.UpdateTextOnEnter="True"
                                    telerik:TextBoxBehavior.UpdateTextOnTextChanged="True"/>
                            <Border Background="{TemplateBinding Background}" Grid.Column="2" Width="22" Margin="0,1,1,1" HorizontalAlignment="Right" Visibility="{TemplateBinding SearchBoxVisibility}">
                                <Path
                                        Data="M8.4939966,1.9999999 C6.5610008,1.9999999 4.9939971,3.5670033 4.9939971,5.5 C4.9939971,7.4329967 6.5610008,9 8.4939966,9 C10.426993,9 11.993997,7.4329967 11.993997,5.5 C11.993997,3.5670033 10.426993,1.9999999 8.4939966,1.9999999 z M8.4939976,0 C11.531564,-8.7786177E-08 13.993998,2.4624338 13.993998,5.5 C13.993998,8.5375662 11.531564,11 8.4939976,11 C7.3549109,11 6.2967014,10.65372 5.4188957,10.060686 L5.3678761,10.025319 L1.4142134,13.978982 L0,12.564768 L3.9563832,8.6083851 L3.9333115,8.5751028 C3.3402777,7.6972966 2.9939978,6.6390872 2.9939978,5.5 C2.9939978,2.4624338 5.4564314,-8.7786177E-08 8.4939976,0 z"
                                        Fill="{StaticResource PropertyGrid_SearchIndicator_Background}"
                                        Height="14"
                                        Margin="4"
                                        Stretch="Fill"
                                        StrokeThickness="2"
                                        Width="14"/>
                            </Border>
                        </Grid>
                    </Border>
                </Border>
                <propertyGrid:PropertyGridPresenter
                        Grid.Row="1"
                        x:Name="PropertyGridPresenter"
                        LabelColumnWidth="{Binding LabelColumnWidth, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                        PropertyDefinitions="{Binding PropertyDefinitions, RelativeSource={RelativeSource TemplatedParent}}"
                        SearchInNestedProperties="{Binding SearchInNestedProperties, RelativeSource={RelativeSource TemplatedParent}}"
                        ContentTemplate="{Binding Path=PropertyGridLayoutState, RelativeSource={RelativeSource Self}, Converter={StaticResource ItemTemplateConverter}}"
                        Margin="0,-1,0,0"
                        IsGrouped="{TemplateBinding IsGrouped}"
                        RenderMode="{TemplateBinding RenderMode}"/>
                <Border x:Name="PART_DescriptionPanel"
                        BorderBrush="{StaticResource ControlOuterBorder}"
                        BorderThickness="0,1,0,0"
                        MinHeight="75"
                        Grid.Row="2"
                        Visibility="{TemplateBinding DescriptionPanelVisibility}">
                    <Border BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="0,1,0,0" Background="{StaticResource PropertyGrid_DescriptionBackground}">
                        <StackPanel Orientation="Vertical">
                            <TextBlock x:Name="PART_DescriptionLabelTextBlock" FontWeight="Bold" Margin="5" Text="{Binding SelectedPropertyDefinition.DisplayName, ElementName=PropertyGridPresenter}"/>
                            <TextBlock x:Name="PART_DescriptionContentTextBlock" Margin="5" TextWrapping="Wrap" Text="{Binding SelectedPropertyDefinition.Description, ElementName=PropertyGridPresenter}"/>
                        </StackPanel>
                    </Border>
                </Border>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="PropertyGridIndentCellStyle" TargetType="propertyGrid:PropertyGridIndentCell">
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="BorderThickness" Value="0,0,1,0"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="propertyGrid:PropertyGridIndentCell">
                    <Border Background="Transparent" Width="25"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadPropertyGridStyle" TargetType="controls:RadPropertyGrid">
        <Setter Property="Template" Value="{StaticResource RadPropertyGridTemplate}"/>
        <Setter Property="Background" Value="{StaticResource ControlBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="Foreground" Value="{StaticResource ControlForeground}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style x:Key="PropertyGridColumnResizerStyle" TargetType="propertyGrid:PropertyGridColumnResizer">
        <Setter Property="Template" Value="{StaticResource PropertyGridColumnResizerTemplate}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style x:Key="PropertyGridFieldStyle" TargetType="propertyGrid:PropertyGridField">
        <Setter Property="Template" Value="{StaticResource PropertyGridFieldTemplate}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="controls:RadPropertyGrid" BasedOn="{StaticResource RadPropertyGridStyle}"/>
    <Style TargetType="propertyGrid:PropertyGridField" BasedOn="{StaticResource PropertyGridFieldStyle}"/>
    <Style TargetType="propertyGrid:PropertyGridIndentCell" BasedOn="{StaticResource PropertyGridIndentCellStyle}"/>
    <Style TargetType="propertyGrid:PropertyGridColumnResizer" BasedOn="{StaticResource PropertyGridColumnResizerStyle}"/>
    <ControlTemplate x:Key="Collection_NavigatorTemplate" TargetType="controls:RadCollectionNavigator">
        <Border x:Name="PART_RootElement" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
            <Grid x:Name="PART_CollectionNavigatorGrid">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                    <telerik:RadButton x:Name="MoveCurrentToFirst"
                            Visibility="{Binding Converter={StaticResource VisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}, Path=CommandButtonsVisibility, ConverterParameter=first}"
                            Height="18"
                            Margin="4,4,2,4"
                            Width="18"
                            Command="{x:Static controls:RadCollectionNavigatorCommands.MoveCurrentToFirst}">
                        <ToolTipService.ToolTip>
                            <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_MoveCurrentToFirst"/>
                        </ToolTipService.ToolTip>
                        <StackPanel Orientation="Horizontal">
                            <Rectangle Fill="{StaticResource NagigatorIconColor}" HorizontalAlignment="Center" Height="7" VerticalAlignment="Center" Width="1" SnapsToDevicePixels="True"/>
                            <Path
                                    Data="M0,0 L3.5,3.5 0,7 Z"
                                    Fill="{StaticResource NagigatorIconColor}"
                                    HorizontalAlignment="Center"
                                    Height="7"
                                    RenderTransformOrigin="0.5, 0.5"
                                    VerticalAlignment="Center"
                                    Width="4"
                                    SnapsToDevicePixels="True">
                                <Path.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleY="1" ScaleX="-1"/>
                                        <SkewTransform AngleY="0" AngleX="0"/>
                                        <RotateTransform Angle="0"/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Path.RenderTransform>
                            </Path>
                        </StackPanel>
                    </telerik:RadButton>
                    <telerik:RadButton x:Name="MoveCurrentToPrevious"
                            Visibility="{Binding Converter={StaticResource VisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}, Path=CommandButtonsVisibility, ConverterParameter=previous}"
                            Height="18"
                            Margin="2,4,2,4"
                            Width="18"
                            Command="{x:Static controls:RadCollectionNavigatorCommands.MoveCurrentToPrevious}">
                        <ToolTipService.ToolTip>
                            <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_MoveCurrentToPrevious"/>
                        </ToolTipService.ToolTip>
                        <Path
                                Data="M0,0 L3.5,3.5 0,7 Z"
                                Fill="{StaticResource NagigatorIconColor}"
                                HorizontalAlignment="Center"
                                Height="7"
                                RenderTransformOrigin="0.5, 0.5"
                                VerticalAlignment="Center"
                                Width="4"
                                SnapsToDevicePixels="True">
                            <Path.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleY="1" ScaleX="-1"/>
                                    <SkewTransform AngleY="0" AngleX="0"/>
                                    <RotateTransform Angle="0"/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </Path.RenderTransform>
                        </Path>
                    </telerik:RadButton>
                    <telerik:RadButton x:Name="MoveCurrentToNext"
                            Visibility="{Binding Converter={StaticResource VisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}, Path=CommandButtonsVisibility, ConverterParameter=next}"
                            Height="18"
                            Margin="2,4,2,4"
                            Width="18"
                            Command="{x:Static controls:RadCollectionNavigatorCommands.MoveCurrentToNext}">
                        <ToolTipService.ToolTip>
                            <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_MoveCurrentToNext"/>
                        </ToolTipService.ToolTip>
                        <Path
                                Data="M0,0 L3.5,3.5 0,7 Z"
                                Fill="{StaticResource NagigatorIconColor}"
                                HorizontalAlignment="Center"
                                Height="7"
                                VerticalAlignment="Center"
                                Width="4"
                                SnapsToDevicePixels="True"/>
                    </telerik:RadButton>
                    <telerik:RadButton x:Name="MoveCurrentToLast"
                            Visibility="{Binding Converter={StaticResource VisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}, Path=CommandButtonsVisibility, ConverterParameter=last}"
                            Height="18"
                            Margin="2,4,2,4"
                            Width="18"
                            Command="{x:Static controls:RadCollectionNavigatorCommands.MoveCurrentToLast}">
                        <ToolTipService.ToolTip>
                            <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_MoveCurrentToLast"/>
                        </ToolTipService.ToolTip>
                        <StackPanel Orientation="Horizontal">
                            <Path
                                    Data="M0,0 L3.5,3.5 0,7 Z"
                                    Fill="{StaticResource NagigatorIconColor}"
                                    HorizontalAlignment="Center"
                                    Height="7"
                                    VerticalAlignment="Center"
                                    Width="4"
                                    SnapsToDevicePixels="True"/>
                            <Rectangle Fill="{StaticResource NagigatorIconColor}" HorizontalAlignment="Center" Height="7" VerticalAlignment="Center" Width="1" SnapsToDevicePixels="True"/>
                        </StackPanel>
                    </telerik:RadButton>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right">
                    <telerik:RadButton x:Name="AddNew"
                            Visibility="{Binding Converter={StaticResource VisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}, Path=CommandButtonsVisibility, ConverterParameter=add}"
                            Height="18"
                            Margin="2,4,2,4"
                            Width="18"
                            Command="{x:Static controls:RadCollectionNavigatorCommands.AddNew}">
                        <ToolTipService.ToolTip>
                            <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_AddNew"/>
                        </ToolTipService.ToolTip>
                        <Path
                                Data="F1M8.334,13.301L4.889,13.301L4.889,2.699L12.599,2.699L12.599,9.037L12.559,9.077L8.346,9.078L8.346,13.29z M13.74,9.442L13.74,1.602L3.747,1.602L3.747,14.397L8.784,14.397z"
                                Stretch="Fill"
                                Width="8"
                                Height="11"
                                Fill="{StaticResource NagigatorIconColor}"
                                RenderTransformOrigin="0.5,0.5"
                                SnapsToDevicePixels="True">
                            <Path.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="-1"/>
                                </TransformGroup>
                            </Path.RenderTransform>
                        </Path>
                    </telerik:RadButton>
                    <telerik:RadButton x:Name="BeginEdit"
                            Visibility="{Binding Converter={StaticResource VisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}, Path=CommandButtonsVisibility, ConverterParameter=edit}"
                            Height="18"
                            Margin="2,4,2,4"
                            Width="18"
                            Command="{x:Static controls:RadCollectionNavigatorCommands.BeginEdit}">
                        <ToolTipService.ToolTip>
                            <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_BeginEdit"/>
                        </ToolTipService.ToolTip>
                        <Path
                                Data="M3.6943,11.9199L4.1323,9.5549C4.1443,9.4019,4.1953,9.2459,4.2973,9.1289L9.4233,4.0049L11.8853,6.4669L6.7593,11.5919C6.7043,11.6469,6.4893,11.7749,6.4183,11.7869L4.0083,12.2339C3.7943,12.2749,3.6533,12.1349,3.6943,11.9199 M4.8903,11.4789L6.2383,11.2519L10.9273,6.5619L10.3673,6.0059L5.7093,10.6679L4.8153,9.7169L4.5693,11.1329C4.7253,11.1989,4.8253,11.3219,4.8903,11.4789 M12.4513,5.9019L9.9893,3.4399L10.7863,2.6439C11.0063,2.4229,11.3643,2.4229,11.5853,2.6439L13.2483,4.3069C13.4683,4.5269,13.4683,4.8849,13.2483,5.1059z"
                                Fill="{StaticResource NagigatorIconColor}"
                                Stretch="Fill"
                                Width="10"
                                Height="11"/>
                    </telerik:RadButton>
                    <telerik:RadButton x:Name="Delete"
                            Visibility="{Binding Converter={StaticResource VisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}, Path=CommandButtonsVisibility, ConverterParameter=delete}"
                            Height="18"
                            Margin="2,4,4,4"
                            Width="19"
                            Padding="0"
                            Command="{x:Static controls:RadCollectionNavigatorCommands.Delete}">
                        <ToolTipService.ToolTip>
                            <ToolTip telerik:LocalizationManager.ResourceKey="DataForm_Delete"/>
                        </ToolTipService.ToolTip>
                        <Path
                                Data="M1,3 L2,3 L2,9 L3,9 L3,3 L4,3 L4,9 L5,9 L5,3 L6,3 L6,9 L7,9 L7,3 L8,3 L8,10 L1,10 z M2,0 L7,0 L7,0.99999994 L9,0.99999994 L9,2 L0,2 L0,0.99999994 L2,0.99999994 z"
                                Fill="{StaticResource NagigatorIconColor}"
                                Stretch="Fill"
                                Width="9"
                                Height="11"
                                SnapsToDevicePixels="True"/>
                    </telerik:RadButton>
                </StackPanel>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="RadCollectionNavigatorStyle" TargetType="controls:RadCollectionNavigator">
        <Setter Property="Template" Value="{StaticResource Collection_NavigatorTemplate}"/>
        <Setter Property="BorderBrush" Value="{StaticResource DataForm_CollectionNavigator_Border}"/>
        <Setter Property="Background" Value="{StaticResource DataForm_CollectionNavigatorBackground}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Height" Value="28"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    </Style>
    <Style TargetType="controls:RadCollectionNavigator" BasedOn="{StaticResource RadCollectionNavigatorStyle}"/>
    <Style x:Key="CollectionEditorGripperStyle" TargetType="Thumb">
        <Setter Property="Width" Value="20"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Cursor" Value="SizeNWSE"/>
        <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="CollectionEditor_Template" TargetType="propertyGrid:CollectionEditor">
        <Border x:Name="PART_RootBorder"
                Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Path=Height}"
                Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Path=Width}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                Background="{TemplateBinding Background}">
            <Grid Background="Transparent">
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="2*"/>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition Width="3*"/>
                </Grid.ColumnDefinitions>
                <Border
                        Grid.ColumnSpan="3"
                        x:Name="Header"
                        Visibility="{Binding Header,RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DescriptionVisibilityConverter}}"
                        BorderThickness="1"
                        BorderBrush="{StaticResource CollectionEditor_HeaderOuterBorder}"
                        Margin="-1,-1,-1,0">
                    <Border Background="{StaticResource CollectionEditor_HeaderBackground}" BorderBrush="{StaticResource CollectionEditor_HeaderInnerBorder}" BorderThickness="1">
                        <ContentControl
                                Margin="4,6,4,6"
                                Foreground="{StaticResource CollectionEditor_HeaderForeground}"
                                FontWeight="Bold"
                                VerticalContentAlignment="Top"
                                HorizontalContentAlignment="Stretch"
                                Content="{TemplateBinding Header}"
                                VerticalAlignment="Center"/>
                    </Border>
                </Border>
                <Grid Grid.Row="1">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource ControlOuterBorder}" Background="{StaticResource CollectionEditor_CollectionNavigatorBackground}">
                        <Border BorderThickness="1" BorderBrush="{StaticResource ControlBackground}" Padding="4,4,4,3">
                            <Grid>
                                <TextBlock telerik:LocalizationManager.ResourceKey="CollectionEditorItems" Foreground="{StaticResource ControlForeground}" FontSize="11"/>
                                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                                    <telerik:RadButton
                                            IsEnabled="{TemplateBinding IsEnabled}"
                                            telerik:TouchManager.IsTouchHitTestVisible="False"
                                            Width="18"
                                            Height="18"
                                            Margin="0,0,3,0"
                                            Command="{x:Static propertyGrid:CollectionEditorCommands.MoveCurrentToNext}">
                                        <Path Fill="Black" Stretch="Fill" Stroke="{x:Null}" Width="7" Height="4" Data="M0,0 L7,0 L3.4999998,4 z" SnapsToDevicePixels="True"/>
                                    </telerik:RadButton>
                                    <telerik:RadButton
                                            IsEnabled="{TemplateBinding IsEnabled}"
                                            telerik:TouchManager.IsTouchHitTestVisible="False"
                                            Width="18"
                                            Height="18"
                                            Command="{x:Static propertyGrid:CollectionEditorCommands.MoveCurrentToPrevious}">
                                        <Path Fill="Black" Stretch="Fill" Stroke="{x:Null}" Width="7" Height="4" RenderTransformOrigin="0.5,0.5" Data="M0,0 L7,0 L3.4999998,4 z" SnapsToDevicePixels="True">
                                            <Path.RenderTransform>
                                                <TransformGroup>
                                                    <RotateTransform Angle="-180"/>
                                                </TransformGroup>
                                            </Path.RenderTransform>
                                        </Path>
                                    </telerik:RadButton>
                                </StackPanel>
                            </Grid>
                        </Border>
                    </Border>
                    <ListBox x:Name="PART_CollectionListBox"
                            Grid.Row="1"
                            IsEnabled="{TemplateBinding IsEnabled}"
                            ItemTemplate="{TemplateBinding ItemTemplate}"
                            BorderBrush="{x:Null}"
                            Background="Transparent"
                            BorderThickness="0"
                            ItemsSource="{TemplateBinding CollectionView}"
                            SelectedItem="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=CurrentItem, Mode=TwoWay}"/>
                </Grid>
                <Grid Grid.Row="1" Grid.Column="2">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Border BorderBrush="{StaticResource ControlOuterBorder}" MinHeight="28" BorderThickness="1,0,0,1">
                        <Border BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="1" Background="{StaticResource PropertyGrid_HeaderBackground}">
                            <TextBlock
                                    telerik:LocalizationManager.ResourceKey="CollectionEditorProperties"
                                    Foreground="{StaticResource ControlForeground}"
                                    Grid.Row="1"
                                    Grid.Column="2"
                                    FontSize="11"
                                    VerticalAlignment="Top"
                                    Padding="6,5,4,3"/>
                        </Border>
                    </Border>
                    <controls:RadPropertyGrid
                            IsReadOnly="{TemplateBinding IsReadOnly}"
                            IsEnabled="{TemplateBinding IsEnabled}"
                            Margin="0,2,0,0"
                            Grid.Row="1"
                            BorderThickness="0"
                            Item="{TemplateBinding CurrentItem}"
                            LabelColumnWidth="100"
                            Background="Transparent"
                            SortAndGroupButtonsVisibility="Collapsed"
                            SearchBoxVisibility="Collapsed"
                            DescriptionPanelVisibility="Collapsed"/>
                </Grid>
                <Border Width="1" Background="{StaticResource ControlOuterBorder}" Grid.Row="1" Margin="0,0,-1,0" Grid.Column="1"/>
                <Border x:Name="FooterPanel_Background"
                        Grid.Row="3"
                        BorderBrush="{StaticResource ControlOuterBorder}"
                        BorderThickness="0,1,0,0"
                        Grid.ColumnSpan="3"
                        Background="{StaticResource CollectionEditor_FooterPanel_Background}">
                    <Grid>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                            <telerik:RadButton
                                    IsEnabled="{TemplateBinding IsEnabled}"
                                    telerik:TouchManager.IsTouchHitTestVisible="False"
                                    MinWidth="48"
                                    MinHeight="21"
                                    Margin="4,6,4,7"
                                    telerik:LocalizationManager.ResourceKey="CollectionEditorAdd"
                                    Command="{x:Static propertyGrid:CollectionEditorCommands.AddNew}"/>
                            <telerik:RadButton
                                    IsEnabled="{TemplateBinding IsEnabled}"
                                    telerik:TouchManager.IsTouchHitTestVisible="False"
                                    MinWidth="48"
                                    MinHeight="21"
                                    Margin="0,6,4,7"
                                    telerik:LocalizationManager.ResourceKey="CollectionEditorRemove"
                                    Command="{x:Static propertyGrid:CollectionEditorCommands.Delete}"/>
                        </StackPanel>
                        <Thumb x:Name="PART_ResizeThumb" Style="{StaticResource CollectionEditorGripperStyle}" Visibility="{TemplateBinding ResizeGripperVisibility}"/>
                    </Grid>
                </Border>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="CollectionEditorStyle" TargetType="propertyGrid:CollectionEditor">
        <Setter Property="Template" Value="{StaticResource CollectionEditor_Template}"/>
        <Setter Property="Background" Value="{StaticResource ControlBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Width" Value="471"/>
        <Setter Property="Height" Value="370"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="propertyGrid:CollectionEditor" BasedOn="{StaticResource CollectionEditorStyle}"/>
    <ControlTemplate x:Key="CollectionEditorPicker_Template" TargetType="propertyGrid:CollectionEditorPicker">
        <Border Background="{TemplateBinding Background}" CornerRadius="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Source}" Margin="4,0,0,0" VerticalAlignment="Center" x:Name="PART_CollectionEditorTextBlock"/>
                <telerik:RadDropDownButton
                        IsEnabled="{TemplateBinding IsEnabled}"
                        Grid.Column="1"
                        Margin="0,-1,-1,-1"
                        Padding="0"
                        PopupPlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                    <telerik:RadDropDownButton.DropDownContent>
                        <propertyGrid:CollectionEditor x:Name="PART_CollectionEditor"
                                BorderThickness="0"
                                IsReadOnly="{TemplateBinding IsReadOnly}"
                                Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Path=Source}"
                                Header="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Path=Header}"
                                ResizeGripperVisibility="Visible"/>
                    </telerik:RadDropDownButton.DropDownContent>
                </telerik:RadDropDownButton>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="CollectionEditorPickerStyle" TargetType="propertyGrid:CollectionEditorPicker">
        <Setter Property="Template" Value="{StaticResource CollectionEditorPicker_Template}"/>
        <Setter Property="Background" Value="{StaticResource ControlBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
    </Style>
    <Style TargetType="propertyGrid:CollectionEditorPicker" BasedOn="{StaticResource CollectionEditorPickerStyle}"/>
    <ControlTemplate x:Key="FlagEnumEditorNonEditableTemplate" TargetType="propertyGrid:FlagEnumEditor">
        <telerik:RadDropDownButton x:Name="PART_EnumValuesDropDownButton"
                HorizontalAlignment="Stretch"
                HorizontalContentAlignment="Stretch"
                IsTabStop="False"
                ClickMode="Press"
                Padding="0"
                TabIndex="1"
                VerticalAlignment="Stretch"
                VerticalContentAlignment="Center"
                Focusable="False">
            <telerik:RadDropDownButton.DropDownContent>
                <ScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
                    <ItemsControl ItemsSource="{Binding EnumItemsSource, RelativeSource={RelativeSource TemplatedParent}}" BorderThickness="0">
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <CheckBox IsChecked="{Binding IsSelected, Mode=TwoWay}" Content="{Binding Value}" Margin="2,2,0,0" VerticalContentAlignment="Center"/>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                </ScrollViewer>
            </telerik:RadDropDownButton.DropDownContent>
            <TextBlock x:Name="FlagEnumEditor_InputTextBlock"
                    Foreground="{TemplateBinding Foreground}"
                    MinHeight="0"
                    Padding="{TemplateBinding Padding}"
                    Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, ValidatesOnExceptions=True, ValidatesOnDataErrors=True}"/>
        </telerik:RadDropDownButton>
    </ControlTemplate>
    <Style x:Key="FlagEnumEditorStyle" TargetType="propertyGrid:FlagEnumEditor">
        <Setter Property="Template" Value="{StaticResource FlagEnumEditorNonEditableTemplate}"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="Padding" Value="4 2"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="propertyGrid:FlagEnumEditor" BasedOn="{StaticResource FlagEnumEditorStyle}"/>
    <Style x:Key="TextBoxStyle" TargetType="TextBox">
        <Setter Property="Background" Value="{StaticResource PickerBackground_Normal}"/>
        <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="Padding" Value="3 2"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TextBox">
                    <Grid x:Name="RootElement" UseLayoutRounding="True" SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Hover" Storyboard.TargetProperty="Opacity" To="1"/>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="Transparent"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Disabled}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="PART_ContentHost" Storyboard.TargetProperty="Opacity" To="0.3"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ReadOnly">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ReadOnlyVisualElement"/>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderThickness">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="FocusedVisual" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="Transparent"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentHost" Storyboard.TargetProperty="Margin">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>1 1 1 1</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FocusedVisual">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="Hover" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="Transparent"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="Transparent"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="OuterBorder"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}">
                            <Grid>
                                <Border x:Name="ReadOnlyVisualElement"
                                        BorderBrush="{TemplateBinding BorderBrush}"
                                        BorderThickness="{TemplateBinding BorderThickness}"
                                        CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"
                                        Background="{StaticResource TextBoxBackground_ReadOnly}"
                                        Opacity="0"/>
                                <ScrollViewer x:Name="PART_ContentHost"
                                        Padding="{TemplateBinding Padding}"
                                        Foreground="{TemplateBinding Foreground}"
                                        Background="Transparent"
                                        VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                        HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/>
                            </Grid>
                        </Border>
                        <Border x:Name="Hover"
                                Background="Transparent"
                                BorderBrush="{StaticResource ControlOuterBorder_MouseOver}"
                                Opacity="0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                IsHitTestVisible="False"
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"/>
                        <Border x:Name="FocusedVisual"
                                Background="Transparent"
                                BorderBrush="{StaticResource ControlOuterBorder_Focused}"
                                Visibility="Collapsed"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                IsHitTestVisible="False"
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="TextBox" BasedOn="{StaticResource TextBoxStyle}"/>
    <Style TargetType="dataPager:DataPagerTextBox" BasedOn="{StaticResource TextBoxStyle}"/>
</ResourceDictionary>
