<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <!--Control colors.-->
    <!--<Color x:Key="WindowColor">#FFE8EDF9</Color>
    <Color x:Key="ContentAreaColorLight">#FFC5CBF9</Color>
    <Color x:Key="ContentAreaColorDark">#FF7381F9</Color>

    <Color x:Key="DisabledControlLightColor">#FFE8EDF9</Color>
    <Color x:Key="DisabledControlDarkColor">#FFC5CBF9</Color>
    <Color x:Key="DisabledForegroundColor">#FF888888</Color>

    <Color x:Key="SelectedBackgroundColor">#FFC5CBF9</Color>
    <Color x:Key="SelectedUnfocusedColor">#FFDDDDDD</Color>

    <Color x:Key="ControlLightColor">White</Color>
    <Color x:Key="ControlMediumColor">#FF7381F9</Color>
    <Color x:Key="ControlDarkColor">#FF211AA9</Color>

    <Color x:Key="ControlMouseOverColor">#FF3843C4</Color>
    <Color x:Key="ControlPressedColor">#FF211AA9</Color>


    <Color x:Key="GlyphColor">#FF444444</Color>
    <Color x:Key="GlyphMouseOver">sc#1, 0.004391443, 0.002428215, 0.242281124</Color>-->

    <!--Border colors-->
    <!--<Color x:Key="BorderLightColor">#FFCCCCCC</Color>
    <Color x:Key="BorderMediumColor">#FF888888</Color>
    <Color x:Key="BorderDarkColor">#FF444444</Color>

    <Color x:Key="PressedBorderLightColor">#FF888888</Color>
    <Color x:Key="PressedBorderDarkColor">#FF444444</Color>

    <Color x:Key="DisabledBorderLightColor">#FFAAAAAA</Color>
    <Color x:Key="DisabledBorderDarkColor">#FF888888</Color>

    <Color x:Key="DefaultBorderBrushDarkColor">Black</Color>-->

    <!--Control-specific resources.-->
    <!--<Color x:Key="HeaderTopColor">#FFC5CBF9</Color>
    <Color x:Key="DatagridCurrentCellBorderColor">Black</Color>
    <Color x:Key="SliderTrackDarkColor">#FFC5CBF9</Color>

    <Color x:Key="NavButtonFrameColor">#FF3843C4</Color>

    <LinearGradientBrush x:Key="MenuPopupBrush"
                     EndPoint="0.5,1"
                     StartPoint="0.5,0">
        <GradientStop Color="{DynamicResource ControlLightColor}"
                Offset="0" />
        <GradientStop Color="{DynamicResource ControlMediumColor}"
                Offset="0.5" />
        <GradientStop Color="{DynamicResource ControlLightColor}"
                Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="ProgressBarIndicatorAnimatedFill"
                     StartPoint="0,0"
                     EndPoint="1,0">
        <LinearGradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="#000000FF"
                    Offset="0" />
                <GradientStop Color="#600000FF"
                    Offset="0.4" />
                <GradientStop Color="#600000FF"
                    Offset="0.6" />
                <GradientStop Color="#000000FF"
                    Offset="1" />
            </GradientStopCollection>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>-->
    <!--<Style x:Key="ScrollBarLineButton"
       TargetType="{x:Type RepeatButton}">
        <Setter Property="SnapsToDevicePixels"
          Value="True" />
        <Setter Property="OverridesDefaultStyle"
          Value="true" />
        <Setter Property="Focusable"
          Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Border x:Name="Border" Margin="1" BorderThickness="0" 
                            Background="{StaticResource ControlBackcolor}" 
                            BorderBrush="{StaticResource ControlBackcolor}">
                        <Path x:Name="Arrow" HorizontalAlignment="Center" VerticalAlignment="Center"
                            Data="{Binding Content, 
                                RelativeSource={RelativeSource TemplatedParent}}" Fill="{StaticResource ControlForecolor}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver"  Value="True"/>
                                <Condition Property="IsEnabled"  Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource ButtonOverBackcolor}"/>
                            <Setter TargetName="Arrow" Property="Fill" Value="{StaticResource ControlForecolor}"/>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ScrollBarPageButton"
       TargetType="{x:Type RepeatButton}">
        <Setter Property="SnapsToDevicePixels"
          Value="True" />
        <Setter Property="OverridesDefaultStyle"
          Value="true" />
        <Setter Property="IsTabStop"
          Value="false" />
        <Setter Property="Focusable"
          Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Border Background="{StaticResource ControlBackcolor}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ScrollBarThumb"
       TargetType="{x:Type Thumb}">
        <Setter Property="SnapsToDevicePixels"
          Value="True" />
        <Setter Property="OverridesDefaultStyle"
          Value="true" />
        <Setter Property="IsTabStop"
          Value="false" />
        <Setter Property="Focusable"
          Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border Name="ThumBorder" Background="{StaticResource ScrollBarThumbColorNormal}" 
                            BorderBrush="{StaticResource ScrollBarThumbColorNormal}" BorderThickness="1" />
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"  Value="True">
                            <Setter TargetName="ThumBorder" Property="Background" Value="{StaticResource ScrollBarThumbColorHot}"/>
                            <Setter TargetName="ThumBorder" Property="BorderBrush" Value="{StaticResource ScrollBarThumbColorHot}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="VerticalScrollBar"
                 TargetType="{x:Type ScrollBar}">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition MaxHeight="18" />
                <RowDefinition Height="0.00001*" />
                <RowDefinition MaxHeight="18" />
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3"
            Background="{StaticResource ControlBackcolor}" />
            <RepeatButton Grid.Row="0"
                  Style="{StaticResource ScrollBarLineButton}"
                  Height="18"
                  Command="ScrollBar.LineUpCommand"
                  Content="M 0 4 L 8 4 L 4 0 Z" />
            <Track x:Name="PART_Track" Grid.Row="1" IsDirectionReversed="true">
                <Track.DecreaseRepeatButton>
                    <RepeatButton Style="{StaticResource ScrollBarPageButton}"
                      Command="ScrollBar.PageUpCommand" />
                </Track.DecreaseRepeatButton>
                <Track.Thumb>
                    <Thumb Style="{StaticResource ScrollBarThumb}" Margin="1,0,1,0" 
                           Background="{StaticResource ScrollBarThumbColorNormal}" 
                           BorderBrush="{StaticResource ScrollBarThumbColorNormal}"/>
                </Track.Thumb>
                <Track.IncreaseRepeatButton>
                    <RepeatButton Style="{StaticResource ScrollBarPageButton}"
                      Command="ScrollBar.PageDownCommand" />
                </Track.IncreaseRepeatButton>
            </Track>
            <RepeatButton Grid.Row="2"
                  Style="{StaticResource ScrollBarLineButton}"
                  Height="18"
                  Command="ScrollBar.LineDownCommand"
                  Content="M 0 0 L 4 4 L 8 0 Z" />
        </Grid>
    </ControlTemplate>

    <ControlTemplate x:Key="HorizontalScrollBar"
                 TargetType="{x:Type ScrollBar}">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition MaxWidth="18" />
                <ColumnDefinition Width="0.00001*" />
                <ColumnDefinition MaxWidth="18" />
            </Grid.ColumnDefinitions>
            <Border Grid.ColumnSpan="3" Background="{StaticResource ControlBackcolor}" />
            <RepeatButton Grid.Column="0"
                  Style="{StaticResource ScrollBarLineButton}"
                  Width="18"
                  Command="ScrollBar.LineLeftCommand"
                  Content="M 4 0 L 4 8 L 0 4 Z" />
            <Track x:Name="PART_Track"
           Grid.Column="1"
           IsDirectionReversed="False">
                <Track.DecreaseRepeatButton>
                    <RepeatButton Style="{StaticResource ScrollBarPageButton}"
                      Command="ScrollBar.PageLeftCommand" />
                </Track.DecreaseRepeatButton>
                <Track.Thumb>
                    <Thumb Style="{StaticResource ScrollBarThumb}"
                        Margin="0,1,0,1" Background="{StaticResource ScrollBarThumbColorNormal}" 
                           BorderBrush="{StaticResource ScrollBarThumbColorNormal}">
                    </Thumb>
                </Track.Thumb>
                <Track.IncreaseRepeatButton>
                    <RepeatButton Style="{StaticResource ScrollBarPageButton}"
                      Command="ScrollBar.PageRightCommand" />
                </Track.IncreaseRepeatButton>
            </Track>
            <RepeatButton Grid.Column="2"
                  Style="{StaticResource ScrollBarLineButton}"
                  Width="18"
                  Command="ScrollBar.LineRightCommand"
                  Content="M 0 0 L 4 4 L 0 8 Z" />
        </Grid>
    </ControlTemplate>

    <Style x:Key="{x:Type ScrollBar}"
       TargetType="{x:Type ScrollBar}">
        <Setter Property="SnapsToDevicePixels"
          Value="True" />
        <Setter Property="OverridesDefaultStyle"
          Value="true" />
        <Style.Triggers>
            <Trigger Property="Orientation"
             Value="Horizontal">
                <Setter Property="Width"
              Value="Auto" />
                <Setter Property="Height"
              Value="18" />
                <Setter Property="Template"
              Value="{StaticResource HorizontalScrollBar}" />
            </Trigger>
            <Trigger Property="Orientation"
             Value="Vertical">
                <Setter Property="Width"
              Value="18" />
                <Setter Property="Height"
              Value="Auto" />
                <Setter Property="Template"
              Value="{StaticResource VerticalScrollBar}" />
            </Trigger>
        </Style.Triggers>
    </Style>-->
    
    
    <DataTemplate x:Key="HeaderTemplateArrowUp">
        <DockPanel>
            <TextBlock HorizontalAlignment="Left" Text="{Binding}"/>
            <Path x:Name="arrow" StrokeThickness="1"  Fill= "{StaticResource ControlForecolor}" Data="M 5,10 L 15,10 L 10,5 L 5,10"/>
        </DockPanel>
    </DataTemplate>
    <DataTemplate x:Key="HeaderTemplateArrowDown">
        <DockPanel>
            <TextBlock HorizontalAlignment="Left" Text="{Binding}"/>
            <Path x:Name="arrow" StrokeThickness="1"  Fill= "{StaticResource ControlForecolor}" Data="M 5,5 L 15,5 L 10,10 L 5,5"/>
        </DockPanel>
    </DataTemplate>
    <!--Control colors.-->
    <Style x:Key="{x:Static GridView.GridViewScrollViewerStyleKey}"
       TargetType="ScrollViewer">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ScrollViewer">
                    <Grid Background="{TemplateBinding Background}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <DockPanel Margin="{TemplateBinding Padding}">
                            <ScrollViewer DockPanel.Dock="Top"
                          HorizontalScrollBarVisibility="Hidden"
                          VerticalScrollBarVisibility="Hidden"
                          Focusable="false">
                                <GridViewHeaderRowPresenter Margin="2,0,2,0"
                                          Columns="{Binding Path=TemplatedParent.View.Columns,
                RelativeSource={RelativeSource TemplatedParent}}"
                                          ColumnHeaderContainerStyle="{Binding
                Path=TemplatedParent.View.ColumnHeaderContainerStyle,
                RelativeSource={RelativeSource TemplatedParent}}"
                                          ColumnHeaderTemplate="{Binding
                Path=TemplatedParent.View.ColumnHeaderTemplate,
                RelativeSource={RelativeSource TemplatedParent}}"
                                          ColumnHeaderTemplateSelector="{Binding 
                Path=TemplatedParent.View.ColumnHeaderTemplateSelector,
                RelativeSource={RelativeSource TemplatedParent}}"
                                          AllowsColumnReorder="{Binding
                Path=TemplatedParent.View.AllowsColumnReorder,
                RelativeSource={RelativeSource TemplatedParent}}"
                                          ColumnHeaderContextMenu="{Binding
                Path=TemplatedParent.View.ColumnHeaderContextMenu,
                RelativeSource={RelativeSource TemplatedParent}}"
                                          ColumnHeaderToolTip="{Binding
                Path=TemplatedParent.View.ColumnHeaderToolTip,
                RelativeSource={RelativeSource TemplatedParent}}"
                                          SnapsToDevicePixels="{TemplateBinding
                SnapsToDevicePixels}" />
                            </ScrollViewer>

                            <ScrollContentPresenter Name="PART_ScrollContentPresenter"
                                    KeyboardNavigation.DirectionalNavigation="Local"
                                    CanContentScroll="True"
                                    CanHorizontallyScroll="False"
                                    CanVerticallyScroll="False" />
                        </DockPanel>

                        <ScrollBar Name="PART_HorizontalScrollBar"
                                Orientation="Horizontal"
                                Grid.Row="1"
                                Maximum="{TemplateBinding ScrollableWidth}"
                                ViewportSize="{TemplateBinding ViewportWidth}"
                                Value="{TemplateBinding HorizontalOffset}"
                                Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" />

                        <ScrollBar Name="PART_VerticalScrollBar"
                                Grid.Column="1"
                                Maximum="{TemplateBinding ScrollableHeight}"
                                ViewportSize="{TemplateBinding ViewportHeight}"
                                Value="{TemplateBinding VerticalOffset}"
                                Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="GridViewColumnHeaderGripper" TargetType="Thumb">
        <Setter Property="Width" Value="18" />
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border Padding="{TemplateBinding Padding}" Background="Transparent">
                        <Rectangle HorizontalAlignment="Center"
                     Width="1"
                     Fill="Transparent" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush" Value="Transparent"/>
    </Style>

    <Style x:Key="{x:Type GridViewColumnHeader}"
       TargetType="GridViewColumnHeader">
        <Setter Property="HorizontalContentAlignment"
          Value="Left" />
        <Setter Property="VerticalContentAlignment"
          Value="Center" />
        <Setter Property="Foreground"
          Value="{StaticResource ListViewHeaderForecolor}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="GridViewColumnHeader">
                    <Grid>
                        <Border x:Name="HeaderBorder" 
                                BorderThickness="0,1,0,1" 
                                Padding="0,5" 
                                BorderBrush="{StaticResource ListViewBackcolor}" 
                                Background="{StaticResource ListViewBackcolor}">
                            <ContentPresenter x:Name="HeaderContent"
                              Margin="5,0,5,1"
                              RecognizesAccessKey="True"
                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </Border>
                        <Thumb x:Name="PART_HeaderGripper"
                            HorizontalAlignment="Right"
                            Margin="0,0,-9,0"
                            Style="{StaticResource GridViewColumnHeaderGripper}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Role" Value="Floating">
                <!--<Setter Property="Opacity" Value="0.7" />-->
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="GridViewColumnHeader">
                            <Canvas Name="PART_FloatingHeaderCanvas">
                                <Rectangle Fill="{StaticResource ListViewBackcolor}" Width="{TemplateBinding ActualWidth}"  
                                           Height="{TemplateBinding ActualHeight}" />
                            </Canvas>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
            <Trigger Property="Role" Value="Padding">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="GridViewColumnHeader">
                            <Border Name="HeaderBorder" BorderThickness="0,1,0,1" 
                                    Background="{StaticResource ListViewBackcolor}" 
                                    BorderBrush="{StaticResource ListViewBackcolor}">
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="{x:Type ListView}" TargetType="ListView">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="{StaticResource ListViewBackcolor}" />
        <Setter Property="Background" Value="{StaticResource ListViewBackcolor}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListView">
                    <Border Name="Border" BorderThickness="{TemplateBinding BorderThickness}" 
                            Background="{TemplateBinding Background}" 
                            BorderBrush="{TemplateBinding BorderBrush}">
                        <ScrollViewer Style="{StaticResource {x:Static GridView.GridViewScrollViewerStyleKey}}">
                            <ItemsPresenter />
                        </ScrollViewer>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsGrouping" Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource ListViewBackcolor}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="{x:Type ListViewItem}" TargetType="ListViewItem" >
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="Foreground" Value="{StaticResource ListViewForecolor}"></Setter>
        <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
        <Setter Property="Background" Value="{StaticResource ListViewBackcolor}"></Setter>
        <Setter Property="Padding" Value="5"></Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListViewItem}">
                    <Border x:Name="Border" Padding="{TemplateBinding Padding}"
                                                Background="{TemplateBinding Background}"
                                                BorderBrush="{TemplateBinding BorderBrush}"
                                                BorderThickness="{TemplateBinding BorderThickness}"
                                                SnapsToDevicePixels="true" 
                                                ContextMenu="{TemplateBinding ContextMenu}">
                        <GridViewRowPresenter x:Name="Row" HorizontalAlignment="Stretch" 
                                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"  />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="True" >
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource ListViewSelectedBackcolor}"/>
                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource ListViewSelectedBackcolor}"/>
                            <Setter Property="Foreground" Value="{StaticResource ListViewSelectedForecolor}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource ListViewMouseOverBackcolor}"/>
                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource ListViewMouseOverBackcolor}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>