| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281 | <ResourceDictionary     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"	mc:Ignorable="d">    <SolidColorBrush x:Key="DataGrid_Header_BG" Color="#FF6A82AD"/>    <SolidColorBrush x:Key="DataGrid_Header_BD" Color="Black"/>    <LinearGradientBrush x:Key="DataGrid_Header_BG_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">        <GradientStop Color="#FF293968" Offset="0"/>        <GradientStop Color="#FF94A8CB" Offset="1"/>    </LinearGradientBrush>    <SolidColorBrush x:Key="DataGrid_BG_First" Color="#FFEEEEEE"/>    <SolidColorBrush x:Key="DataGrid_BG_Second" Color="#FFDEDEDE"/>    <SolidColorBrush x:Key="DataGrid_Cell_BD" Color="Gray"/>    <SolidColorBrush x:Key="DataGrid_ArrowBG" Color="White"/>    <SolidColorBrush x:Key="DataGrid_BG_Highlight" Color="#262C3D6D"/>        <Style TargetType="{x:Type DataGridCell}">        <Style.Triggers>            <Trigger Property="IsSelected" Value="True">                <Setter Property="Background" Value="CadetBlue" />            </Trigger>        </Style.Triggers>    </Style>        <Style TargetType="{x:Type DataGrid}">        <Setter Property="Background" Value="{x:Null}"/>        <Setter Property="BorderThickness" Value="0"/>        <Setter Property="Foreground" Value="{DynamicResource FG_Black}"/>        <Setter Property="RowDetailsVisibilityMode" Value="VisibleWhenSelected"/>        <Setter Property="ScrollViewer.CanContentScroll" Value="False"/>        <Setter Property="ScrollViewer.PanningMode" Value="Both"/>        <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>        <Setter Property="VerticalGridLinesBrush" Value="{DynamicResource DataGrid_Cell_BD}"/>        <Setter Property="HorizontalGridLinesBrush" Value="{DynamicResource DataGrid_Cell_BD}"/>        <Setter Property="Margin" Value="0"/>        <Setter Property="Padding" Value="0"/>        <Setter Property="Template">            <Setter.Value>                <ControlTemplate TargetType="{x:Type DataGrid}">                    <ScrollViewer x:Name="DG_ScrollViewer" Focusable="false" >                        <ScrollViewer.Template>                            <ControlTemplate TargetType="{x:Type ScrollViewer}">                                <Grid>                                    <Grid.ColumnDefinitions>                                        <ColumnDefinition Width="*"/>                                        <ColumnDefinition Width="Auto"/>                                    </Grid.ColumnDefinitions>                                    <Grid.RowDefinitions>                                        <RowDefinition Height="Auto"/>                                        <RowDefinition Height="*"/>                                        <RowDefinition Height="Auto"/>                                    </Grid.RowDefinitions>                                    <DataGridColumnHeadersPresenter x:Name="PART_ColumnHeadersPresenter" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Column}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>                                    <Border BorderBrush="Black" BorderThickness="0,0,1,0"/>                                    <Grid Grid.Row="1">                                        <Border BorderBrush="{DynamicResource DataGrid_Cell_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource DataGrid_BG_First}">                                            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}"/>                                        </Border>                                    </Grid>                                    <ScrollBar x:Name="PART_VerticalScrollBar" Grid.Column="1" Maximum="{TemplateBinding ScrollableHeight}" Orientation="Vertical" Grid.RowSpan="2" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"/>                                    <Grid Grid.Row="2">                                        <Grid.ColumnDefinitions>                                            <ColumnDefinition Width="{Binding NonFrozenColumnsViewportHorizontalOffset, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>                                            <ColumnDefinition Width="*"/>                                        </Grid.ColumnDefinitions>                                        <ScrollBar x:Name="PART_HorizontalScrollBar" Grid.Column="1" Maximum="{TemplateBinding ScrollableWidth}" Orientation="Horizontal" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}"/>                                    </Grid>                                </Grid>                            </ControlTemplate>                        </ScrollViewer.Template>                        <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>                    </ScrollViewer>                </ControlTemplate>            </Setter.Value>        </Setter>        <Style.Triggers>            <MultiTrigger>                <MultiTrigger.Conditions>                    <Condition Property="IsGrouping" Value="true"/>                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>                </MultiTrigger.Conditions>                <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>            </MultiTrigger>        </Style.Triggers>    </Style>    <BooleanToVisibilityConverter x:Key="bool2VisibilityConverter"/>    <Style x:Key="RowHeaderGripperStyle" TargetType="{x:Type Thumb}">        <Setter Property="Height" Value="8"/>        <Setter Property="Background" Value="Transparent"/>        <Setter Property="Cursor" Value="SizeNS"/>        <Setter Property="Template">            <Setter.Value>                <ControlTemplate TargetType="{x:Type Thumb}">                    <Border Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}"/>                </ControlTemplate>            </Setter.Value>        </Setter>    </Style>    <Style TargetType="{x:Type DataGridRowHeader}">        <Setter Property="BorderBrush" Value="{x:Null}"/>        <Setter Property="BorderThickness" Value="0"/>        <Setter Property="Background" Value="{x:Null}"/>        <Setter Property="Template">            <Setter.Value>                <ControlTemplate TargetType="{x:Type DataGridRowHeader}">                    <Grid>                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">                            <StackPanel Orientation="Horizontal">                                <ContentPresenter RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>                                <Control SnapsToDevicePixels="false" Template="{Binding ValidationErrorTemplate, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}}}" Visibility="{Binding (Validation.HasError), Converter={StaticResource bool2VisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}}}"/>                            </StackPanel>                        </Border>                        <Thumb x:Name="PART_TopHeaderGripper" Style="{StaticResource RowHeaderGripperStyle}" VerticalAlignment="Top"/>                        <Thumb x:Name="PART_BottomHeaderGripper" Style="{StaticResource RowHeaderGripperStyle}" VerticalAlignment="Bottom"/>                    </Grid>                </ControlTemplate>            </Setter.Value>        </Setter>    </Style>    <Style TargetType="{x:Type DataGridRow}">        <Style.Triggers>            <Trigger Property="ItemsControl.AlternationIndex" Value="0">                <Setter Property="Background" Value="{DynamicResource DataGrid_BG_First}"/>            </Trigger>            <Trigger Property="ItemsControl.AlternationIndex" Value="1">                <Setter Property="Background" Value="{DynamicResource DataGrid_BG_Second}"/>            </Trigger>        </Style.Triggers>    </Style>    <Style TargetType="{x:Type DataGridColumnHeadersPresenter}">        <Setter Property="MinHeight" Value="24"/>        <Setter Property="BorderBrush" Value="{DynamicResource DataGrid_Header_BD}"/>        <Setter Property="Background" Value="{DynamicResource DataGrid_Header_BG}"/>        <Setter Property="Template">            <Setter.Value>                <ControlTemplate TargetType="{x:Type DataGridColumnHeadersPresenter}">                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" Background="{TemplateBinding Background}">                        <ItemsPresenter />                    </Border>                </ControlTemplate>            </Setter.Value>        </Setter>    </Style>    <Style x:Key="ColumnHeaderGripperStyle" TargetType="{x:Type Thumb}">        <Setter Property="Width" Value="8"/>        <Setter Property="Background" Value="Transparent"/>        <Setter Property="Cursor" Value="SizeWE"/>        <Setter Property="Template">            <Setter.Value>                <ControlTemplate TargetType="{x:Type Thumb}">                    <Border Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}"/>                </ControlTemplate>            </Setter.Value>        </Setter>    </Style>    <Style TargetType="{x:Type DataGridColumnHeader}">        <Setter Property="SnapsToDevicePixels" Value="True"/>        <Setter Property="HorizontalContentAlignment" Value="Center"/>        <Setter Property="BorderBrush" Value="{DynamicResource DataGrid_Header_BD}"/>        <Setter Property="BorderThickness" Value="0,0,1,0"/>        <Setter Property="Padding" Value="5,1"/>        <Setter Property="Background" Value="{DynamicResource DataGrid_Header_BG}"/>        <Setter Property="Foreground" Value="{DynamicResource FG_White}"/>        <Setter Property="MinHeight" Value="24"/>        <Setter Property="Template">            <Setter.Value>                <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">                    <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Cursor="Hand">                        <Grid>                            <Path x:Name="Arrow" Visibility="Collapsed" Data="M0,0 L1,0 0.5,1 z" Stretch="Fill" Width="8" Height="4" Fill="{DynamicResource DataGrid_ArrowBG}" Margin="0,2,0,0" HorizontalAlignment="Center" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.4" />                            <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">                                <ContentPresenter.Effect>                                    <DropShadowEffect BlurRadius="0" ShadowDepth="1" Direction="315"/>                                </ContentPresenter.Effect>                            </ContentPresenter>                            <Thumb x:Name="PART_RightHeaderGripper" Style="{StaticResource ColumnHeaderGripperStyle}" HorizontalAlignment="Right"/>                        </Grid>                    </Border>                    <ControlTemplate.Triggers>                        <Trigger Property="SortDirection" Value="Ascending">                            <Setter TargetName="Arrow" Property="Visibility" Value="Visible" />                            <Setter TargetName="Arrow" Property="RenderTransform">                                <Setter.Value>                                    <RotateTransform Angle="180" />                                </Setter.Value>                            </Setter>                            <Setter Property="Background" Value="{DynamicResource DataGrid_Header_BG_MouseOver}"/>                        </Trigger>                        <Trigger Property="SortDirection" Value="Descending">                            <Setter TargetName="Arrow" Property="Visibility" Value="Visible" />                            <Setter Property="Background" Value="{DynamicResource DataGrid_Header_BG_MouseOver}"/>                        </Trigger>                        <MultiTrigger>                            <MultiTrigger.Conditions>                                <Condition Property="IsMouseOver" Value="True" />                                <Condition Property="SortDirection" Value="{x:Null}" />                            </MultiTrigger.Conditions>                            <Setter Property="Background" Value="{DynamicResource DataGrid_Header_BG_MouseOver}"/>                        </MultiTrigger>                    </ControlTemplate.Triggers>                </ControlTemplate>            </Setter.Value>        </Setter>    </Style>    <SolidColorBrush x:Key="{x:Static DataGrid.FocusBorderBrushKey}" Color="#FF000000"/><!--    <Style TargetType="{x:Type DataGridCellsPresenter}">        <Setter Property="Height" Value="24"/>        <Setter Property="BorderBrush" Value="{DynamicResource DataGrid_Cell_BD}"/>        <Setter Property="BorderThickness" Value="0,0,0,1"/>        <Setter Property="Background" Value="Transparent"/>        <Setter Property="Template">            <Setter.Value>                <ControlTemplate TargetType="{x:Type DataGridCellsPresenter}">                    <Grid>                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"/>                        <ItemsPresenter Margin="0"/>                    </Grid>                </ControlTemplate>            </Setter.Value>        </Setter>    </Style>    <Style TargetType="{x:Type DataGridCell}">        <Setter Property="Background" Value="Transparent"/>        <Setter Property="BorderBrush" Value="{DynamicResource DataGrid_Cell_BD}"/>        <Setter Property="Foreground" Value="Black"/>        <Setter Property="HorizontalContentAlignment" Value="Left"/>        <Setter Property="VerticalContentAlignment" Value="Center"/>        <Setter Property="BorderThickness" Value="0"/>        <Setter Property="Height" Value="24"/>        <Setter Property="Margin" Value="0"/>        <Setter Property="Padding" Value="3,1"/>        <Setter Property="Template">            <Setter.Value>                <ControlTemplate TargetType="{x:Type DataGridCell}">                    <Border x:Name="BG" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" SnapsToDevicePixels="True" Cursor="Hand">                        <Grid>                            <Rectangle x:Name="Highlight" Fill="{DynamicResource DataGrid_BG_Highlight}" Opacity="0"/>                            <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>                        </Grid>                    </Border>                    <ControlTemplate.Triggers>                        <Trigger Property="IsSelected" Value="True">                            <Setter Property="Opacity" TargetName="Highlight" Value="1"/>                        </Trigger>                        <MultiTrigger>                            <MultiTrigger.Conditions>                                <Condition Property="IsSelected" Value="true"/>                                <Condition Property="Selector.IsSelectionActive" Value="false"/>                            </MultiTrigger.Conditions>                            <Setter Property="Opacity" TargetName="Highlight" Value="1"/>                        </MultiTrigger>                        <MultiTrigger>                            <MultiTrigger.Conditions>                                <Condition Property="IsMouseOver" Value="True" />                            </MultiTrigger.Conditions>                            <Setter Property="Opacity" TargetName="Highlight" Value="1"/>                        </MultiTrigger>                        <Trigger Property="IsEnabled" Value="false">                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>                        </Trigger>                    </ControlTemplate.Triggers>                </ControlTemplate>            </Setter.Value>        </Setter>    </Style>-->    </ResourceDictionary>
 |