He,YuanHui —— 业精于勤荒于嬉,行成于思毁于随

如果你喜欢一个事,又有这样的才干,那就把整个人都投入进去,就要象一把刀直扎下去直到刀柄一样,不要问为什么,也不要管会碰到什么。

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

在使用WPF控件时,系统默认使用缺省控件模板(Default ControlTemplate),除非你定制了ControlTemplate。

系统提供的ControlTemplate对于我们定制模板非常有用,提供了很好的参考模板,各个模板的Xaml代码如下:

(可通过搜索控件名称找到相应的控件Xaml代码)

本Xaml来自msdn,仅供学习交流,所有权归微软所有!

 

由于 WPF 的外观由模板定义,因此 WPF 为每个已知 Windows 主题包括了一个模板,这些主题包括 Aero (Windows Vista)、Classic (Microsoft Windows 2000)、Luna (Microsoft Windows XP) 和 Royale (Microsoft Windows XP Media Center Edition 2005)。

Source: classic.xaml 
  
 
<!--=================================================================
Copyright (C) Microsoft Corporation.  All rights reserved.

==================================================================-->

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:theme="clr-namespace:Microsoft.Windows.Themes"
                    xmlns:ui="clr-namespace:System.Windows.Documents;assembly=PresentationUI">

    <JournalEntryListConverter x:Key="&#200;"/>

    <!-- Browser Window back/fwd button Drop Down style-->
    <Style x:Key="&#201;"
           TargetType="{x:Type MenuItem}">
        <Setter Property="Header"
                Value="{Binding Path=Name}"/>
        <Setter Property="Command"
                Value="NavigationCommands.NavigateJournal"/>
        <Setter Property="CommandTarget"
                Value="{Binding RelativeSource={RelativeSource Self}}"/>
        <Setter Property="CommandParameter"
                Value="{Binding RelativeSource={RelativeSource Self}}"/>
    </Style>

 


   
    <!--
            **********************************************************
            * BrowserWindow Styles                                   *
            **********************************************************
    -->
    <!-- Downlevel Browser Window Back Button Style -->
    <Style x:Key="&#202;"
           TargetType="{x:Type Button}">
        <!-- We will need to find out the size of button and menu height from system resources -->
        <!-- Opened work item #22122 to track this-->
        <Setter Property="MinWidth"
                Value="0"/>
        <Setter Property="Margin"
                Value="0,0,0,0"/>
        <Setter Property="IsEnabled"
                Value="false"/>
        <Setter Property="Command"
                Value="NavigationCommands.BrowseBack"/>
        <Setter Property="Focusable"
                Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <DockPanel>
                        <!--right -->
                        <Rectangle DockPanel.Dock="Right"
                                   x:Name="R1"
                                   Width="1"
                                   Visibility="Hidden"
                                   Fill="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"/>
                        <!--bottom-->
                        <Rectangle DockPanel.Dock="Bottom"
                                   x:Name="B1"
                                   Height="1"
                                   Visibility="Hidden"
                                   Fill="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"/>
                        <!--left  -->
                        <Rectangle DockPanel.Dock="Left"
                                   x:Name="L1"
                                   Width="1"
                                   Visibility="Hidden"
                                   Fill="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
                        <!--top   -->
                        <Rectangle DockPanel.Dock="Top"
                                   x:Name="T1"
                                   Height="1"
                                   Visibility="Hidden"
                                   Fill="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <Viewbox Grid.Column="0"
                                     Grid.Row="0">
                                <Grid Width="50"
                                      Height="50"
                                      Margin="15,0,0,0">
                                    <Ellipse x:Name="EllipseBackground"
                                             Opacity="1"
                                             StrokeThickness="2">
                                        <Ellipse.Fill>
                                            <LinearGradientBrush StartPoint="0,0"
                                                                 EndPoint="0,1">
                                                <GradientBrush.GradientStops>
                                                    <GradientStopCollection>
                                                        <GradientStop Color="#B3E2A2"
                                                                      Offset="0"/>
                                                        <GradientStop Color="#25B40E"
                                                                      Offset="1"/>
                                                    </GradientStopCollection>
                                                </GradientBrush.GradientStops>
                                            </LinearGradientBrush>
                                        </Ellipse.Fill>
                                        <Ellipse.Stroke>
                                            <LinearGradientBrush StartPoint="0,0"
                                                                 EndPoint="0,1">
                                                <GradientBrush.GradientStops>
                                                    <GradientStopCollection>
                                                        <GradientStop Color="black"
                                                                      Offset="0"/>
                                                        <GradientStop Color="#ccffffff"
                                                                      Offset="1"/>
                                                    </GradientStopCollection>
                                                </GradientBrush.GradientStops>
                                            </LinearGradientBrush>
                                        </Ellipse.Stroke>
                                    </Ellipse>
                                    <Ellipse x:Name="EllipseShine"
                                             Stroke="transparent"
                                             Margin="5,3,5,15">
                                        <Ellipse.Fill>
                                            <LinearGradientBrush StartPoint="0,0"
                                                                 EndPoint="0,1">
                                                <GradientBrush.GradientStops>
                                                    <GradientStopCollection>
                                                        <GradientStop Color="#aaffffff"
                                                                      Offset="0"/>
                                                        <GradientStop Color="transparent"
                                                                      Offset="1"/>
                                                    </GradientStopCollection>
                                                </GradientBrush.GradientStops>
                                            </LinearGradientBrush>
                                        </Ellipse.Fill>
                                    </Ellipse>
                                    <Path x:Name="Arrow"
                                          Fill="white"
                                          Stroke="#086403"
                                          Data="M0.5,20.468c0.002,0.34,0.036,0.679,0.102,1.013c0.032,0.162,0.092,0.312,0.139,0.468    c0.052,0.176,0.092,0.355,0.163,0.527c0.076,0.183,0.18,0.349,0.274,0.521c0.073,0.132,0.131,0.27,0.216,0.397    c0.196,0.294,0.418,0.568,0.667,0.817l14.611,14.611c2.083,2.083,5.459,2.083,7.542,0c2.083-2.083,2.083-5.459,0-7.542    l-5.509-5.509h23.791c2.945,0,5.333-2.388,5.333-5.333c0-2.946-2.388-5.333-5.333-5.333H18.732l5.509-5.509    c2.083-2.083,2.083-5.459,0-7.542c-2.083-2.083-5.459-2.083-7.542,0L2.203,16.549c-0.043,0.04-0.095,0.07-0.136,0.111    c-0.002,0.002-0.005,0.003-0.007,0.006c-0.002,0.002-0.003,0.004-0.005,0.006c-0.246,0.247-0.465,0.517-0.659,0.807    c-0.088,0.132-0.149,0.275-0.224,0.413c-0.092,0.167-0.192,0.328-0.266,0.505c-0.072,0.175-0.114,0.357-0.167,0.538    c-0.045,0.153-0.104,0.299-0.135,0.458C0.536,19.732,0.5,20.075,0.5,20.419c0,0.006-0.002,0.012-0.002,0.019    C0.498,20.448,0.5,20.458,0.5,20.468z">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <TransformGroup.Children>
                                                    <TransformCollection>
                                                        <ScaleTransform ScaleX="0.65"
                                                                        ScaleY="0.65"/>
                                                        <TranslateTransform X="11.5"
                                                                            Y="10"/>
                                                    </TransformCollection>
                                                </TransformGroup.Children>
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                </Grid>
                            </Viewbox>
                            <Grid Grid.Column="1"
                                  Grid.Row="0"
                                  Width="10">
                                <Path VerticalAlignment="center"
                                      HorizontalAlignment="center"
                                      Fill="{TemplateBinding Foreground}"
                                      Data="M 0 0 L 3.5 4 L 7 0 Z"/>
                                <Menu Background="Transparent"
                                      KeyboardNavigation.TabNavigation="None"
                                      FocusManager.IsFocusScope="false" IsMainMenu="false">
                                    <Menu.ItemsPanel>
                                        <ItemsPanelTemplate>
                                            <Grid/>
                                        </ItemsPanelTemplate>
                                    </Menu.ItemsPanel>
                                    <MenuItem x:Name="NavWinMenu"
                                              ItemContainerStyle="{StaticResource &#201;}"
                                              ItemsSource="{Binding Path=BackStack,Mode=OneTime,Converter={StaticResource &#200;},RelativeSource={RelativeSource AncestorType={x:Type NavigationWindow}}}"/>
                                </Menu>
                            </Grid>
                        </Grid>
                    </DockPanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Path.Fill"
                                    TargetName="EllipseBackground">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0,0"
                                                         EndPoint="0,1">
                                        <GradientBrush.GradientStops>
                                            <GradientStopCollection>
                                                <GradientStop Color="white"
                                                              Offset="0"/>
                                                <GradientStop Color="gray"
                                                              Offset="1"/>
                                            </GradientStopCollection>
                                        </GradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True"/>
                                <Condition Property="IsEnabled" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="EllipseBackground"
                                    Property="Path.Fill">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0,0"
                                                         EndPoint="0,1">
                                        <GradientBrush.GradientStops>
                                            <GradientStopCollection>
                                                <GradientStop Color="#25B40E"
                                                              Offset="0"/>
                                                <GradientStop Color="#086403"
                                                              Offset="1"/>
                                            </GradientStopCollection>
                                        </GradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="NavWinMenu"
                                    Property="Background"
                                    Value="Transparent">
                            </Setter>
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="L1"/>
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="R1"/>
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="T1"/>
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="B1"/>
                        </MultiTrigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter TargetName="EllipseBackground"
                                    Property="Path.Fill">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0,0"
                                                         EndPoint="0,1">
                                        <GradientBrush.GradientStops>
                                            <GradientStopCollection>
                                                <GradientStop Color="#25B40E"
                                                              Offset="0"/>
                                                <GradientStop Color="#086403"
                                                              Offset="1"/>
                                            </GradientStopCollection>
                                        </GradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="Arrow"
                                    Property="Path.RenderTransform">
                                <Setter.Value>
                                    <TransformGroup>
                                        <TransformGroup.Children>
                                            <TransformCollection>
                                                <ScaleTransform ScaleX="0.65"
                                                                ScaleY="0.65"/>
                                                <TranslateTransform X="10"
                                                                    Y="12"/>
                                            </TransformCollection>
                                        </TransformGroup.Children>
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="EllipseShine"
                                    Property="Path.RenderTransform">
                                <Setter.Value>
                                    <TranslateTransform X="0"
                                                        Y="2"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!-- Downlevel Browser Window Forward Button Style -->
    <Style x:Key="&#203;"
           TargetType="{x:Type Button}">
        <!-- We will need to find out the size of button and menu height from system resources -->
        <!-- Opened work item #22122 to track this-->
        <Setter Property="MinWidth"
                Value="0"/>
        <Setter Property="Margin"
                Value="0,0,0,0"/>
        <Setter Property="IsEnabled"
                Value="false"/>
        <Setter Property="Command"
                Value="NavigationCommands.BrowseForward"/>
        <Setter Property="Focusable"
                Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <DockPanel>
                        <!--right -->
                        <Rectangle DockPanel.Dock="Right"
                                   x:Name="R1"
                                   Width="1"
                                   Visibility="Hidden"
                                   Fill="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"/>
                        <!--bottom-->
                        <Rectangle DockPanel.Dock="Bottom"
                                   x:Name="B1"
                                   Height="1"
                                   Visibility="Hidden"
                                   Fill="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"/>
                        <!--left  -->
                        <Rectangle DockPanel.Dock="Left"
                                   x:Name="L1"
                                   Width="1"
                                   Visibility="Hidden"
                                   Fill="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
                        <!--top   -->
                        <Rectangle DockPanel.Dock="Top"
                                   x:Name="T1"
                                   Height="1"
                                   Visibility="Hidden"
                                   Fill="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <Viewbox Grid.Column="0"
                                     Grid.Row="0">
                                <Grid Width="50"
                                      Height="50"
                                      Margin="15,0,0,0">
                                    <Ellipse x:Name="EllipseBackground"
                                             Opacity="1"
                                             StrokeThickness="2">
                                        <Ellipse.Fill>
                                            <LinearGradientBrush StartPoint="0,0"
                                                                 EndPoint="0,1">
                                                <GradientBrush.GradientStops>
                                                    <GradientStopCollection>
                                                        <GradientStop Color="#B3E2A2"
                                                                      Offset="0"/>
                                                        <GradientStop Color="#25B40E"
                                                                      Offset="1"/>
                                                    </GradientStopCollection>
                                                </GradientBrush.GradientStops>
                                            </LinearGradientBrush>
                                        </Ellipse.Fill>
                                        <Ellipse.Stroke>
                                            <LinearGradientBrush StartPoint="0,0"
                                                                 EndPoint="0,1">
                                                <GradientBrush.GradientStops>
                                                    <GradientStopCollection>
                                                        <GradientStop Color="black"
                                                                      Offset="0"/>
                                                        <GradientStop Color="#ccffffff"
                                                                      Offset="1"/>
                                                    </GradientStopCollection>
                                                </GradientBrush.GradientStops>
                                            </LinearGradientBrush>
                                        </Ellipse.Stroke>
                                    </Ellipse>
                                    <Ellipse x:Name="EllipseShine"
                                             Stroke="transparent"
                                             Margin="5,3,5,15">
                                        <Ellipse.Fill>
                                            <LinearGradientBrush StartPoint="0,0"
                                                                 EndPoint="0,1">
                                                <GradientBrush.GradientStops>
                                                    <GradientStopCollection>
                                                        <GradientStop Color="#aaffffff"
                                                                      Offset="0"/>
                                                        <GradientStop Color="transparent"
                                                                      Offset="1"/>
                                                    </GradientStopCollection>
                                                </GradientBrush.GradientStops>
                                            </LinearGradientBrush>
                                        </Ellipse.Fill>
                                    </Ellipse>
                                    <Path x:Name="Arrow"
                                          Fill="white"
                                          Stroke="#086403"
                                          Data="M47.82,20.407c-0.002-0.34-0.036-0.679-0.102-1.013c-0.032-0.162-0.092-0.312-0.139-0.468    c-0.052-0.176-0.092-0.355-0.163-0.527c-0.076-0.183-0.18-0.349-0.274-0.521c-0.073-0.132-0.131-0.27-0.216-0.397    c-0.196-0.294-0.418-0.568-0.667-0.817L31.647,2.053c-2.083-2.083-5.459-2.083-7.542,0c-2.083,2.083-2.083,5.459,0,7.542    l5.509,5.509H5.823c-2.945,0-5.333,2.388-5.333,5.333c0,2.946,2.388,5.333,5.333,5.333h23.765l-5.509,5.509    c-2.083,2.083-2.083,5.459,0,7.542c2.083,2.083,5.459,2.083,7.542,0l14.497-14.497c0.043-0.04,0.095-0.07,0.136-0.111    c0.002-0.002,0.005-0.003,0.007-0.006c0.002-0.002,0.003-0.004,0.005-0.006c0.246-0.247,0.465-0.517,0.659-0.807    c0.088-0.132,0.149-0.275,0.224-0.413c0.092-0.167,0.192-0.328,0.266-0.505c0.072-0.175,0.114-0.357,0.167-0.538    c0.045-0.153,0.104-0.299,0.135-0.458c0.067-0.339,0.103-0.682,0.104-1.026c0-0.006,0.002-0.012,0.002-0.019    C47.823,20.427,47.82,20.417,47.82,20.407z">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <TransformGroup.Children>
                                                    <TransformCollection>
                                                        <ScaleTransform ScaleX="0.65"
                                                                        ScaleY="0.65"/>
                                                        <TranslateTransform X="8.5"
                                                                            Y="10"/>
                                                    </TransformCollection>
                                                </TransformGroup.Children>
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                </Grid>
                            </Viewbox>
                            <Grid Grid.Column="1"
                                  Grid.Row="0"
                                  Width="10">
                                <Path VerticalAlignment="center"
                                      HorizontalAlignment="center"
                                      Fill="{TemplateBinding Foreground}"
                                      Data="M 0 0 L 3.5 4 L 7 0 Z"/>
                                <Menu Background="Transparent"
                                      KeyboardNavigation.TabNavigation="None"
                                      FocusManager.IsFocusScope="false" IsMainMenu="false">
                                    <Menu.ItemsPanel>
                                        <ItemsPanelTemplate>
                                            <Grid/>
                                        </ItemsPanelTemplate>
                                    </Menu.ItemsPanel>
                                    <MenuItem x:Name="NavWinMenu"
                                              ItemContainerStyle="{StaticResource &#201;}"
                                              ItemsSource="{Binding Path=ForwardStack,Mode=OneTime,Converter={StaticResource &#200;},RelativeSource={RelativeSource AncestorType={x:Type NavigationWindow}}}"/>
                                </Menu>
                            </Grid>
                        </Grid>
                    </DockPanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Path.Fill"
                                    TargetName="EllipseBackground">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0,0"
                                                         EndPoint="0,1">
                                        <GradientBrush.GradientStops>
                                            <GradientStopCollection>
                                                <GradientStop Color="white"
                                                              Offset="0"/>
                                                <GradientStop Color="gray"
                                                              Offset="1"/>
                                            </GradientStopCollection>
                                        </GradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True"/>
                                <Condition Property="IsEnabled" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="EllipseBackground"
                                    Property="Path.Fill">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0,0"
                                                         EndPoint="0,1">
                                        <GradientBrush.GradientStops>
                                            <GradientStopCollection>
                                                <GradientStop Color="#25B40E"
                                                              Offset="0"/>
                                                <GradientStop Color="#086403"
                                                              Offset="1"/>
                                            </GradientStopCollection>
                                        </GradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="NavWinMenu"
                                    Property="Background"
                                    Value="Transparent">
                            </Setter>
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="L1"/>
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="R1"/>
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="T1"/>
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="B1"/>
                        </MultiTrigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter TargetName="EllipseBackground"
                                    Property="Path.Fill">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0,0"
                                                         EndPoint="0,1">
                                        <GradientBrush.GradientStops>
                                            <GradientStopCollection>
                                                <GradientStop Color="#25B40E"
                                                              Offset="0"/>
                                                <GradientStop Color="#086403"
                                                              Offset="1"/>
                                            </GradientStopCollection>
                                        </GradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="Arrow"
                                    Property="Path.RenderTransform">
                                <Setter.Value>
                                    <TransformGroup>
                                        <TransformGroup.Children>
                                            <TransformCollection>
                                                <ScaleTransform ScaleX="0.65"
                                                                ScaleY="0.65"/>
                                                <TranslateTransform X="10"
                                                                    Y="12"/>
                                            </TransformCollection>
                                        </TransformGroup.Children>
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="EllipseShine"
                                    Property="Path.RenderTransform">
                                <Setter.Value>
                                    <TranslateTransform X="0"
                                                        Y="2"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="&#204;"
                     TargetType="{x:Type NavigationWindow}">
        <Border Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}">
            <AdornerDecorator>
                <ContentPresenter Name="PART_NavWinCP" ClipToBounds="true"/>
            </AdornerDecorator>
        </Border>
    </ControlTemplate>
    <Style x:Key="{x:Static SystemParameters.NavigationChromeStyleKey}"
           TargetType="{x:Type NavigationWindow}">
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
        <Setter Property="Template"
                Value="{StaticResource &#204;}"/>
    </Style>
    <ControlTemplate x:Key="&#205;"
                     TargetType="{x:Type NavigationWindow}">
        <Border Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}">
            <DockPanel>
                <Grid
                      FlowDirection="{x:Static theme:PlatformCulture.FlowDirection}"
                      DockPanel.Dock="Top"
                      Height="30">
                    <Grid.Background>
                        <LinearGradientBrush StartPoint="0,0"
                                             EndPoint="1,0">
                            <GradientBrush.GradientStops>
                                <GradientStopCollection>
                                    <GradientStop Color="silver"
                                                  Offset="0"/>
                                    <GradientStop Color="white"
                                                  Offset="1"/>
                                </GradientStopCollection>
                            </GradientBrush.GradientStops>
                        </LinearGradientBrush>
                    </Grid.Background>
                    <DockPanel LastChildFill="false">
                        <Button Style="{StaticResource &#202;}"
                                DockPanel.Dock="left"
                                Width="40"
                                Button.IsEnabled="{TemplateBinding NavigationWindow.CanGoBack}"/>
                        <Button Style="{StaticResource &#203;}"
                                DockPanel.Dock="left"
                                Width="40"
                                Button.IsEnabled="{TemplateBinding NavigationWindow.CanGoForward}"/>
                    </DockPanel>
                </Grid>
                <Border>
                    <AdornerDecorator>
                        <ContentPresenter Name="PART_NavWinCP" ClipToBounds="true"/>
                    </AdornerDecorator>
                </Border>
            </DockPanel>
        </Border>
    </ControlTemplate>
    <Style x:Key="{x:Static SystemParameters.NavigationChromeDownLevelStyleKey}"
           TargetType="{x:Type NavigationWindow}">
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
        <Setter Property="Template"
                Value="{StaticResource &#205;}"/>
        <Style.Triggers>
            <Trigger Property="NavigationWindow.ShowsNavigationUI"
                     Value="false">
                <Setter Property="Template"
                        Value="{StaticResource &#204;}"/>
            </Trigger>
        </Style.Triggers>
    </Style>

 

<Style x:Key="&#206;">
    <Setter Property="Control.Template">
        <Setter.Value>
            <ControlTemplate>
                <Border>
                    <Rectangle Margin="4"
                               StrokeThickness="1"
                               Stroke="Black"
                               StrokeDashArray="1 2"
                               SnapsToDevicePixels="true"/>
                </Border>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>


<!--=================================================================
        Button
    ==================================================================-->
    <Style x:Key="&#207;"
           TargetType="{x:Type ButtonBase}">
        <Setter Property="FocusVisualStyle"
                Value="{StaticResource &#206;}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="BorderBrush"
                Value="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"/>
        <Setter Property="BorderThickness"
                Value="3"/>
        <Setter Property="HorizontalContentAlignment"
                Value="Center"/>
        <Setter Property="VerticalContentAlignment"
                Value="Center"/>
        <Setter Property="Padding"
                Value="0,0,1,1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ButtonBase}">
                    <theme:ClassicBorderDecorator x:Name="ContentContainer"
                                                  BorderStyle="Raised"
                                                  Background="{TemplateBinding Background}"
                                                  BorderThickness="3"
                                                  BorderBrush="{TemplateBinding BorderBrush}"
                                                  SnapsToDevicePixels="true">
                        <ContentPresenter Margin="{TemplateBinding Padding}"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          RecognizesAccessKey="True"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </theme:ClassicBorderDecorator>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsKeyboardFocused"
                                 Value="true">
                            <Setter Property="BorderStyle"
                                    Value="RaisedFocused"
                                    TargetName="ContentContainer"/>
                        </Trigger>
                        <Trigger Property="Button.IsDefaulted"
                                 Value="true">
                            <Setter Property="BorderStyle"
                                    Value="RaisedFocused"
                                    TargetName="ContentContainer"/>
                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter Property="BorderStyle"
                                    Value="RaisedPressed"
                                    TargetName="ContentContainer"/>
                        </Trigger>
                        <Trigger Property="ToggleButton.IsChecked"
                                 Value="true">
                            <Setter Property="BorderStyle"
                                    Value="RaisedPressed"
                                    TargetName="ContentContainer"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style x:Key="{x:Type ToggleButton}"
           BasedOn="{StaticResource &#207;}"
           TargetType="{x:Type ToggleButton}"/>

    <Style x:Key="{x:Type RepeatButton}"
           BasedOn="{StaticResource &#207;}"
           TargetType="{x:Type RepeatButton}">
        <Setter Property="Stylus.IsPressAndHoldEnabled"
                Value="false"/>
    </Style>

    <Style x:Key="{x:Type Button}"
           BasedOn="{StaticResource &#207;}"
           TargetType="{x:Type Button}"/>

 


    <Style x:Key="&#208;">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle Margin="14,0,0,0"
                               StrokeThickness="1"
                               Stroke="Black"
                               StrokeDashArray="1 2"
                               SnapsToDevicePixels="true"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="&#209;">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle Margin="1"
                               StrokeThickness="1"
                               Stroke="Black"
                               StrokeDashArray="1 2"
                               SnapsToDevicePixels="true"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <!--=================================================================
        CheckBox
    ==================================================================-->
    <Style x:Key="{x:Type CheckBox}"
           TargetType="{x:Type CheckBox}">
        <Setter Property="FocusVisualStyle"
                Value="{StaticResource &#208;}"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
        <Setter Property="BorderBrush"
                Value="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"/>
        <Setter Property="BorderThickness"
                Value="2"/>
        <Setter Property="Padding"
                Value="2,0,0,0"/>
        <Setter Property="FocusVisualStyle"
                Value="{StaticResource &#209;}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type CheckBox}">
                    <BulletDecorator Background="Transparent"
                                     SnapsToDevicePixels="true">
                        <BulletDecorator.Bullet>
                            <!-- Draw Checkmark border and tick mark -->
                            <theme:ClassicBorderDecorator x:Name="CheckMark"
                                                          BorderStyle="Sunken"
                                                          Background="{TemplateBinding Background}"
                                                          BorderThickness="{TemplateBinding BorderThickness}"
                                                          BorderBrush="{TemplateBinding BorderBrush}">
                                <Path x:Name="CheckMarkPath"
                                      Margin="1,1,1,1"
                                      Width="7"
                                      Height="7"
                                      FlowDirection="LeftToRight"
                                      Fill="{TemplateBinding Foreground}"
                                      Data="M 0 2.0 L 0 4.8 L 2.5 7.4 L 7.1 2.8 L 7.1 0 L 2.5 4.6 Z"/>
                            </theme:ClassicBorderDecorator>
                        </BulletDecorator.Bullet>
                        <ContentPresenter Margin="{TemplateBinding Padding}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          RecognizesAccessKey="True"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </BulletDecorator>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked"
                                 Value="false">
                            <Setter TargetName="CheckMarkPath"
                                    Property="Visibility"
                                    Value="Hidden"/>
                        </Trigger>
                        <Trigger Property="IsChecked"
                                 Value="{x:Null}">
                            <Setter TargetName="CheckMark"
                                    Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
                            <Setter TargetName="CheckMarkPath"
                                    Property="Fill"
                                    Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter TargetName="CheckMark"
                                    Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter TargetName="CheckMark"
                                    Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                            <Setter TargetName="CheckMarkPath"
                                    Property="Fill"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <!--=================================================================
        CollectionViewGroup
    ==================================================================-->
    <DataTemplate DataType="{x:Type CollectionViewGroup}">
        <TextBlock Text="{Binding Path=Name}"/>
    </DataTemplate>


    <Style x:Key="&#210;">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle Margin="4,4,21,4"
                               StrokeThickness="1"
                               Stroke="Black"
                               StrokeDashArray="1 2"
                               SnapsToDevicePixels="true"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="&#211;"
           TargetType="{x:Type TextBox}">
        <Setter Property="OverridesDefaultStyle"
                Value="true"/>
        <Setter Property="AllowDrop"
                Value="true"/>
        <Setter Property="MinWidth"
                Value="0"/>
        <Setter Property="MinHeight"
                Value="0"/>
        <Setter Property="FocusVisualStyle"
                Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBox}">
                    <ScrollViewer x:Name="PART_ContentHost"
                                  Focusable="false"
                                  HorizontalScrollBarVisibility="Hidden"
                                  VerticalScrollBarVisibility="Hidden"
                                  Background="Transparent"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 

    <!--=================================================================
        ComboBox
    ==================================================================-->
    <Geometry x:Key="&#212;">M 0 0 L 3.5 4 L 7 0 Z
    </Geometry>

    <Style x:Key="&#213;"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="MinWidth"
                Value="0"/>
        <Setter Property="MinHeight"
                Value="0"/>
        <Setter Property="Width"
                Value="Auto"/>
        <Setter Property="Height"
                Value="Auto"/>
        <Setter Property="Background"
                Value="Transparent"/>
        <Setter Property="BorderBrush"
                Value="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"/>
        <Setter Property="BorderThickness"
                Value="2"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <DockPanel Background="{TemplateBinding Background}"
                               LastChildFill="false"
                               SnapsToDevicePixels="true">
                        <theme:ClassicBorderDecorator Name="Border"
                                                      BorderStyle="AltRaised"
                                                      DockPanel.Dock="Right"
                                                      Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
                                                      Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
                                                      BorderThickness="{TemplateBinding BorderThickness}"
                                                      BorderBrush="{TemplateBinding BorderBrush}">
                            <Path
                                  Fill="{TemplateBinding Foreground}"
                                  HorizontalAlignment="Center"
                                  VerticalAlignment="Center"
                                  Data="{StaticResource &#212;}"/>
                        </theme:ClassicBorderDecorator>
                    </DockPanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked"
                                 Value="true">
                            <Setter TargetName="Border"
                                    Property="BorderStyle"
                                    Value="AltPressed"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsEnabled"
                     Value="false">
                <Setter Property="Foreground"
                        Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"/>
            </Trigger>
        </Style.Triggers>
    </Style>
 
    <ControlTemplate x:Key="&#214;"
                     TargetType="{x:Type ComboBox}">
        <Border Background="{TemplateBinding Background}"
                BorderThickness="{TemplateBinding BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                SnapsToDevicePixels="true">
            <Grid>
                <theme:ClassicBorderDecorator Name="Border"
                                              Background="{TemplateBinding Background}"
                                              BorderBrush="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"
                                              BorderThickness="2"
                                              BorderStyle="Sunken">
                    <Popup Name="PART_Popup"
                           AllowsTransparency="true"
                           Placement="Bottom"
                           IsOpen="{TemplateBinding IsDropDownOpen}"
                           Focusable="False"
                           PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                        <theme:SystemDropShadowChrome Name="Shdw"
                                                      Color="Transparent"
                                                      MinWidth="{Binding ElementName=Border,Path=ActualWidth}"
                                                      MaxHeight="{TemplateBinding MaxDropDownHeight}">
                            <Border x:Name="DropDownBorder"
                                    Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
                                    BorderThickness="1"
                                    BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}">
                                <ScrollViewer>
                                    <ItemsPresenter KeyboardNavigation.DirectionalNavigation="Contained"
                                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                </ScrollViewer>
                            </Border>
                        </theme:SystemDropShadowChrome>
                    </Popup>
                </theme:ClassicBorderDecorator>
                <ToggleButton
                              Margin="2"
                              MinWidth="0"
                              MinHeight="0"
                              Width="Auto"
                              Focusable="false"
                              Style="{StaticResource &#213;}"
                              IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
                              ClickMode="Press"/>
                <DockPanel Margin="2">
                    <!-- saves space for the button which will be drawn on top -->
                    <FrameworkElement DockPanel.Dock="Right"
                                      Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
                    <TextBox x:Name="PART_EditableTextBox"
                             Margin="{TemplateBinding Padding}"
                             Style="{StaticResource &#211;}"
                             IsReadOnly="{Binding Path=IsReadOnly,RelativeSource={RelativeSource TemplatedParent}}"
                             HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                             VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
                </DockPanel>
            </Grid>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems"
                     Value="false">
                <!-- Set minimum height for empty drop down -->
                <Setter TargetName="DropDownBorder"
                        Property="MinHeight"
                        Value="95"/>
            </Trigger>
            <Trigger SourceName="PART_Popup"
                     Property="Popup.HasDropShadow"
                     Value="true">
                <Setter TargetName="Shdw"
                        Property="Margin"
                        Value="0,0,5,5"/>
                <Setter TargetName="Shdw"
                        Property="Color"
                        Value="#71000000"/>
            </Trigger>
            <Trigger Property="IsEnabled"
                     Value="false">
                <Setter Property="Foreground"
                        Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                <Setter Property="Background"
                        Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
            </Trigger>
            <Trigger Property="IsGrouping"
                     Value="true">
                <Setter Property="ScrollViewer.CanContentScroll"
                        Value="false"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>


    <Style x:Key="{x:Type ComboBox}"
           TargetType="{x:Type ComboBox}">
        <Setter Property="FocusVisualStyle"
                Value="{StaticResource &#210;}"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
        <Setter Property="Margin"
                Value="0,0,0,0"/>
        <Setter Property="Padding"
                Value="2,1"/>
        <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="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBox}">
                    <Border Background="{TemplateBinding Background}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            SnapsToDevicePixels="true">
                        <Grid>
                            <theme:ClassicBorderDecorator Name="Border"
                                                          Background="{TemplateBinding Background}"
                                                          BorderBrush="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"
                                                          BorderThickness="2"
                                                          BorderStyle="Sunken">
                                <Popup AllowsTransparency="true"
                                       Name="PART_Popup"
                                       Placement="Bottom"
                                       IsOpen="{TemplateBinding IsDropDownOpen}"
                                       Focusable="False"
                                       PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                                    <theme:SystemDropShadowChrome Name="Shdw"
                                                                  Color="Transparent"
                                                                  MinWidth="{Binding ElementName=Border,Path=ActualWidth}"
                                                                  MaxHeight="{TemplateBinding MaxDropDownHeight}">
                                        <Border x:Name="DropDownBorder"
                                                Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
                                                BorderThickness="1"
                                                BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}">
                                            <ScrollViewer>
                                                <ItemsPresenter KeyboardNavigation.DirectionalNavigation="Contained"
                                                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                            </ScrollViewer>
                                        </Border>
                                    </theme:SystemDropShadowChrome>
                                </Popup>
                            </theme:ClassicBorderDecorator>
                            <DockPanel Margin="2">
                                <!-- saves space for the button which will be drawn on top -->
                                <FrameworkElement DockPanel.Dock="Right"
                                                  Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
                                <Border x:Name="SelectedItemBorder"
                                        Margin="{TemplateBinding Padding}">
                                    <ContentPresenter Margin="1,1,1,1"
                                                      Content="{TemplateBinding SelectionBoxItem}"
                                                      ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                                                      ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                                                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                      SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                </Border>
                            </DockPanel>
                            <ToggleButton Margin="2"
                                          MinWidth="0"
                                          MinHeight="0"
                                          Width="Auto"
                                          Focusable="false"
                                          Style="{StaticResource &#213;}"
                                          IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
                                          ClickMode="Press"/>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelectionBoxHighlighted"
                                           Value="true"/>
                                <Condition Property="IsDropDownOpen"
                                           Value="false"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                        </MultiTrigger>
                        <Trigger Property="IsSelectionBoxHighlighted"
                                 Value="true">
                            <Setter TargetName="SelectedItemBorder"
                                    Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="HasItems"
                                 Value="false">
                            <!-- Set minimum height for empty drop down -->
                            <Setter TargetName="DropDownBorder"
                                    Property="MinHeight"
                                    Value="95"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                            <Setter Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="IsGrouping"
                                 Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll"
                                    Value="false"/>
                        </Trigger>
                        <Trigger SourceName="PART_Popup"
                                 Property="Popup.HasDropShadow"
                                 Value="true">
                            <Setter TargetName="Shdw"
                                    Property="Margin"
                                    Value="0,0,5,5"/>
                            <Setter TargetName="Shdw"
                                    Property="Color"
                                    Value="#71000000"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsEditable"
                     Value="true">
                <Setter Property="IsTabStop"
                        Value="false"/>
                <Setter Property="Padding"
                        Value="1"/>
                <Setter Property="Template"
                        Value="{StaticResource &#214;}"/>
            </Trigger>
        </Style.Triggers>
    </Style>


   
    <!--=================================================================
        ComboBoxItem
    ==================================================================-->
    <Style x:Key="{x:Type ComboBoxItem}"
           TargetType="{x:Type ComboBoxItem}">
        <Setter Property="HorizontalContentAlignment"
                Value="{Binding Path=HorizontalContentAlignment,RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="VerticalContentAlignment"
                Value="{Binding Path=VerticalContentAlignment,RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="Padding"
                Value="3,0,3,0"/>
        <Setter Property="Background"
                Value="Transparent"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBoxItem}">
                    <Border Name="Bd"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            SnapsToDevicePixels="true">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsHighlighted"
                                 Value="true">
                            <Setter TargetName="Bd"
                                    Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 
    <!--=================================================================
        ContentControl
    ==================================================================-->
    <Style x:Key="{x:Type ContentControl}"
           TargetType="{x:Type ContentControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ContentControl}">
                    <ContentPresenter/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 

 

    <Style x:Key="{x:Type ContextMenu}"
           TargetType="{x:Type ContextMenu}">
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
        <Setter Property="BorderBrush"
                Value="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"/>
        <Setter Property="BorderThickness"
                Value="2"/>
        <Setter Property="FontFamily"
                Value="{DynamicResource {x:Static SystemFonts.MenuFontFamilyKey}}"/>
        <Setter Property="FontSize"
                Value="{DynamicResource {x:Static SystemFonts.MenuFontSizeKey}}"/>
        <Setter Property="FontStyle"
                Value="{DynamicResource {x:Static SystemFonts.MenuFontStyleKey}}"/>
        <Setter Property="FontWeight"
                Value="{DynamicResource {x:Static SystemFonts.MenuFontWeightKey}}"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}"/>
        <Setter Property="VerticalContentAlignment"
                Value="Center"/>
        <Setter Property="Grid.IsSharedSizeScope"
                Value="true"/>
        <Setter Property="HasDropShadow"
                Value="{DynamicResource {x:Static SystemParameters.DropShadowKey}}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ContextMenu}">
                    <theme:SystemDropShadowChrome Name="Shdw"
                                                  Color="Transparent"
                                                  SnapsToDevicePixels="true">
                        <theme:ClassicBorderDecorator Name="Border"
                                                      BorderStyle="AltRaised"
                                                      Background="{TemplateBinding Background}"
                                                      BorderBrush="{TemplateBinding BorderBrush}"
                                                      BorderThickness="{TemplateBinding BorderThickness}">
                            <ScrollViewer CanContentScroll="true"
                                          Style="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type FrameworkElement}, ResourceId=MenuScrollViewer}}">
                                <ItemsPresenter Margin="{TemplateBinding Padding}"
                                                KeyboardNavigation.DirectionalNavigation="Cycle"
                                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                            </ScrollViewer>
                        </theme:ClassicBorderDecorator>
                    </theme:SystemDropShadowChrome>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasDropShadow"
                                 Value="true">
                            <Setter TargetName="Shdw"
                                    Property="Margin"
                                    Value="0,0,5,5"/>
                            <Setter TargetName="Shdw"
                                    Property="Color"
                                    Value="#71000000"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
   

 

    <!--=================================================================
        FlowDocument
    ==================================================================-->
    <Style x:Key="{x:Type FlowDocument}"
           TargetType="{x:Type FlowDocument}">
        <Setter Property="TextAlignment"
                Value="Justify"/>
        <Setter Property="FontFamily"
                Value="Georgia"/>
        <Setter Property="FontSize"
                Value="16.0"/>
    </Style>
    <!--=================================================================
        TextBlock
    ==================================================================-->
    <Style x:Key="{x:Type TextBlock}"
           TargetType="{x:Type TextBlock}">
        <Setter Property="TextWrapping"
                Value="NoWrap"/>
        <Setter Property="TextTrimming"
                Value="None"/>
    </Style>
    <!--=================================================================
        Bold
    ==================================================================-->
    <Style x:Key="{x:Type Bold}"
           TargetType="{x:Type Bold}">
        <Setter Property="FontWeight"
                Value="Bold"/>
    </Style>
    <!--=================================================================
        Italic
    ==================================================================-->
    <Style x:Key="{x:Type Italic}"
           TargetType="{x:Type Italic}">
        <Setter Property="FontStyle"
                Value="Italic"/>
    </Style>
    <!--=================================================================
        Underline
    ==================================================================-->
    <Style x:Key="{x:Type Underline}"
           TargetType="{x:Type Underline}">
        <Setter Property="TextDecorations"
                Value="Underline"/>
    </Style>
    <!--=================================================================
        Paragraph
    ==================================================================-->
    <Style x:Key="{x:Type Paragraph}"
           TargetType="{x:Type Paragraph}">
        <Setter Property="Margin"
                Value="Auto"/>
    </Style>
    <!--=================================================================
        List
    ==================================================================-->
    <Style x:Key="{x:Type List}"
           TargetType="{x:Type List}">
        <Setter Property="Margin"
                Value="Auto"/>
        <Setter Property="Padding"
                Value="Auto"/>
    </Style>
    <!--=================================================================
        Floater
    ==================================================================-->
    <Style x:Key="{x:Type Floater}"
           TargetType="{x:Type Floater}">
        <Setter Property="HorizontalAlignment"
                Value="Right"/>
    </Style>

    <!--=================================================================
        FlowDocument - Handled by FlowDocumentReader
    ==================================================================-->
    <DataTemplate DataType="{x:Type FlowDocument}">
        <FlowDocumentReader Document="{Binding}" />
    </DataTemplate>
    <!--=================================================================
        FixedDocument - Handled by DocumentViewer
    ==================================================================-->
    <DataTemplate DataType="{x:Type FixedDocument}">
        <DocumentViewer Document="{Binding}"
                        />
    </DataTemplate>
    <!--=================================================================
        FixedDocumentSequence - Handled by DocumentViewer
    ==================================================================-->
    <DataTemplate DataType="{x:Type FixedDocumentSequence}">
        <DocumentViewer Document="{Binding}"
                        />
    </DataTemplate>
    <!--
            **********************************************************
            * DocumentViewer Style                                       *
            **********************************************************
    -->
    <LinearGradientBrush x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type FrameworkElement}, ResourceId=DocumentViewerToolBarGradient}"
                         StartPoint="0,0"
                         EndPoint="0,1">
        <LinearGradientBrush.GradientStops>
            <GradientStop Color="{x:Static SystemColors.InfoColor}"
                          Offset="0"/>
            <GradientStop Color="{x:Static SystemColors.MenuColor}"
                          Offset="1"/>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>
    <!-- DocumentViewer Style -->
    <Style x:Key="{x:Type DocumentViewer}"
           BasedOn="{x:Null}"
           TargetType="{x:Type DocumentViewer}">
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
        <Setter Property="FocusVisualStyle"
                Value="{x:Null}"/>
        <Setter Property="ContextMenu"
                Value="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type ui:PresentationUIStyleResources}, ResourceId=PUIDocumentViewerContextMenu}}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DocumentViewer}">
                  <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Focusable="False">
                    <Grid Background="{TemplateBinding Background}"
                          KeyboardNavigation.TabNavigation="Local">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                      </Grid.ColumnDefinitions>
                      <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="Auto"/>
                      </Grid.RowDefinitions>
                      <!-- One column for both the toolbar and the content -->
                      <!-- Top row, auto height for the Toolbar -->
                      <!-- Middle row, full height for the Content area -->
                      <!-- Bottom row, auto height for the find Toolbar -->
                      <!-- DocumentViewer's ToolBar, docked to the Top -->
                      <ContentControl Style="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type ui:PresentationUIStyleResources},                                 ResourceId=PUIDocumentViewerToolBarStyleKey}}"
                                      Grid.Row="0"
                                      Grid.Column="0"
                                      Focusable="{TemplateBinding Focusable}"
                                      TabIndex="0"/>
                      <!-- Define the Content area and its paging/scrolling controls inside the Grid -->
                      <ScrollViewer Grid.Row="1"
                                    Grid.Column="0"
                                    CanContentScroll="true"
                                    HorizontalScrollBarVisibility="Auto"
                                    x:Name="PART_ContentHost"
                                    Focusable="{TemplateBinding Focusable}"
                                    IsTabStop="true"
                                    TabIndex="1"/>
                      <!-- Toolbar shadow -->
                      <DockPanel Grid.Row="1">
                        <!-- saves space for the scrollbar -->
                        <FrameworkElement DockPanel.Dock="Right"
                                          Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
                        <Rectangle
                                   Visibility="Visible"
                                   VerticalAlignment="top"
                                   Height="10">

                          <Rectangle.Fill>
                            <LinearGradientBrush StartPoint="0,0"
                                                 EndPoint="0,1">
                              <GradientBrush.GradientStops>
                                <GradientStopCollection>
                                  <GradientStop Color="#66000000"
                                                Offset="0"/>
                                  <GradientStop Color="Transparent"
                                                Offset="1"/>
                                </GradientStopCollection>
                              </GradientBrush.GradientStops>
                            </LinearGradientBrush>
                          </Rectangle.Fill>
                        </Rectangle>
                      </DockPanel>
                      <!-- Find ToolBar, docked to the bottom -->
                      <ContentControl Grid.Row="2"
                                      Grid.Column="0"
                                      TabIndex="2"
                                      Focusable="{TemplateBinding Focusable}"
                                      x:Name="PART_FindToolBarHost"/>
                    </Grid>
                  </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 

    <!--=================================================================
        Expander
    ==================================================================-->
    <Style x:Key="&#215;">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border>
                        <Rectangle Margin="0"
                                   StrokeThickness="1"
                                   Stroke="Black"
                                   StrokeDashArray="1 2"
                                   SnapsToDevicePixels="true"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="&#216;"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border Padding="{TemplateBinding Padding}">
                        <Grid Background="Transparent"
                              SnapsToDevicePixels="False">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="19"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <theme:ClassicBorderDecorator x:Name="Bd"
                                                          Width="19"
                                                          Height="19"
                                                          BorderStyle="None"
                                                          Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
                                                          BorderThickness="1"
                                                          BorderBrush="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"
                                                          SnapsToDevicePixels="true">
                                <Path x:Name="arrow"
                                      HorizontalAlignment="Center"
                                      VerticalAlignment="Center"
                                      Stroke="{TemplateBinding Foreground}"
                                      StrokeThickness="1.5"
                                      SnapsToDevicePixels="false"
                                      Data="M 1,1.5 L 4.5,5 L 8,1.5"/>
                            </theme:ClassicBorderDecorator>
                            <ContentPresenter Grid.Column="1"
                                              Margin="4,0,0,0"
                                              HorizontalAlignment="Left"
                                              VerticalAlignment="Center"
                                              SnapsToDevicePixels="True"
                                              RecognizesAccessKey="True"/>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked"
                                 Value="true">
                            <Setter Property="Data"
                                    Value="M 1,4.5  L 4.5,1  L 8,4.5"
                                    TargetName="arrow"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter Property="BorderStyle"
                                    Value="ThinRaised"
                                    TargetName="Bd"/>
                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter Property="BorderStyle"
                                    Value="ThinPressed"
                                    TargetName="Bd"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="&#217;"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border Padding="{TemplateBinding Padding}">
                        <Grid Background="Transparent"
                              SnapsToDevicePixels="False">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="19"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <theme:ClassicBorderDecorator x:Name="Bd"
                                                          Width="19"
                                                          Height="19"
                                                          BorderStyle="None"
                                                          Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
                                                          BorderThickness="1"
                                                          BorderBrush="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"
                                                          SnapsToDevicePixels="true">

                                <Path x:Name="arrow"
                                      HorizontalAlignment="Center"
                                      VerticalAlignment="Center"
                                      Stroke="{TemplateBinding Foreground}"
                                      StrokeThickness="1.5"
                                      SnapsToDevicePixels="false"
                                      Data="M 1,1.5 L 4.5,5 L 8,1.5">
                                    <Path.LayoutTransform>
                                        <RotateTransform Angle="180"/>
                                    </Path.LayoutTransform>
                                </Path>
                            </theme:ClassicBorderDecorator>
                            <ContentPresenter Grid.Column="1"
                                              Margin="4,0,0,0"
                                              HorizontalAlignment="Left"
                                              VerticalAlignment="Center"
                                              SnapsToDevicePixels="True"
                                              RecognizesAccessKey="True"/>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked"
                                 Value="true">
                            <Setter Property="Data"
                                    Value="M 1,4.5  L 4.5,1  L 8,4.5"
                                    TargetName="arrow"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter Property="BorderStyle"
                                    Value="ThinRaised"
                                    TargetName="Bd"/>
                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter Property="BorderStyle"
                                    Value="ThinPressed"
                                    TargetName="Bd"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="&#218;"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border Padding="{TemplateBinding Padding}">
                        <Grid Background="Transparent"
                              SnapsToDevicePixels="False">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="19"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <theme:ClassicBorderDecorator x:Name="Bd"
                                                          Width="19"
                                                          Height="19"
                                                          BorderStyle="None"
                                                          Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
                                                          BorderThickness="1"
                                                          BorderBrush="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"
                                                          SnapsToDevicePixels="true">
                                <Path x:Name="arrow"
                                      HorizontalAlignment="Center"
                                      VerticalAlignment="Center"
                                      Stroke="{TemplateBinding Foreground}"
                                      StrokeThickness="1.5"
                                      SnapsToDevicePixels="false"
                                      Data="M 1,1.5 L 4.5,5 L 8,1.5">
                                    <Path.LayoutTransform>
                                        <RotateTransform Angle="90"/>
                                    </Path.LayoutTransform>
                                </Path>
                            </theme:ClassicBorderDecorator>
                            <ContentPresenter Grid.Row="1"
                                              Margin="0,4,0,0"
                                              HorizontalAlignment="Center"
                                              VerticalAlignment="Top"
                                              SnapsToDevicePixels="True"
                                              RecognizesAccessKey="True"/>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked"
                                 Value="true">
                            <Setter Property="Data"
                                    Value="M 1,4.5  L 4.5,1  L 8,4.5"
                                    TargetName="arrow"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter Property="BorderStyle"
                                    Value="ThinRaised"
                                    TargetName="Bd"/>
                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter Property="BorderStyle"
                                    Value="ThinPressed"
                                    TargetName="Bd"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="&#219;"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border Padding="{TemplateBinding Padding}">
                        <Grid Background="Transparent"
                              SnapsToDevicePixels="False">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="19"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <theme:ClassicBorderDecorator x:Name="Bd"
                                                          Width="19"
                                                          Height="19"
                                                          BorderStyle="None"
                                                          Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
                                                          BorderThickness="1"
                                                          BorderBrush="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"
                                                          SnapsToDevicePixels="true">
                                <Path x:Name="arrow"
                                      HorizontalAlignment="Center"
                                      VerticalAlignment="Center"
                                      Stroke="{TemplateBinding Foreground}"
                                      StrokeThickness="1.5"
                                      SnapsToDevicePixels="false"
                                      Data="M 1,1.5 L 4.5,5 L 8,1.5">
                                    <Path.LayoutTransform>
                                        <RotateTransform Angle="-90"/>
                                    </Path.LayoutTransform>
                                </Path>

                            </theme:ClassicBorderDecorator>
                            <ContentPresenter Grid.Row="1"
                                              Margin="0,4,0,0"
                                              HorizontalAlignment="Center"
                                              VerticalAlignment="Top"
                                              SnapsToDevicePixels="True"
                                              RecognizesAccessKey="True"/>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked"
                                 Value="true">
                            <Setter Property="Data"
                                    Value="M 1,4.5  L 4.5,1  L 8,4.5"
                                    TargetName="arrow"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter Property="BorderStyle"
                                    Value="ThinRaised"
                                    TargetName="Bd"/>
                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter Property="BorderStyle"
                                    Value="ThinPressed"
                                    TargetName="Bd"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="{x:Type Expander}"
           TargetType="{x:Type Expander}">
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
        <Setter Property="Background"
                Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch"/>
        <Setter Property="VerticalContentAlignment"
                Value="Stretch"/>
        <Setter Property="BorderBrush"
                Value="Transparent"/>
        <Setter Property="BorderThickness"
                Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Expander}">
                    <Border BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding Background}"
                            CornerRadius="3"
                            SnapsToDevicePixels="true">
                        <DockPanel>
                            <ToggleButton x:Name="HeaderSite"
                                          DockPanel.Dock="Top"
                                          Margin="1"
                                          MinWidth="0"
                                          MinHeight="0"
                                          Style="{StaticResource &#216;}"
                                          FocusVisualStyle="{StaticResource &#215;}"
                                          IsChecked="{Binding Path=IsExpanded,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
                                          Content="{TemplateBinding Header}"
                                          ContentTemplate="{TemplateBinding HeaderTemplate}"
                                          ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
                                          Foreground="{TemplateBinding Foreground}"
                                          Padding="{TemplateBinding Padding}"
                                          FontFamily="{TemplateBinding FontFamily}"
                                          FontSize="{TemplateBinding FontSize}"
                                          FontStyle="{TemplateBinding FontStyle}"
                                          FontStretch="{TemplateBinding FontStretch}"
                                          FontWeight="{TemplateBinding FontWeight}"
                                          HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            <ContentPresenter x:Name="ExpandSite"
                                              DockPanel.Dock="Bottom"
                                              Visibility="Collapsed"
                                              Focusable="false"
                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                              Margin="{TemplateBinding Padding}"/>
                        </DockPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsExpanded"
                                 Value="true">
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="ExpandSite"/>
                        </Trigger>
                        <Trigger Property="ExpandDirection"
                                 Value="Right">
                            <Setter Property="DockPanel.Dock"
                                    Value="Right"
                                    TargetName="ExpandSite"/>
                            <Setter Property="DockPanel.Dock"
                                    Value="Left"
                                    TargetName="HeaderSite"/>
                            <Setter Property="Style"
                                    Value="{StaticResource &#219;}"
                                    TargetName="HeaderSite"/>
                        </Trigger>
                        <Trigger Property="ExpandDirection"
                                 Value="Up">
                            <Setter Property="DockPanel.Dock"
                                    Value="Top"
                                    TargetName="ExpandSite"/>
                            <Setter Property="DockPanel.Dock"
                                    Value="Bottom"
                                    TargetName="HeaderSite"/>
                            <Setter Property="Style"
                                    Value="{StaticResource &#217;}"
                                    TargetName="HeaderSite"/>
                        </Trigger>
                        <Trigger Property="ExpandDirection"
                                 Value="Left">
                            <Setter Property="DockPanel.Dock"
                                    Value="Left"
                                    TargetName="ExpandSite"/>
                            <Setter Property="DockPanel.Dock"
                                    Value="Right"
                                    TargetName="HeaderSite"/>
                            <Setter Property="Style"
                                    Value="{StaticResource &#218;}"
                                    TargetName="HeaderSite"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 
    <!--=================================================================
        FocusVisual
    ==================================================================-->
    <Style x:Key="{x:Static SystemParameters.FocusVisualStyleKey}">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle StrokeThickness="1"
                               Stroke="Black"
                               StrokeDashArray="1 2"
                               SnapsToDevicePixels="true"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 

    <!--=================================================================
        GridSplitter
    ==================================================================-->
    <Style x:Key="&#228;">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle Fill="#80000000"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="{x:Type GridSplitter}"
           TargetType="{x:Type GridSplitter}">
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
        <Setter Property="PreviewStyle"
                Value="{StaticResource &#228;}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type GridSplitter}">
                    <Border BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding Background}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 
    <!--=================================================================
        GroupBox
    ==================================================================-->
    <BorderGapMaskConverter x:Key="&#229;"/>
    <Style x:Key="{x:Type GroupBox}"
           TargetType="{x:Type GroupBox}">
        <Setter Property="BorderBrush"
                Value="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"/>
        <Setter Property="BorderThickness"
                Value="2"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type GroupBox}">
                    <Grid SnapsToDevicePixels="true">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="6"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="6"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="6"/>
                        </Grid.RowDefinitions>
                        <!-- Border for the background with the same CornerRadius as the Border with the Header
                             Using this because if the background is set in the Border with the Header the opacity
                               mask will be applied to the background as well. -->
                        <Border Grid.Row="1"
                                Grid.RowSpan="3"
                                Grid.Column="0"
                                Grid.ColumnSpan="4"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="Transparent"
                                Background="{TemplateBinding Background}"/>
                        <!-- ContentPresenter for the header -->
                        <Border x:Name="Header"
                                Padding="3,0,3,0"
                                Grid.Row="0"
                                Grid.RowSpan="2"
                                Grid.Column="1">
                            <ContentPresenter ContentSource="Header"
                                              RecognizesAccessKey="True"
                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </Border>
                        <!-- Primary content for GroupBox -->
                        <ContentPresenter Grid.Row="2"
                                          Grid.Column="1"
                                          Grid.ColumnSpan="2"
                                          Margin="{TemplateBinding Padding}"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        <theme:ClassicBorderDecorator Grid.Row="1"
                                                      Grid.RowSpan="3"
                                                      Grid.ColumnSpan="4"
                                                      BorderThickness="{TemplateBinding BorderThickness}"
                                                      BorderBrush="{TemplateBinding BorderBrush}"
                                                      BorderStyle="Etched">
                            <theme:ClassicBorderDecorator.OpacityMask>
                                <MultiBinding Converter="{StaticResource &#229;}"
                                              ConverterParameter="7">
                                    <Binding ElementName="Header"
                                             Path="ActualWidth"/>
                                    <Binding RelativeSource="{RelativeSource Self}"
                                             Path="ActualWidth"/>
                                    <Binding RelativeSource="{RelativeSource Self}"
                                             Path="ActualHeight"/>
                                </MultiBinding>
                            </theme:ClassicBorderDecorator.OpacityMask>
                        </theme:ClassicBorderDecorator>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <!--=================================================================
        GroupItem
    ==================================================================-->
    <Style x:Key="{x:Type GroupItem}"
           TargetType="{x:Type GroupItem}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type GroupItem}">
                    <StackPanel>
                        <ContentPresenter/>
                        <ItemsPresenter Margin="5,0,0,0"/>
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <!--=================================================================
        HeaderedContentControl
    ==================================================================-->
    <Style x:Key="{x:Type HeaderedContentControl}"
           TargetType="{x:Type HeaderedContentControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type HeaderedContentControl}">
                    <StackPanel>
                        <ContentPresenter ContentSource="Header"/>
                        <ContentPresenter/>
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
 
    <!--=================================================================
        Hyperlink
    ==================================================================-->
    <Style x:Key="{x:Type Hyperlink}"
           TargetType="{x:Type Hyperlink}">
        <Setter Property="Foreground"
                Value="Blue"/>
        <Setter Property="TextDecorations"
                Value="Underline"/>
        <Style.Triggers>
            <Trigger Property="IsMouseOver"
                     Value="true">
                <Setter Property="Foreground"
                        Value="Red"/>
            </Trigger>
            <Trigger Property="IsEnabled"
                     Value="false">
                <Setter Property="Foreground"
                        Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
            </Trigger>
            <Trigger Property="IsEnabled"
                     Value="true">
                <Setter Property="Cursor"
                        Value="Hand"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <!--=================================================================
        ItemsControl
    ==================================================================-->
    <Style x:Key="{x:Type ItemsControl}"
           TargetType="{x:Type ItemsControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ItemsControl}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            SnapsToDevicePixels="true">
                        <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <!--=================================================================
        Label
    ==================================================================-->
    <Style x:Key="{x:Type Label}"
           TargetType="{x:Type Label}">
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="Background"
                Value="Transparent"/>
        <Setter Property="Padding"
                Value="5"/>
        <Setter Property="HorizontalContentAlignment"
                Value="Left"/>
        <Setter Property="VerticalContentAlignment"
                Value="Top"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Label}">
                    <Border Background="{TemplateBinding Background}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Padding="{TemplateBinding Padding}"
                            SnapsToDevicePixels="true">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          RecognizesAccessKey="True"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--=================================================================
        ListBox
    ==================================================================-->
    <Style x:Key="{x:Type ListBox}"
           TargetType="{x:Type ListBox}">
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
        <Setter Property="BorderBrush"
                Value="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"/>
        <Setter Property="BorderThickness"
                Value="2"/>
        <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="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBox}">
                    <theme:ClassicBorderDecorator Name="Bd"
                                                  BorderStyle="Sunken"
                                                  Background="{TemplateBinding Background}"
                                                  BorderBrush="{TemplateBinding BorderBrush}"
                                         BorderThickness="{TemplateBinding BorderThickness}"
                                         SnapsToDevicePixels="true">
                        <ScrollViewer Padding="{TemplateBinding Padding}"
                                      Focusable="false">
                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </ScrollViewer>
                    </theme:ClassicBorderDecorator>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter TargetName="Bd"
                                    Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="IsGrouping"
                                 Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll"
                                    Value="false"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 


    <!--=================================================================
            ListBoxItem
        ==================================================================-->
    <Style x:Key="{x:Type ListBoxItem}"
           TargetType="{x:Type ListBoxItem}">
        <Setter Property="Background"
                Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment"
                Value="{Binding Path=HorizontalContentAlignment,RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="VerticalContentAlignment"
                Value="{Binding Path=VerticalContentAlignment,RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="Padding"
                Value="2,0,0,0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <Border Name="Bd"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            SnapsToDevicePixels="true">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected"
                                 Value="true">
                            <Setter TargetName="Bd"
                                    Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="true"/>
                                <Condition Property="Selector.IsSelectionActive"
                                           Value="false"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd"
                                    Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <!--=================================================================
        ListView
    ==================================================================-->

    <!-- GridView ScrollViewer Style -->
    <Style x:Key="{x:Static GridView.GridViewScrollViewerStyleKey}"
           TargetType="{x:Type ScrollViewer}">
        <Setter Property="Focusable"
                Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollViewer}">
                    <Grid Background="{TemplateBinding Background}"
                          SnapsToDevicePixels="true">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <!-- Grid.Column="0" Grid.Row="0" -->
                        <DockPanel Margin="{TemplateBinding Padding}">
                            <!-- Column Headers Scroll Viewer -->
                            <ScrollViewer DockPanel.Dock="Top"
                                          HorizontalScrollBarVisibility="Hidden"
                                          VerticalScrollBarVisibility="Hidden"
                                          Focusable="false">
                                <GridViewHeaderRowPresenter 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>
                            <!-- Items Scroll Viewer -->
                            <ScrollContentPresenter Name="PART_ScrollContentPresenter"
                                                    KeyboardNavigation.DirectionalNavigation="Local"
                                                    Content="{TemplateBinding Content}"
                                                    ContentTemplate="{TemplateBinding ContentTemplate}"
                                                    CanContentScroll="{TemplateBinding CanContentScroll}"
                                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </DockPanel>
                        <!-- Horizontal Scroll Bar -->
                        <ScrollBar Name="PART_HorizontalScrollBar"
                                   Orientation="Horizontal"
                                   Grid.Row="1"
                                   Minimum="0.0"
                                   Maximum="{TemplateBinding ScrollableWidth}"
                                   ViewportSize="{TemplateBinding ViewportWidth}"
                                   Value="{Binding Path=HorizontalOffset,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}"
                                   Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                                   Cursor="Arrow"/>
                        <!-- Vertical Scroll Bar -->
                        <ScrollBar Name="PART_VerticalScrollBar"
                                   Orientation="Vertical"
                                   Grid.Column="1"
                                   Minimum="0.0"
                                   Maximum="{TemplateBinding ScrollableHeight}"
                                   ViewportSize="{TemplateBinding ViewportHeight}"
                                   Value="{Binding Path=VerticalOffset,RelativeSource={RelativeSource TemplatedParent},Mode=OneWay}"
                                   Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                   Cursor="Arrow"/>
                        <!-- Right Bottom Corner -->
                        <DockPanel Grid.Column="1"
                                   Grid.Row="1"
                                   Background="{Binding Path=Background,ElementName=PART_VerticalScrollBar}"
                                   LastChildFill="false">
                            <Rectangle DockPanel.Dock="Left"
                                       Width="1"
                                       Fill="White"
                                       Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
                            <Rectangle DockPanel.Dock="Top"
                                       Height="1"
                                       Fill="White"
                                       Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
                        </DockPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 
    <Style x:Key="&#230;"
           TargetType="{x:Type Thumb}">
        <Setter Property="Canvas.Right"
                Value="-9"/>
        <Setter Property="Width"
                Value="18"/>
        <Setter Property="Height"
                Value="{Binding Path=ActualHeight,RelativeSource={RelativeSource TemplatedParent}}"/>
        <Setter Property="Padding"
                Value="0,3,0,4"/>
        <Setter Property="Background"
                Value="#FF000000"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border Padding="{TemplateBinding Padding}"
                            Background="Transparent">
                        <Rectangle HorizontalAlignment="Center"
                                   Width="1"
                                   Fill="{TemplateBinding Background}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="{x:Type GridViewColumnHeader}"
           TargetType="{x:Type GridViewColumnHeader}">
        <Setter Property="HorizontalContentAlignment"
                Value="Center"/>
        <Setter Property="VerticalContentAlignment"
                Value="Center"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
        <Setter Property="BorderBrush"
                Value="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"/>
        <Setter Property="BorderThickness"
                Value="3"/>
        <Setter Property="Padding"
                Value="2,0,2,0"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
                    <Grid SnapsToDevicePixels="true">
                        <!-- GridViewColumnHeader Content -->
                        <theme:ClassicBorderDecorator x:Name="ContentContainer"
                                                      BorderStyle="Raised"
                                                      Background="{TemplateBinding Background}"
                                                      BorderThickness="{TemplateBinding BorderThickness}"
                                                      BorderBrush="{TemplateBinding BorderBrush}">
                            <ContentPresenter Margin="{TemplateBinding Padding}"
                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                              RecognizesAccessKey="True"
                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </theme:ClassicBorderDecorator>
                        <Canvas>
                            <Thumb x:Name="PART_HeaderGripper"
                                   Style="{StaticResource &#230;}"
                                   Background="Transparent"/>
                        </Canvas>
                        <Border x:Name="HeaderPressBorder"
                                BorderBrush="#FF808080"
                                BorderThickness="1"
                                Visibility="Hidden"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter Property="BorderStyle"
                                    Value="RaisedPressed"
                                    TargetName="ContentContainer"/>
                            <Setter Property="BorderThickness"
                                    Value="0"
                                    TargetName="ContentContainer"/>
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="HeaderPressBorder"/>
                            <Setter Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
                        </Trigger>
                        <Trigger Property="Height"
                                 Value="Auto">
                            <Setter Property="MinHeight"
                                    Value="20"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Role"
                     Value="Padding">
                <Setter Property="Template">
                    <Setter.Value>
                        <!--The same as normal header, just no gripper.-->
                        <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
                            <theme:ClassicBorderDecorator BorderStyle="Raised"
                                                          Background="{TemplateBinding Background}"
                                                          BorderThickness="{TemplateBinding BorderThickness}"
                                                          BorderBrush="{TemplateBinding BorderBrush}" />
                            <ControlTemplate.Triggers>
                                <Trigger Property="Height"
                                         Value="Auto">
                                    <Setter Property="MinHeight"
                                            Value="20"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
            <Trigger Property="Role"
                     Value="Floating">
                <Setter Property="Opacity"
                        Value="0.5056"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
                            <Canvas Name="PART_FloatingHeaderCanvas">
                                <Rectangle Opacity="0.3034"
                                           Fill="#FF000000"
                                           Width="{TemplateBinding ActualWidth}"
                                           Height="{TemplateBinding ActualHeight}" />
                            </Canvas>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>
   
    <!-- GridView Style -->
    <Style x:Key="{x:Static GridView.GridViewStyleKey}"
           TargetType="{x:Type ListView}">
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
        <Setter Property="BorderBrush"
                Value="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"/>
        <Setter Property="BorderThickness"
                Value="2"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility"
                Value="Auto"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility"
                Value="Auto"/>
        <Setter Property="ScrollViewer.CanContentScroll"
                Value="true"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListView}">
                    <theme:ClassicBorderDecorator Name="Bd"
                                                  BorderStyle="Sunken"
                                                  Background="{TemplateBinding Background}"
                                                  BorderBrush="{TemplateBinding BorderBrush}"
                                                  BorderThickness="{TemplateBinding BorderThickness}"
                                                  SnapsToDevicePixels="true">
                        <ScrollViewer Style="{DynamicResource {x:Static GridView.GridViewScrollViewerStyleKey}}"
                                      Padding="{TemplateBinding Padding}">
                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </ScrollViewer>
                    </theme:ClassicBorderDecorator>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsGrouping"
                                 Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll"
                                    Value="false"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter TargetName="Bd"
                                    Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    
    <!--=================================================================
        ListViewItem
    ==================================================================-->
    <!-- GridView ItemContainerStyle -->
    <Style x:Key="{x:Static GridView.GridViewItemContainerStyleKey}"
           TargetType="{x:Type ListViewItem}">
        <Setter Property="Background"
                Value="Transparent"/>
        <Setter Property="VerticalContentAlignment"
                Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListViewItem}">
                    <Border Name="Bd"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            SnapsToDevicePixels="true">
                        <!--remove the HorizontalAlignment due to HeaderRowPresenter does not have the ability to align to center or right-->
                        <GridViewRowPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected"
                                 Value="true">
                            <Setter TargetName="Bd"
                                    Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="true"/>
                                <Condition Property="Selector.IsSelectionActive"
                                           Value="false"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd"
                                    Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

<!--=================================================================
        Menu
    ==================================================================-->
    <Style x:Key="{x:Type Menu}"
           TargetType="{x:Type Menu}">
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.MenuBrushKey}}"/>
        <Setter Property="FontFamily"
                Value="{DynamicResource {x:Static SystemFonts.MenuFontFamilyKey}}"/>
        <Setter Property="FontSize"
                Value="{DynamicResource {x:Static SystemFonts.MenuFontSizeKey}}"/>
        <Setter Property="FontStyle"
                Value="{DynamicResource {x:Static SystemFonts.MenuFontStyleKey}}"/>
        <Setter Property="FontWeight"
                Value="{DynamicResource {x:Static SystemFonts.MenuFontWeightKey}}"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}"/>
        <Setter Property="VerticalContentAlignment"
                Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Menu}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            SnapsToDevicePixels="true">
                        <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 

    <MenuScrollingVisibilityConverter x:Key="&#231;"/>
    <Geometry x:Key="&#232;"> M 0,0 L 3.5,4 L 7,0 Z</Geometry>
    <Geometry x:Key="&#233;">   M 0,4 L 3.5,0 L 7,4 Z</Geometry>
    <Geometry x:Key="&#234;">M 0,0 L 4,3.5 L 0,7 Z</Geometry>

    <PathGeometry x:Key="&#235;">
        <PathGeometry.Figures>
            <PathFigureCollection>
                <PathFigure StartPoint="0 2"
                            IsClosed="True"
                            IsFilled="True">
                    <PathFigure.Segments>
                        <PathSegmentCollection>
                            <LineSegment Point="0 4.8"/>
                            <LineSegment Point="2.5 7.4"/>
                            <LineSegment Point="7.1 2.8"/>
                            <LineSegment Point="7.1 0"/>
                            <LineSegment Point="2.5 4.6"/>
                        </PathSegmentCollection>
                    </PathFigure.Segments>
                </PathFigure>
            </PathFigureCollection>
        </PathGeometry.Figures>
    </PathGeometry>


    <!--=================================================================
        ContextMenu
    ==================================================================-->
    <ControlTemplate x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type FrameworkElement}, ResourceId=SubmenuContent}"
                     TargetType="{x:Type ContentControl}">
        <theme:ClassicBorderDecorator BorderStyle="AltRaised"
                                      Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
                                      BorderBrush="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"
                                      BorderThickness="2">
            <ContentPresenter/>
        </theme:ClassicBorderDecorator>
    </ControlTemplate>

     <!--=================================================================
        ScrollViewer inside a MenuItem or ContextMenu
    ==================================================================-->
    <Style x:Key="&#236;"
           TargetType="{x:Type RepeatButton}"
           BasedOn="{x:Null}">
        <Setter Property="ClickMode"
                Value="Hover"/>
        <Setter Property="MinWidth"
                Value="0"/>
        <Setter Property="MinHeight"
                Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <theme:ClassicBorderDecorator x:Name="ClassicBorder"
                                                  BorderStyle="None"
                                                  BorderBrush="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"
                                                  BorderThickness="1"
                                                  Background="{TemplateBinding Background}">
                        <ContentPresenter
                                          Margin="1"
                                          VerticalAlignment="Center"
                                          HorizontalAlignment="Center"/>
                    </theme:ClassicBorderDecorator>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter TargetName="ClassicBorder"
                                    Property="BorderStyle"
                                    Value="ThinPressed"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
   
    <Style x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type FrameworkElement}, ResourceId=MenuScrollViewer}"
           TargetType="{x:Type ScrollViewer}"
           BasedOn="{x:Null}">
        <Setter Property="HorizontalScrollBarVisibility"
                Value="Hidden"/>
        <Setter Property="VerticalScrollBarVisibility"
                Value="Auto"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollViewer}">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Border Grid.Row="1"
                                Grid.Column="0">
                            <ScrollContentPresenter Margin="{TemplateBinding Padding}"/>
                        </Border>
                        <RepeatButton
                                      Style="{StaticResource &#236;}"
                                      Grid.Row="0"
                                      Grid.Column="0"
                                      Command="{x:Static ScrollBar.LineUpCommand}"
                                      CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                      Focusable="false">
                            <RepeatButton.Visibility>
                                <MultiBinding FallbackValue="Visibility.Collapsed"
                                              Converter="{StaticResource &#231;}"
                                              ConverterParameter="0">
                                    <Binding RelativeSource="{RelativeSource TemplatedParent}"
                                             Path="ComputedVerticalScrollBarVisibility"/>
                                    <Binding RelativeSource="{RelativeSource TemplatedParent}"
                                             Path="VerticalOffset"/>
                                    <Binding RelativeSource="{RelativeSource TemplatedParent}"
                                             Path="ExtentHeight"/>
                                    <Binding RelativeSource="{RelativeSource TemplatedParent}"
                                             Path="ViewportHeight"/>
                                </MultiBinding>
                            </RepeatButton.Visibility>
                            <Path Fill="{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}"
                                  Data="{StaticResource &#233;}"/>
                        </RepeatButton>
                        <RepeatButton
                                      Style="{StaticResource &#236;}"
                                      Grid.Row="2"
                                      Grid.Column="0"
                                      Command="{x:Static ScrollBar.LineDownCommand}"
                                      CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                      Focusable="false">
                            <RepeatButton.Visibility>
                                <MultiBinding FallbackValue="Visibility.Collapsed"
                                              Converter="{StaticResource &#231;}"
                                              ConverterParameter="100">
                                    <Binding RelativeSource="{RelativeSource TemplatedParent}"
                                             Path="ComputedVerticalScrollBarVisibility"/>
                                    <Binding RelativeSource="{RelativeSource TemplatedParent}"
                                             Path="VerticalOffset"/>
                                    <Binding RelativeSource="{RelativeSource TemplatedParent}"
                                             Path="ExtentHeight"/>
                                    <Binding RelativeSource="{RelativeSource TemplatedParent}"
                                             Path="ViewportHeight"/>
                                </MultiBinding>
                            </RepeatButton.Visibility>
                            <Path Fill="{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}"
                                  Data="{StaticResource &#232;}"/>
                        </RepeatButton>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
<!--=================================================================
        MenuItem
    ==================================================================-->
    <Style x:Key="{x:Static MenuItem.SeparatorStyleKey}"
           TargetType="{x:Type Separator}">
        <Setter Property="MinHeight"
                Value="2"/>
        <Setter Property="Margin"
                Value="2,4,2,3"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Separator}">
                    <theme:ClassicBorderDecorator BorderStyle="HorizontalLine"
                                                  BorderBrush="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"
                                                  BorderThickness="1"/>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=TopLevelItemTemplateKey}"
                     TargetType="{x:Type MenuItem}">
        <theme:ClassicBorderDecorator x:Name="ClassicBorder"
                                      BorderStyle="None"
                                      Background="{TemplateBinding Background}"
                                      BorderBrush="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"
                                      BorderThickness="1">
            <DockPanel x:Name="ContentPanel">
                <!-- Glyph -->
                <ContentPresenter x:Name="Icon"
                                  Margin="4,0,6,0"
                                  VerticalAlignment="Center"
                                  ContentSource="Icon"/>
                <Path x:Name="GlyphPanel"
                      Margin="4,0,6,0"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Fill="{TemplateBinding Foreground}"
                      FlowDirection="LeftToRight"
                      Data="{StaticResource &#235;}"/>
                <!-- Header Content -->
                <ContentPresenter
                                  ContentSource="Header"
                                  Margin="{TemplateBinding Padding}"
                                  RecognizesAccessKey="True"/>
            </DockPanel>
        </theme:ClassicBorderDecorator>
        <ControlTemplate.Triggers>
            <Trigger Property="Icon"
                     Value="{x:Null}">
                <Setter TargetName="Icon"
                        Property="Visibility"
                        Value="Collapsed"/>
            </Trigger>
            <Trigger Property="IsChecked"
                     Value="true">
                <Setter TargetName="GlyphPanel"
                        Property="Visibility"
                        Value="Visible"/>
                <Setter TargetName="Icon"
                        Property="Visibility"
                        Value="Collapsed"/>
            </Trigger>
            <Trigger Property="IsHighlighted"
                     Value="true">
                <Setter TargetName="ClassicBorder"
                        Property="BorderStyle"
                        Value="ThinRaised"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocused"
                     Value="true">
                <Setter TargetName="ClassicBorder"
                        Property="BorderStyle"
                        Value="ThinPressed"/>
            </Trigger>
            <Trigger Property="IsEnabled"
                     Value="false">
                <Setter Property="Foreground"
                        Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <ControlTemplate x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=TopLevelHeaderTemplateKey}"
                     TargetType="{x:Type MenuItem}">
        <theme:ClassicBorderDecorator x:Name="ClassicBorder"
                                      BorderStyle="None"
                                      Background="{TemplateBinding Background}"
                                      BorderBrush="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"
                                      BorderThickness="1">
            <DockPanel>
                <!-- Glyph -->
                <ContentPresenter x:Name="Icon"
                                  Margin="4,0,6,0"
                                  VerticalAlignment="Center"
                                  ContentSource="Icon"/>
                <Path x:Name="GlyphPanel"
                      Margin="4,0,6,0"
                      Visibility="Collapsed"
                      VerticalAlignment="Center"
                      Fill="{TemplateBinding Foreground}"
                      FlowDirection="LeftToRight"
                      Data="{StaticResource &#235;}"/>
                <!-- Header Content -->
                <ContentPresenter
                                  ContentSource="Header"
                                  Margin="{TemplateBinding Padding}"
                                  RecognizesAccessKey="True"/>
                <!-- Submenu Popup -->
                <Popup x:Name="PART_Popup"
                       AllowsTransparency="true"
                       Placement="Bottom"
                       HorizontalOffset="-2"
                       IsOpen="{Binding Path=IsSubmenuOpen,RelativeSource={RelativeSource TemplatedParent}}"
                       Focusable="false"
                       PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}">
                    <theme:SystemDropShadowChrome Name="Shdw"
                                                  Color="Transparent">
                        <theme:ClassicBorderDecorator Name="SubMenuBorder"
                                                      BorderStyle="AltRaised"
                                                      Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
                                                      BorderBrush="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"
                                                      BorderThickness="2">
                            <ScrollViewer CanContentScroll="true"
                                          Style="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type FrameworkElement}, ResourceId=MenuScrollViewer}}">
                                <ItemsPresenter KeyboardNavigation.DirectionalNavigation="Cycle"
                                                KeyboardNavigation.TabNavigation="Cycle"
                                                Grid.IsSharedSizeScope="true"/>
                            </ScrollViewer>
                        </theme:ClassicBorderDecorator>
                    </theme:SystemDropShadowChrome>
                </Popup>
            </DockPanel>
        </theme:ClassicBorderDecorator>
        <ControlTemplate.Triggers>
            <Trigger Property="IsSuspendingPopupAnimation"
                     Value="true">
                <Setter TargetName="PART_Popup"
                        Property="PopupAnimation"
                        Value="None"/>
            </Trigger>
            <Trigger Property="Icon"
                     Value="{x:Null}">
                <Setter TargetName="Icon"
                        Property="Visibility"
                        Value="Collapsed"/>
            </Trigger>
            <Trigger Property="IsChecked"
                     Value="true">
                <Setter TargetName="GlyphPanel"
                        Property="Visibility"
                        Value="Visible"/>
                <Setter TargetName="Icon"
                        Property="Visibility"
                        Value="Collapsed"/>
            </Trigger>
            <Trigger Property="IsHighlighted"
                     Value="true">
                <Setter TargetName="ClassicBorder"
                        Property="BorderStyle"
                        Value="ThinRaised"/>
            </Trigger>
             <Trigger Property="IsKeyboardFocused"
                     Value="true">
                <Setter TargetName="ClassicBorder"
                        Property="BorderStyle"
                        Value="ThinPressed"/>
            </Trigger>
            <Trigger Property="IsSubmenuOpen"
                     Value="true">
                <Setter TargetName="ClassicBorder"
                        Property="BorderStyle"
                        Value="ThinPressed"/>
            </Trigger>
            <Trigger SourceName="PART_Popup"
                     Property="Popup.HasDropShadow"
                     Value="true">
                <Setter TargetName="Shdw"
                        Property="Margin"
                        Value="0,0,5,5"/>
                <Setter TargetName="Shdw"
                        Property="Color"
                        Value="#71000000"/>
            </Trigger>
            <Trigger Property="IsEnabled"
                     Value="false">
                <Setter Property="Foreground"
                        Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=SubmenuItemTemplateKey}"
                     TargetType="{x:Type MenuItem}">
        <Border Name="Bd"
                Background="{TemplateBinding Background}"
                BorderThickness="{TemplateBinding BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="17"
                                      Width="Auto"
                                      SharedSizeGroup="MenuItemIconColumnGroup"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"
                                      SharedSizeGroup="MenuItemIGTColumnGroup"/>
                    <ColumnDefinition Width="14"/>
                </Grid.ColumnDefinitions>
                <!-- Glyph -->
                <ContentPresenter x:Name="Icon"
                                  Margin="4,0,6,0"
                                  VerticalAlignment="Center"
                                  ContentSource="Icon"/>
                <Path x:Name="GlyphPanel"
                      Margin="4,0,6,0"
                      Visibility="Hidden"
                      VerticalAlignment="Center"
                      Fill="{TemplateBinding Foreground}"
                      FlowDirection="LeftToRight"
                      Data="{StaticResource &#235;}"/>
                <ContentPresenter
                                  Grid.Column="1"
                                  ContentSource="Header"
                                  Margin="{TemplateBinding Padding}"
                                  RecognizesAccessKey="True"/>
                <TextBlock x:Name="InputGestureText"
                           Grid.Column="2"
                           Text="{TemplateBinding InputGestureText}"
                           Margin="5,2,0,2"
                           DockPanel.Dock="Right"/>
            </Grid>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="Icon"
                     Value="{x:Null}">
                <Setter TargetName="Icon"
                        Property="Visibility"
                        Value="Collapsed"/>
            </Trigger>
            <Trigger Property="IsChecked"
                     Value="true">
                <Setter TargetName="GlyphPanel"
                        Property="Visibility"
                        Value="Visible"/>
                <Setter TargetName="Icon"
                        Property="Visibility"
                        Value="Collapsed"/>
            </Trigger>
            <Trigger Property="IsHighlighted"
                     Value="true">
                <Setter TargetName="Bd"
                        Property="Background"
                        Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                <Setter Property="Foreground"
                        Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
            </Trigger>
            <Trigger Property="IsEnabled"
                     Value="false">
                <Setter Property="Foreground"
                        Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=SubmenuHeaderTemplateKey}"
                     TargetType="{x:Type MenuItem}">
        <Border Name="Bd"
                Background="{TemplateBinding Background}"
                BorderThickness="{TemplateBinding BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="17"
                                      Width="Auto"
                                      SharedSizeGroup="MenuItemIconColumnGroup"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"
                                      SharedSizeGroup="MenuItemIGTColumnGroup"/>
                    <ColumnDefinition Width="14"/>
                </Grid.ColumnDefinitions>
                <!-- Glyph -->
                <ContentPresenter x:Name="Icon"
                                  Margin="4,0,6,0"
                                  VerticalAlignment="Center"
                                  ContentSource="Icon"/>
                <Path x:Name="GlyphPanel"
                      Margin="4,0,6,0"
                      Visibility="Hidden"
                      VerticalAlignment="Center"
                      Fill="{TemplateBinding Foreground}"
                      FlowDirection="LeftToRight"
                      Data="{StaticResource &#235;}"/>
                <ContentPresenter Grid.Column="1"
                                  ContentSource="Header"
                                  Margin="{TemplateBinding Padding}"
                                  RecognizesAccessKey="True"/>
                <!-- Submenu arrow -->
                <Path x:Name="ArrowPanel"
                      Grid.Column="3"
                      DockPanel.Dock="Right"
                      VerticalAlignment="Center"
                      Margin="4,0,6,0"
                      Fill="{TemplateBinding Foreground}"
                      Data="{StaticResource &#234;}"/>
                <Popup x:Name="PART_Popup"
                       AllowsTransparency="true"
                       Placement="Right"
                       VerticalOffset="-2"
                       IsOpen="{Binding Path=IsSubmenuOpen,RelativeSource={RelativeSource TemplatedParent}}"
                       Focusable="false"
                       PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}">
                    <theme:SystemDropShadowChrome Name="Shdw"
                                                  Color="Transparent">
                        <theme:ClassicBorderDecorator Name="SubMenuBorder"
                                                      BorderStyle="AltRaised"
                                                      Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
                                                      BorderBrush="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"
                                                      BorderThickness="2">
                            <ScrollViewer CanContentScroll="true"
                                          Style="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type FrameworkElement}, ResourceId=MenuScrollViewer}}">
                                <ItemsPresenter KeyboardNavigation.DirectionalNavigation="Cycle"
                                                KeyboardNavigation.TabNavigation="Cycle"
                                                Grid.IsSharedSizeScope="true"/>
                            </ScrollViewer>
                        </theme:ClassicBorderDecorator>
                    </theme:SystemDropShadowChrome>
            </Popup>
            </Grid>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsSuspendingPopupAnimation"
                     Value="true">
                <Setter TargetName="PART_Popup"
                        Property="PopupAnimation"
                        Value="None"/>
            </Trigger>
            <Trigger Property="Icon"
                     Value="{x:Null}">
                <Setter TargetName="Icon"
                        Property="Visibility"
                        Value="Collapsed"/>
            </Trigger>
            <Trigger Property="IsChecked"
                     Value="true">
                <Setter TargetName="GlyphPanel"
                        Property="Visibility"
                        Value="Visible"/>
                <Setter TargetName="Icon"
                        Property="Visibility"
                        Value="Collapsed"/>
            </Trigger>
            <Trigger Property="IsHighlighted"
                     Value="true">
                <Setter TargetName="Bd"
                        Property="Background"
                        Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                <Setter Property="Foreground"
                        Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
            </Trigger>
            <Trigger SourceName="PART_Popup"
                     Property="Popup.HasDropShadow"
                     Value="true">
                <Setter TargetName="Shdw"
                        Property="Margin"
                        Value="0,0,5,5"/>
                <Setter TargetName="Shdw"
                        Property="Color"
                        Value="#71000000"/>
            </Trigger>
            <Trigger Property="IsEnabled"
                     Value="false">
                <Setter Property="Foreground"
                        Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="{x:Type MenuItem}"
           TargetType="{x:Type MenuItem}">
        <Setter Property="HorizontalContentAlignment"
                Value="{Binding Path=HorizontalContentAlignment,RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="VerticalContentAlignment"
                Value="{Binding Path=VerticalContentAlignment,RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="Background"
                Value="Transparent"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}"/>
        <Setter Property="Template"
                Value="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=SubmenuItemTemplateKey}}"/>
        <Style.Triggers>
            <Trigger Property="Role"
                     Value="TopLevelHeader">
                <Setter Property="Margin"
                        Value="0,1,0,1"/>
                <Setter Property="Padding"
                        Value="4,1,5,2"/>
                <Setter Property="Template"
                        Value="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=TopLevelHeaderTemplateKey}}"/>
            </Trigger>
            <Trigger Property="Role"
                     Value="TopLevelItem">
                <Setter Property="Margin"
                        Value="0,1,0,1"/>
                <Setter Property="Padding"
                        Value="4,1,5,2"/>
                <Setter Property="Template"
                        Value="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=TopLevelItemTemplateKey}}"/>
            </Trigger>
            <Trigger Property="Role"
                     Value="SubmenuHeader">
                <Setter Property="DockPanel.Dock"
                        Value="Top"/>
                <Setter Property="Padding"
                        Value="0,2,0,2"/>
                <Setter Property="Template"
                        Value="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=SubmenuHeaderTemplateKey}}"/>
            </Trigger>
            <Trigger Property="Role"
                     Value="SubmenuItem">
                <Setter Property="DockPanel.Dock"
                        Value="Top"/>
                <Setter Property="Padding"
                        Value="0,2,0,2"/>
            </Trigger>
        </Style.Triggers>
    </Style>

 


    <!--=================================================================
        NavigationWindow
    ==================================================================-->


    <JournalEntryUnifiedViewConverter x:Key="&#225;"/>

    <LinearGradientBrush x:Key="&#237;"
                         StartPoint="0.5,0.0"
                         EndPoint="0.5,1.0">
        <GradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="#FFFFFF" Offset="0.0"/>
                <GradientStop Color="#CCD4E9" Offset="0.1"/>
                <GradientStop Color="#4881D2" Offset="0.47"/>
                <GradientStop Color="#001A5A" Offset="0.47"/>
                <GradientStop Color="#007BD6" Offset="0.70"/>
                <GradientStop Color="#54DAFF" Offset="0.85"/>
                <GradientStop Color="#86FFFF" Offset="0.95"/>
                <GradientStop Color="#FFFFFF" Offset="1.0"/>
            </GradientStopCollection>
        </GradientBrush.GradientStops>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="&#238;"
                         StartPoint="0.5,0.0"
                         EndPoint="0.5,1.0">
        <GradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="#FFFFFF" Offset="0.0"/>
                <GradientStop Color="#DFEDF9" Offset="0.1"/>
                <GradientStop Color="#3086E1" Offset="0.47"/>
                <GradientStop Color="#003B91" Offset="0.47"/>
                <GradientStop Color="#1793EF" Offset="0.70"/>
                <GradientStop Color="#5AD4FF" Offset="0.85"/>
                <GradientStop Color="#BDFFFF" Offset="0.95"/>
                <GradientStop Color="#FFFFFF" Offset="1.0"/>
            </GradientStopCollection>
        </GradientBrush.GradientStops>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="&#239;"
                         StartPoint="0.5,0.0"
                         EndPoint="0.5,1.0">
        <GradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="#C0D2F5" Offset="0.0"/>
                <GradientStop Color="#5E7A9C" Offset="0.47"/>
                <GradientStop Color="#00062D" Offset="0.47"/>
                <GradientStop Color="#005F9F" Offset="0.70"/>
                <GradientStop Color="#1FA4E2" Offset="0.85"/>
                <GradientStop Color="#61DAFF" Offset="0.95"/>
                <GradientStop Color="#48CFFF" Offset="1.0"/>
            </GradientStopCollection>
        </GradientBrush.GradientStops>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="&#240;"
                         StartPoint="0.5,0.0"
                         EndPoint="0.5,1.0">
        <GradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="#FFFFFF" Offset="0"/>
                <GradientStop Color="#EBEEF5" Offset="0.5"/>
                <GradientStop Color="#D8DDEB" Offset="0.5"/>
                <GradientStop Color="#DFE2F0" Offset="1.0"/>
            </GradientStopCollection>
        </GradientBrush.GradientStops>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="&#241;"
                         StartPoint="0,0"
                         EndPoint="0,1">
        <GradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="#6C90C4" Offset="0"/>
                <GradientStop Color="#315BB4" Offset="0.5"/>
                <GradientStop Color="#002091" Offset="0.5"/>
                <GradientStop Color="#08377C" Offset="1"/>
            </GradientStopCollection>
        </GradientBrush.GradientStops>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="&#242;"
                         StartPoint="0,0"
                         EndPoint="0,1">
        <LinearGradientBrush.GradientStops>
            <GradientStop Color="#8AB1FB" Offset="0"/>
            <GradientStop Color="#002874" Offset="1"/>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="&#243;"
                         StartPoint="0,0"
                         EndPoint="0,1">
        <LinearGradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="#FFFFFF" Offset="0.5"/>
                <GradientStop Color="#EEEEEE" Offset="0.5"/>
                <GradientStop Color="#B0B0B0" Offset="1"/>
            </GradientStopCollection>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="&#244;"
                         StartPoint="0,0"
                         EndPoint="0,1">
        <LinearGradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="#33B5DA" Offset="0"/>
                <GradientStop Color="#335799" Offset="1"/>
            </GradientStopCollection>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="&#221;"
                         StartPoint="0,0"
                         EndPoint="0,1">
        <GradientBrush.GradientStops>
            <GradientStop Color="#FFFFFF" Offset="0"/>
            <GradientStop Color="#E3E8F4" Offset="0.5"/>
            <GradientStop Color="#CFD7EB" Offset="0.5"/>
            <GradientStop Color="#E9ECFA" Offset="1.0"/>
        </GradientBrush.GradientStops>
    </LinearGradientBrush>

    <SolidColorBrush x:Key="&#245;"
                     Color="{StaticResource {x:Static SystemColors.HighlightColorKey}}"
                     Opacity="0.25"/>

    <!-- Navigation Window back/fwd button Drop Down style-->
    <Style x:Key="&#224;"
           TargetType="{x:Type MenuItem}">
        <Setter Property="OverridesDefaultStyle"
                Value="true"/>
        <Setter Property="Header"
                Value="{Binding Path=(JournalEntry.Name)}"/>
        <Setter Property="Command"
                Value="NavigationCommands.NavigateJournal"/>
        <Setter Property="CommandTarget"
                Value="{Binding RelativeSource={RelativeSource Self}}"/>
        <Setter Property="CommandParameter"
                Value="{Binding RelativeSource={RelativeSource Self}}"/>
        <Setter Property="JournalEntryUnifiedViewConverter.JournalEntryPosition"
                Value="{Binding (JournalEntryUnifiedViewConverter.JournalEntryPosition)}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type MenuItem}">
                    <Grid Name="Panel"
                          Background="Transparent"
                          SnapsToDevicePixels="true">
                        <Path Name="Glyph"
                              SnapsToDevicePixels="false"
                              Margin="7,5"
                              Width="10"
                              Height="10"
                              HorizontalAlignment="Left"
                              StrokeStartLineCap="Triangle"
                              StrokeEndLineCap="Triangle"
                              StrokeThickness="2"
                              Stroke="{TemplateBinding Foreground}"/>
                        <ContentPresenter ContentSource="Header"
                                          Margin="24,5,21,5"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="JournalEntryUnifiedViewConverter.JournalEntryPosition"
                                 Value="Current">
                            <Setter TargetName="Panel"
                                    Property="Background"
                                    Value="{StaticResource &#245;}"/>
                            <Setter TargetName="Glyph"
                                    Property="Data"
                                    Value="M 0,5 L 2.5,8 L 7,3 "/>
                            <Setter TargetName="Glyph"
                                    Property="FlowDirection"
                                    Value="LeftToRight"/>
                            <Setter TargetName="Glyph"
                                    Property="StrokeLineJoin"
                                    Value="Miter"/>
                        </Trigger>
                        <Trigger Property="IsHighlighted"
                                 Value="true">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                            <Setter TargetName="Panel"
                                    Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                        </Trigger>

                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="MenuItem.IsHighlighted"
                                           Value="true"/>
                                <Condition Property="JournalEntryUnifiedViewConverter.JournalEntryPosition"
                                           Value="Forward"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Glyph"
                                    Property="Stroke"
                                    Value="White"/>
                            <Setter TargetName="Glyph"
                                    Property="Data"
                                    Value="M 1,5 L 7,5 M 5,1 L 9,5 L 5,9"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="MenuItem.IsHighlighted"
                                           Value="true"/>
                                <Condition Property="JournalEntryUnifiedViewConverter.JournalEntryPosition"
                                           Value="Back"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Glyph"
                                    Property="Stroke"
                                    Value="White"/>
                            <Setter TargetName="Glyph"
                                    Property="Data"
                                    Value="M 9,5 L 3,5 M 5,1 L 1,5 L 5,9"/>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="&#223;"
           TargetType="{x:Type MenuItem}">
        <Setter Property="OverridesDefaultStyle"
                Value="true"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type MenuItem}">
                    <Grid>
                        <Popup x:Name="PART_Popup"
                                   AllowsTransparency="true"
                                   Placement="Bottom"
                                   VerticalOffset="2"
                                   IsOpen="{Binding Path=(MenuItem.IsSubmenuOpen),RelativeSource={RelativeSource TemplatedParent}}"
                                   Focusable="false"
                                   PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}">
                            <theme:SystemDropShadowChrome Name="Shdw"
                                                          Color="Transparent">
                                <Border Name="SubMenuBorder"
                                        Background="{DynamicResource {x:Static SystemColors.MenuBrushKey}}"
                                        BorderThickness="1"
                                        BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}">

                                    <ScrollViewer CanContentScroll="true"
                                                  Style="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type FrameworkElement}, ResourceId=MenuScrollViewer}}">
                                        <ItemsPresenter Margin="2"
                                                        KeyboardNavigation.TabNavigation="Cycle"
                                                        KeyboardNavigation.DirectionalNavigation="Cycle"/>
                                    </ScrollViewer>
                                </Border>
                            </theme:SystemDropShadowChrome>
                        </Popup>
                       
                        <Grid x:Name="Panel"
                              Width="26"
                              Background="Transparent"
                              HorizontalAlignment="Right" >
  
                            <Border SnapsToDevicePixels="True"
                                    Visibility="Hidden"
                                    Name="HighlightBorder"
                                    BorderThickness="1,1,1,1"
                                    BorderBrush="#B0B5BACE"
                                    CornerRadius="2" >
                                <Border.Background>
                                    <LinearGradientBrush StartPoint="0,0"
                                                         EndPoint="0,1" >
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStop Color="#20DDDDDD" Offset="0" />
                                            <GradientStop Color="#80FFFFFF" Offset="1" />
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Border.Background>
                                <Border BorderBrush="#A0FFFFFF" CornerRadius="1.5" BorderThickness="1" />
                            </Border>

                            <Path x:Name="Arrow"
                                  SnapsToDevicePixels="false"
                                  HorizontalAlignment="Right"
                                  VerticalAlignment="Center"
                                  Margin="{TemplateBinding Padding}"
                                  Fill="{StaticResource &#244;}"
                                  Stroke="White"
                                  StrokeThickness="1"
                                  StrokeLineJoin="Round"
                                  Data="M 0 0 L 4.5 5 L 9 0 Z"/>
                        </Grid>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsHighlighted" Value="true">
                            <Setter TargetName="HighlightBorder"
                                    Property="Visibility"
                                    Value="Visible"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="Arrow"
                                    Property="Fill"
                                    Value="#A5AABE"/>
                        </Trigger>
                        <Trigger SourceName="PART_Popup"
                                 Property="Popup.HasDropShadow"
                                 Value="true">
                            <Setter TargetName="Shdw"
                                    Property="Margin"
                                    Value="0,0,5,5"/>
                            <Setter TargetName="Shdw"
                                    Property="SnapsToDevicePixels"
                                    Value="true"/>
                            <Setter TargetName="Shdw"
                                    Property="Color"
                                    Value="#71000000"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="&#222;"
           TargetType="{x:Type Menu}">
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <DockPanel/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="OverridesDefaultStyle"
                Value="true"/>
        <Setter Property="FocusManager.IsFocusScope"
                Value="false"/>
        <Setter Property="KeyboardNavigation.TabNavigation"
                Value="None"/>
        <Setter Property="IsMainMenu"
                Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Menu}">
                    <ItemsPresenter/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Navigation Window Back Button Style -->
    <Style x:Key="&#226;"
           TargetType="{x:Type Button}">
        <!-- We will need to find out the size of button and menu height from system resources -->
        <!-- Opened work item #22122 to track this-->
        <Setter Property="OverridesDefaultStyle"
                Value="true"/>
        <Setter Property="Command"
                Value="NavigationCommands.BrowseBack"/>
        <Setter Property="Focusable"
                Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid Width="24"
                          Height="24"
                          Background="Transparent">
                        <!-- Circle -->
                        <Ellipse Name="Circle"
                                 StrokeThickness="1"
                                 Fill="{StaticResource &#237;}"
                                 Stroke="{StaticResource &#241;}" />

                        <!-- Arrow -->
                        <Path Name="Arrow"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              StrokeThickness="0.75"
                              Data="M0.37,7.69 L5.74,14.20 A1.5,1.5,0,1,0,10.26,12.27 L8.42,10.42 14.90,10.39 A1.5,1.5,0,1,0,14.92,5.87 L8.44,5.90 10.31,4.03 A1.5,1.5,0,1,0,5.79,1.77 z"
                              Stroke="{StaticResource &#242;}"
                              Fill="{StaticResource &#243;}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Fill"
                                    Value="{StaticResource &#240;}"
                                    TargetName="Circle"/>
                            <Setter Property="Stroke"
                                    Value="#B5BACE"
                                    TargetName="Circle"/>
                            <Setter Property="Stroke"
                                    Value="#B0B5BACE"
                                    TargetName="Arrow"/>
                            <Setter Property="Fill"
                                    Value="#D0FFFFFF"
                                    TargetName="Arrow"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter Property="Fill"
                                    Value="{StaticResource &#238;}"
                                    TargetName="Circle"/>
                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter Property="Fill"
                                    Value="{StaticResource &#239;}"
                                    TargetName="Circle"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 

    <!-- Navigation Window Forward Button Style -->
    <Style x:Key="&#227;"
           TargetType="{x:Type Button}">
        <!-- We will need to find out the size of button and menu height from system resources -->
        <!-- Opened work item #22122 to track this-->
        <Setter Property="OverridesDefaultStyle"
                Value="true"/>
        <Setter Property="Command"
                Value="NavigationCommands.BrowseForward"/>
        <Setter Property="Focusable"
                Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid Width="24"
                          Height="24"
                          Background="Transparent">
                        <!-- Circle -->
                        <Ellipse Name="Circle"
                                 Grid.Column="0"     
                                 StrokeThickness="1"
                                 Fill="{StaticResource &#237;}"
                                 Stroke="{StaticResource &#241;}" />

                        <!-- Arrow -->
                        <Path Name="Arrow"
                              Grid.Column="0"     
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              StrokeThickness="0.75"
                              Data="M0.37,7.69 L5.74,14.20 A1.5,1.5,0,1,0,10.26,12.27 L8.42,10.42 14.90,10.39 A1.5,1.5,0,1,0,14.92,5.87 L8.44,5.90 10.31,4.03 A1.5,1.5,0,1,0,5.79,1.77 z"
                              Stroke="{StaticResource &#242;}"
                              Fill="{StaticResource &#243;}"
                              RenderTransformOrigin="0.5,0">
                            <Path.RenderTransform>
                                <ScaleTransform ScaleX="-1" />
                            </Path.RenderTransform>
                        </Path>

                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Fill"
                                    Value="{StaticResource &#240;}"
                                    TargetName="Circle"/>
                            <Setter Property="Stroke"
                                    Value="#B5BACE"
                                    TargetName="Circle"/>
                            <Setter Property="Stroke"
                                    Value="#B0B5BACE"
                                    TargetName="Arrow"/>
                            <Setter Property="Fill"
                                    Value="#D0FFFFFF"
                                    TargetName="Arrow"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter Property="Fill"
                                    Value="{StaticResource &#238;}"
                                    TargetName="Circle"/>
                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter Property="Fill"
                                    Value="{StaticResource &#239;}"
                                    TargetName="Circle"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 

    <ControlTemplate x:Key="&#246;"
                     TargetType="{x:Type NavigationWindow}">
        <Border Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}">
            <DockPanel>
                <Grid Name="NavChrome"
                      Background="{StaticResource &#221;}"
                      DockPanel.Dock="Top"
                      Height="30">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="29"/>
                        <ColumnDefinition Width="26"/>
                        <ColumnDefinition Width="17"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <!-- Menu -->
                    <Menu Name="NavMenu"
                          Grid.ColumnSpan="3"
                          Height="23"
                          Margin="1,0,0,1"
                          VerticalAlignment="Center"
                          Style="{StaticResource &#222;}">

                        <MenuItem Padding="0,2,5,0"
                                  Style="{StaticResource &#223;}"
                                  ItemContainerStyle="{StaticResource &#224;}"
                                  IsSubmenuOpen="{Binding Path=(MenuItem.IsSubmenuOpen),Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}">
                            <MenuItem.ItemsSource>
                                <MultiBinding Converter="{StaticResource &#225;}">
                                    <MultiBinding.Bindings>
                                        <Binding RelativeSource="{RelativeSource TemplatedParent}"
                                                 Path="(NavigationWindow.BackStack)" />
                                        <Binding RelativeSource="{RelativeSource TemplatedParent}"
                                                 Path="(NavigationWindow.ForwardStack)" />
                                    </MultiBinding.Bindings>
                                </MultiBinding>
                            </MenuItem.ItemsSource>
                        </MenuItem>
                    </Menu>

                    <Path Grid.Column="0"
                          SnapsToDevicePixels="false"
                          IsHitTestVisible="false"
                          Margin="2,0,0,0"
                          Grid.ColumnSpan="3"
                          StrokeThickness="1"
                          HorizontalAlignment="Left"
                          VerticalAlignment="Center"
                          Data="M22.5767,21.035 Q27,19.37 31.424,21.035 A12.5,12.5,0,0,0,53.5,13 A12.5,12.5,0,0,0,37.765,0.926 Q27,4.93 16.235,0.926 A12.5,12.5,0,0,0,0.5,13 A12.5,12.5,0,0,0,22.5767,21.035 z">
                        <Path.Fill>
                            <LinearGradientBrush StartPoint="0,0"
                                                 EndPoint="0,1">
                                <LinearGradientBrush.GradientStops>
                                    <GradientStopCollection>
                                        <GradientStop Color="#A0C2CCE7" Offset="0"/>
                                        <GradientStop Color="#60FFFFFF" Offset="1"/>
                                    </GradientStopCollection>
                                </LinearGradientBrush.GradientStops>
                            </LinearGradientBrush>
                        </Path.Fill>

                        <Path.Stroke>
                            <LinearGradientBrush StartPoint="0,0"
                                                 EndPoint="0,1">
                                <LinearGradientBrush.GradientStops>
                                    <GradientStopCollection>
                                        <GradientStop Color="#FFB7C2E3" Offset="0.2"/>
                                        <GradientStop Color="#A0FFFFFF" Offset="0.9"/>
                                    </GradientStopCollection>
                                </LinearGradientBrush.GradientStops>
                            </LinearGradientBrush>
                        </Path.Stroke>
                    </Path>

                    <Button Style="{StaticResource &#226;}"
                            Margin="3,0,2,0"
                            Grid.Column="0"/>
                   

                    <Button Style="{StaticResource &#227;}"
                            Margin="2,0,0,0"
                            Grid.Column="1"/>
                </Grid>
                <Grid>
                    <AdornerDecorator>
                        <ContentPresenter Name="PART_NavWinCP"
                                          ClipToBounds="true"/>
                    </AdornerDecorator>


                    <ResizeGrip x:Name="WindowResizeGrip"
                                HorizontalAlignment="Right"
                                VerticalAlignment="Bottom"
                                Visibility="Collapsed"
                                IsTabStop="false"/>
                </Grid>
            </DockPanel>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="ShowsNavigationUI" Value="False">
                <Setter TargetName="NavChrome" Property="Visibility" Value="Collapsed"/>
            </Trigger>

            <MultiTrigger>
                <!-- There may be perf implications b/c of the following conditions.  We may cause
                        an extra layout to happen when WindowState changes to Minimized and ResizeMode
                        is set to CanResizeWithGrip -->
                <MultiTrigger.Conditions>
                    <Condition Property="Window.ResizeMode"
                               Value="CanResizeWithGrip"/>
                    <Condition Property="Window.WindowState"
                               Value="Normal"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="WindowResizeGrip"
                        Property="Visibility"
                        Value="Visible"/>
            </MultiTrigger>

            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="NavigationWindow.CanGoForward"
                               Value="false"/>
                    <Condition Property="NavigationWindow.CanGoBack"
                               Value="false"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="NavMenu"
                        Property="IsEnabled"
                        Value="false"/>
            </MultiTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="{x:Type NavigationWindow}"
           TargetType="{x:Type NavigationWindow}">
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
        <Setter Property="Template"
                Value="{StaticResource &#246;}"/>
    </Style>

 


    <!--=================================================================
        Page
    ==================================================================-->
    <Style x:Key="{x:Type Page}"
           TargetType="{x:Type Page}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Page}">
                    <Border Background="{TemplateBinding Background}">
                        <ContentPresenter ClipToBounds="true"
                                          Content="{TemplateBinding Page.Content}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 

 
  
    <!--=================================================================
        ProgressBar
    ==================================================================-->
    <Style x:Key="{x:Type ProgressBar}"
           TargetType="{x:Type ProgressBar}">
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
        <Setter Property="BorderBrush"
                Value="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"/>
        <Setter Property="BorderThickness"
                Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ProgressBar}">
                    <theme:ClassicBorderDecorator BorderStyle="ThinPressed"
                                                  Background="{TemplateBinding Background}"
                                                  BorderBrush="{TemplateBinding BorderBrush}"
                                                  BorderThickness="{TemplateBinding BorderThickness}">
                        <DockPanel x:Name="PART_Track"
                                   Margin="0,0,2,2"
                                   LastChildFill="false">
                            <Rectangle x:Name="PART_Indicator">
                                <Rectangle.Fill>
                                    <MultiBinding>
                                        <MultiBinding.Converter>
                                            <theme:ProgressBarBrushConverter/>
                                        </MultiBinding.Converter>
                                        <Binding Path="Foreground"
                                                 RelativeSource="{RelativeSource TemplatedParent}"/>
                                        <Binding Path="IsIndeterminate"
                                                 RelativeSource="{RelativeSource TemplatedParent}"/>
                                        <Binding Path="ActualWidth"
                                                 ElementName="PART_Indicator"/>
                                        <Binding Path="ActualHeight"
                                                 ElementName="PART_Indicator"/>
                                        <Binding Path="ActualWidth"
                                                 ElementName="PART_Track"/>
                                    </MultiBinding>
                                </Rectangle.Fill>
                            </Rectangle>
                        </DockPanel>
                    </theme:ClassicBorderDecorator>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Orientation"
                     Value="Vertical">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ProgressBar}">
                            <theme:ClassicBorderDecorator BorderStyle="ThinPressed"
                                                          Background="{TemplateBinding Background}"
                                                          BorderBrush="{TemplateBinding BorderBrush}"
                                                          BorderThickness="{TemplateBinding BorderThickness}">
                                <DockPanel x:Name="PART_Track"
                                           Margin="0,0,2,2"
                                           LastChildFill="false">
                                    <Decorator x:Name="PART_Indicator"
                                               DockPanel.Dock="Bottom">
                                        <Rectangle>
                                            <Rectangle.LayoutTransform>
                                                <RotateTransform Angle="-90"/>
                                            </Rectangle.LayoutTransform>
                                            <Rectangle.Fill>
                                                <MultiBinding>
                                                    <MultiBinding.Converter>
                                                        <theme:ProgressBarBrushConverter/>
                                                    </MultiBinding.Converter>
                                                    <Binding Path="Foreground"
                                                             RelativeSource="{RelativeSource TemplatedParent}"/>
                                                    <Binding Path="IsIndeterminate"
                                                             RelativeSource="{RelativeSource TemplatedParent}"/>
                                                    <Binding Path="ActualHeight"
                                                             ElementName="PART_Indicator"/>
                                                    <Binding Path="ActualWidth"
                                                             ElementName="PART_Indicator"/>
                                                    <Binding Path="ActualHeight"
                                                             ElementName="PART_Track"/>
                                                </MultiBinding>
                                            </Rectangle.Fill>
                                        </Rectangle>
                                    </Decorator>
                                </DockPanel>
                            </theme:ClassicBorderDecorator>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>

 

  
    <!--=================================================================
        RadioButton
    ==================================================================-->
    <Style x:Key="{x:Type RadioButton}"
           TargetType="{x:Type RadioButton}">
        <Setter Property="FocusVisualStyle"
                Value="{StaticResource &#208;}"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
        <Setter Property="Padding"
                Value="2,0,0,0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RadioButton}">
                    <BulletDecorator Background="Transparent">
                        <BulletDecorator.Bullet>
                            <!-- Draw Checkmark border and tick mark -->
                            <theme:ClassicBorderDecorator x:Name="Border"
                                                          Width="13"
                                                          Height="13"
                                                          BorderStyle="RadioButton"
                                                          Background="{TemplateBinding Background}"
                                                          BorderThickness="4,4,5,5">
                                <Ellipse x:Name="Dot"
                                      Visibility="Hidden"
                                      Fill="{TemplateBinding Foreground}"
                                      Width="4"
                                      Height="4"/>
                            </theme:ClassicBorderDecorator>
                        </BulletDecorator.Bullet>
                        <ContentPresenter Margin="{TemplateBinding Padding}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          RecognizesAccessKey="True"/>
                    </BulletDecorator>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked"
                                 Value="true">
                            <Setter TargetName="Dot"
                                    Property="Visibility"
                                    Value="Visible"/>
                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter TargetName="Border"
                                    Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter TargetName="Border"
                                    Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                            <Setter TargetName="Dot"
                                    Property="Fill"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <!--=================================================================
            ResizeGrip
        ==================================================================-->
    <Style x:Key="{x:Type ResizeGrip}"
           TargetType="{x:Type ResizeGrip}">
        <Setter Property="MinWidth"
                Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
        <Setter Property="MinHeight"
                Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
        <Setter Property="Background"
                Value="Transparent"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ResizeGrip}">
                    <Grid SnapsToDevicePixels="true" Background="{TemplateBinding Background}">
                        <Path HorizontalAlignment="Right"
                              VerticalAlignment="Bottom"
                              Data="M 11,0 L 12,0 L 12,12 L 0,12 L 0,11 z"
                              Margin="0,0,2,2">
                            <Path.Fill>
                                <DrawingBrush Viewbox="0,0,4,4"
                                              Viewport="0,0,4,4"
                                              TileMode="Tile"
                                              ViewportUnits="Absolute"
                                              ViewboxUnits="Absolute">
                                    <DrawingBrush.Drawing>
                                        <DrawingGroup>
                                            <DrawingGroup.Children>
                                                <GeometryDrawing Brush="{StaticResource {x:Static SystemColors.ControlDarkBrushKey}}"
                                                                 Geometry="M 0,0 L 2,0 L 2,1 L 1,1 L 1,2 L 0,2 z M 2,2 L 3,2 L 3,1 L 4,1 4,3 L 3,3 L 3,4 L 1,4 L 1,3 L 2,3 z"/>
                                                <GeometryDrawing Brush="{StaticResource {x:Static SystemColors.ControlLightLightBrushKey}}"
                                                                 Geometry="M 0,3 L 1,3 L 1,4 L 0,4 z M 1,2 L 2,2 L 2,3 L 1,3 z M 2,1 L 3,1 L 3,2 L 2,2 z M 3,0 L 4,0 L 4,1 L 3,1 z "/>
                                            </DrawingGroup.Children>
                                        </DrawingGroup>
                                    </DrawingBrush.Drawing>
                                </DrawingBrush>
                            </Path.Fill>
                        </Path>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


     <!--
            **************************************************************
            * Base style for HorizontalScrollBar LineLeft/Right buttons  *
            * and VerticalScrollBar LineUp/Down button                   *
            **************************************************************
        -->
    <SolidColorBrush x:Key="&#247;"
                     Color="{StaticResource {x:Static SystemColors.ControlLightLightColorKey}}"
                     Opacity="0.5"/>
    <Style x:Key="&#248;"
           TargetType="{x:Type RepeatButton}">
        <Setter Property="OverridesDefaultStyle"
                Value="true"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="BorderBrush"
                Value="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"/>
        <Setter Property="BorderThickness"
                Value="2"/>
        <Setter Property="MinWidth"
                Value="0"/>
        <Setter Property="MinHeight"
                Value="0"/>
        <Setter Property="IsTabStop"
                Value="false"/>
        <Setter Property="Focusable"
                Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <theme:ClassicBorderDecorator x:Name="ClassicBorder"
                                                  BorderStyle="AltRaised"
                                                  Width="{TemplateBinding Width}"
                                                  Height="{TemplateBinding Height}"
                                                  Background="{TemplateBinding Background}"
                                                  BorderBrush="{TemplateBinding BorderBrush}"
                                                  BorderThickness="{TemplateBinding BorderThickness}">
                        <Path HorizontalAlignment="Center"
                              VerticalAlignment="Center"
                              Fill="{TemplateBinding Foreground}"
                              Data="{Binding Path=Content,RelativeSource={RelativeSource TemplatedParent}}"/>
                    </theme:ClassicBorderDecorator>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter Property="BorderStyle"
                                    Value="AltPressed"
                                    TargetName="ClassicBorder"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--
            ********************************************
            * HorizontalScrollBar PageLeftButton Style *
            ********************************************
        -->
    <Style x:Key="&#249;"
           TargetType="{x:Type RepeatButton}">
        <Setter Property="OverridesDefaultStyle"
                Value="true"/>
        <Setter Property="IsTabStop"
                Value="false"/>
        <Setter Property="Focusable"
                Value="false"/>
        <Setter Property="MinHeight"
                Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
        <Setter Property="MinWidth"
                Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Rectangle x:Name="PageButtonBackground"
                               Fill="Transparent"/>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter Property="Fill"
                                    Value="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"
                                    TargetName="PageButtonBackground"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--
            ******************************************
            * VerticalScrollBar PageButton Style     *
            ******************************************
        -->
    <Style x:Key="&#250;"
           TargetType="{x:Type RepeatButton}">
        <Setter Property="OverridesDefaultStyle"
                Value="true"/>
        <Setter Property="IsTabStop"
                Value="false"/>
        <Setter Property="Focusable"
                Value="false"/>
        <Setter Property="MinWidth"
                Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
        <Setter Property="MinHeight"
                Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Rectangle x:Name="PageButtonBackground"
                               Fill="Transparent"/>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter Property="Fill"
                                    Value="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"
                                    TargetName="PageButtonBackground"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="&#251;"
           TargetType="{x:Type Thumb}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <theme:ClassicBorderDecorator BorderStyle="Raised"
                                                  Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
                                                  BorderThickness="3"
                                                  BorderBrush="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--
        *****************************
        * ScrollBar Style           *
        *****************************
    -->
    <Style x:Key="{x:Type ScrollBar}"
           TargetType="{x:Type ScrollBar}">
        <Setter Property="Stylus.IsPressAndHoldEnabled"
                Value="false"/>
        <Setter Property="Stylus.IsFlicksEnabled"
                Value="false"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="BorderThickness"
                Value="0"/>
        <Setter Property="Width"
                Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
        <Setter Property="MinWidth"
                Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollBar}">
                    <Grid Background="{TemplateBinding Background}">
                        <Grid.RowDefinitions>
                            <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}"/>
                            <RowDefinition Height="0.00001*"/>
                            <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}"/>
                        </Grid.RowDefinitions>
                        <Viewbox Stretch="Fill">
                            <RepeatButton Style="{StaticResource &#248;}"
                                          Height="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}"
                                          MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
                                          Command="{x:Static ScrollBar.LineUpCommand}"
                                          Content="M 0 4 L 7 4 L 3.5 0 Z"/>
                        </Viewbox>
                        <Rectangle Grid.Row="1"
                                   Fill="{StaticResource &#247;}"/>

                        <Track Grid.Row="1"
                               Name="PART_Track"
                               IsDirectionReversed="true">
                            <Track.DecreaseRepeatButton>
                                <RepeatButton Style="{StaticResource &#250;}"
                                              Command="{x:Static ScrollBar.PageUpCommand}"/>
                            </Track.DecreaseRepeatButton>
                            <Track.IncreaseRepeatButton>
                                <RepeatButton Style="{StaticResource &#250;}"
                                              Command="{x:Static ScrollBar.PageDownCommand}"/>
                            </Track.IncreaseRepeatButton>
                            <Track.Thumb>
                                <Thumb Style="{StaticResource &#251;}"/>
                            </Track.Thumb>
                        </Track>

                        <Viewbox Stretch="Fill"
                                 Grid.Row="2">
                            <RepeatButton Style="{StaticResource &#248;}"
                                          Height="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}"
                                          MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
                                          Command="{x:Static ScrollBar.LineDownCommand}"
                                          Content="M 0 0 L 3.5 4 L 7 0 Z"/>
                        </Viewbox>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Orientation"
                     Value="Horizontal">
                <Setter Property="Width"
                        Value="Auto"/>
                <Setter Property="MinWidth"
                        Value="0"/>
                <Setter Property="Height"
                        Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
                <Setter Property="MinHeight"
                        Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ScrollBar}">
                            <Grid Background="{TemplateBinding Background}">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"/>
                                    <ColumnDefinition Width="0.00001*"/>
                                    <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"/>
                                </Grid.ColumnDefinitions>
                                <Viewbox Stretch="Fill">
                                    <RepeatButton Style="{StaticResource &#248;}"
                                                  Width="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"
                                                  MinHeight="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"
                                                  Command="{x:Static ScrollBar.LineLeftCommand}"
                                                  Content="M 0 4 L 4 8 L 4 0 Z"/>
                                </Viewbox>
                                <Rectangle Grid.Column="1"
                                           Fill="{StaticResource &#247;}"/>
                                <Track Grid.Column="1"
                                       Name="PART_Track">
                                    <Track.DecreaseRepeatButton>
                                        <RepeatButton Style="{StaticResource &#249;}"
                                                      Command="{x:Static ScrollBar.PageLeftCommand}"/>
                                    </Track.DecreaseRepeatButton>
                                    <Track.IncreaseRepeatButton>
                                        <RepeatButton Style="{StaticResource &#249;}"
                                                      Command="{x:Static ScrollBar.PageRightCommand}"/>
                                    </Track.IncreaseRepeatButton>
                                    <Track.Thumb>
                                        <Thumb Style="{StaticResource &#251;}"/>
                                    </Track.Thumb>
                                </Track>


                                <Viewbox Stretch="Fill"
                                         Grid.Column="2">
                                    <RepeatButton Style="{StaticResource &#248;}"
                                                  Width="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"
                                                  MinHeight="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"
                                                  Command="{x:Static ScrollBar.LineRightCommand}"
                                                  Content="M 0 0 L 0 8 L 4 4 Z"/>
                                </Viewbox>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>


   


 
    <!--=================================================================
        ScrollViewer
    ==================================================================-->
    <Style x:Key="{x:Type ScrollViewer}"
           TargetType="{x:Type ScrollViewer}">
        <Style.Triggers>
            <Trigger Property="IsEnabled"
                     Value="false">
                <Setter Property="Foreground"
                        Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <!--=================================================================
        Separator
    ==================================================================-->
    <Style x:Key="{x:Type Separator}"
           TargetType="{x:Type Separator}">
        <Setter Property="MinHeight"
                Value="2"/>
        <Setter Property="MinWidth"
                Value="2"/>
        <Setter Property="Margin"
                Value="0,2,0,2"/>
        <Setter Property="Focusable"
                Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Separator}">
                    <theme:ClassicBorderDecorator BorderStyle="HorizontalLine"
                                                  BorderBrush="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"
                                                  BorderThickness="1"
                                                  Height="2"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style><!--=================================================================
        Slider
    ==================================================================-->
    <Style x:Key="&#252;"
           TargetType="{x:Type RepeatButton}">
        <Setter Property="OverridesDefaultStyle"
                Value="true"/>
        <Setter Property="IsTabStop"
                Value="false"/>
        <Setter Property="Focusable"
                Value="false"/>
        <Setter Property="Background"
                Value="Transparent"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Border Background="{TemplateBinding Background}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="&#253;"
           TargetType="{x:Type Thumb}">
        <Setter Property="OverridesDefaultStyle"
                Value="true"/>
        <Setter Property="Foreground"
                Value="{x:Null}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
        <Setter Property="Height"
                Value="21"/>
        <Setter Property="Width"
                Value="11"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <theme:ClassicBorderDecorator BorderStyle="Raised"
                                                  Background="{TemplateBinding Background}"
                                                  BorderBrush="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"
                                                  BorderThickness="3">
                        <Rectangle Name="ForegroundRect"
                                   Fill="{TemplateBinding Foreground}"
                                   Opacity="0.5"
                                   Margin="-1"/>
                    </theme:ClassicBorderDecorator>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsDragging"
                                 Value="true">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="&#254;"
           TargetType="{x:Type Thumb}">
        <Setter Property="OverridesDefaultStyle"
                Value="true"/>
        <Setter Property="Foreground"
                Value="{x:Null}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
        <Setter Property="Height"
                Value="21"/>
        <Setter Property="Width"
                Value="11"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Canvas SnapsToDevicePixels="true">
                        <!-- Fill Background Area including base border -->
                        <Path Fill="{TemplateBinding Background}"
                              Data="M 11 21 L 0 21 L 0 6 L 5 1 L 6 1 L 11 6 z"/>
                        <!-- LeftTip/Left-OuterLine -->
                        <Path Stroke="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"
                              StrokeThickness="1.0"
                              Data="M 0.5 20 L 0.5 5.5 L 5 0.5 L 5.5 0.5"/>
                        <!-- Bottom/Right/RightTip-OuterLine -->
                        <Path Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"
                              StrokeThickness="1.0"
                              Data="M 5.5 0.5 L 6 0.5 L 10.5 5.5 L 10.5 20.5 L 0 20.5"/>
                        <!-- LeftTip/Left-InnerLine -->
                        <Path Stroke="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"
                              StrokeThickness="1.0"
                              Data="M 1.5 19 L 1.5 5.5 L 5 1.5 L 5.5 1.5"/>
                        <!-- Bottom/Right/RightTip-InnerLine-->
                        <Path Stroke="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"
                              StrokeThickness="1.0"
                              Data="M 5.5 1.5 L 6 1.5 L 9.5 5.5 L 9.5 19.5 L 1.0 19.5"/>
                        <!-- Fill Inner Area -->
                        <Path Fill="{TemplateBinding Foreground}"
                              Opacity="0.5"
                              Data="M 9 19 L 2 19 L 2 6 L 5.5 2 L 9 6 z"/>
                    </Canvas>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsDragging"
                                 Value="true">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="&#255;"
           TargetType="{x:Type Thumb}">
        <Setter Property="OverridesDefaultStyle"
                Value="true"/>
        <Setter Property="Foreground"
                Value="{x:Null}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
        <Setter Property="Height"
                Value="21"/>
        <Setter Property="Width"
                Value="11"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Canvas SnapsToDevicePixels="true">
                        <!-- Fill Background Area including base border -->
                        <Path Fill="{TemplateBinding Background}"
                              Data="M 11 0 L 0 0 L 0 15 L 5 21 L 6 21 L 11 15 z"/>
                        <!-- Top/Left/LeftTip OuterLine -->
                        <Path Stroke="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"
                              StrokeThickness="1.0"
                              Data="M 10 0.5 L 0.5 0.5 L 0.5 15.5 L 5 20.5 L 5.5 20.5"/>
                        <!-- Right/RightTip OuterLine -->
                        <Path Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"
                              StrokeThickness="1.0"
                              Data="M 5.5 20.5 L 6 20.5 L 10.5 15.5 L 10.5 0"/>
                        <!-- Top/Left/LeftTip InnerLine -->
                        <Path Stroke="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"
                              StrokeThickness="1.0"
                              Data="M 9 1.5 L 1.5 1.5 L 1.5 15.5 L 5 19.5 L 5.5 19.5"/>
                        <!-- Right/RightTip InnerLine -->
                        <Path Stroke="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"
                              StrokeThickness="1.0"
                              Data="M 5.5 19.5 L 6 19.5 L 9.5 15.5 L 9.5 1"/>
                        <!-- Fill Inner Area -->
                        <Path Fill="{TemplateBinding Foreground}"
                              Opacity="0.5"
                              Data="M 9 2 L 2 2 L 2 15 L 5.5 19 L 9 15 z"/>
                    </Canvas>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsDragging"
                                 Value="true">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--=================================================================
        VerticalSlider
    ==================================================================-->
    <Style x:Key="&#256;"
           TargetType="{x:Type Thumb}">
        <Setter Property="OverridesDefaultStyle"
                Value="true"/>
        <Setter Property="Foreground"
                Value="{x:Null}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
        <Setter Property="Width"
                Value="21"/>
        <Setter Property="Height"
                Value="11"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <theme:ClassicBorderDecorator BorderStyle="Raised"
                                                  Background="{TemplateBinding Background}"
                                                  BorderBrush="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"
                                                  BorderThickness="3">
                        <Rectangle
                                   Fill="{TemplateBinding Foreground}"
                                   Opacity="0.5"
                                   Margin="-1"/>
                    </theme:ClassicBorderDecorator>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsDragging"
                                 Value="true">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="&#257;"
           TargetType="{x:Type Thumb}">
        <Setter Property="OverridesDefaultStyle"
                Value="true"/>
        <Setter Property="Foreground"
                Value="{x:Null}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
        <Setter Property="Width"
                Value="21"/>
        <Setter Property="Height"
                Value="11"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Canvas SnapsToDevicePixels="true">
                        <!-- Fill Background Area including base border -->
                        <Path Fill="{TemplateBinding Background}"
                              Data="M 21 11 L 21 0 L 6 0 L 0 5 L 0 6 L 6 11 z"/>
                        <!-- TopTip/Top OuterLine -->
                        <Path Stroke="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"
                              StrokeThickness="1.0"
                              Data="M 20 0.5 L 5.5 0.5 L 0.5 5 L 0.5 5.5 "/>
                        <!-- Right/Bottom/BottomTip OuterLine -->
                        <Path Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"
                              StrokeThickness="1.0"
                              Data="M 0.5 5.5 L 0.5 6 L 5.5 10.5 L 20.5 10.5 L 20.5 0 "/>
                        <!-- TopTip/Top InnerLine -->
                        <Path Stroke="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"
                              StrokeThickness="1.0"
                              Data="M 19 1.5 L 5.5 1.5 L 1.5 5 L 1.5 5.5 "/>
                        <!-- Right/Bottom/BottomTip InnerLine-->
                        <Path Stroke="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"
                              StrokeThickness="1.0"
                              Data="M 1.5 5.5 L 1.5 6 L 5.5 9.5 L 19.5 9.5 L 19.5 1.0 "/>
                        <!-- Fill Inner Area -->
                        <Path Fill="{TemplateBinding Foreground}"
                              Opacity="0.5"
                              Data="M 19 9 L 19 2 L 6 2 L 2 5.5 L 6 9 z"/>
                    </Canvas>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsDragging"
                                 Value="true">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="&#258;"
           TargetType="{x:Type Thumb}">
        <Setter Property="OverridesDefaultStyle"
                Value="true"/>
        <Setter Property="BorderThickness"
                Value="0,0,0,0"/>
        <Setter Property="Foreground"
                Value="{x:Null}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
        <Setter Property="Width"
                Value="21"/>
        <Setter Property="Height"
                Value="11"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Canvas SnapsToDevicePixels="true">
                        <!-- Fill Background Area including base border -->
                        <Path Fill="{TemplateBinding Background}"
                              Data="M 0 11 L 0 0 L 15 0 L 21 5 L 21 6 L 15 11 z"/>
                        <!-- Left/Top/TopTip OuterLine -->
                        <Path Stroke="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"
                              StrokeThickness="1.0"
                              Data="M 0.5 10 L 0.5 0.5 L 15.5 0.5 L 20.5 5 L 20.5 5.5 "/>
                        <!-- Bottom/BottomTip OuterLine -->
                        <Path Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"
                              StrokeThickness="1.0"
                              Data="M 20.5 5.5 L 20.5 6 L 15.5 10.5 L 0 10.5 "/>
                        <!-- Left/Top/TopTip InnerLine -->
                        <Path Stroke="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"
                              StrokeThickness="1.0"
                              Data="M 1.5 9 L 1.5 1.5 L 15.5 1.5 L 19.5 5 L 19.5 5.5 "/>
                        <!-- Bottom/BottomTip InnerLine -->
                        <Path Stroke="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"
                              StrokeThickness="1.0"
                              Data="M 19.5 5.5 L 19.5 6 L 15.5 9.5 L 1 9.5 "/>
                        <!-- Fill Inner Area -->
                        <Path Fill="{TemplateBinding Foreground}"
                              Opacity="0.5"
                              Data="M 2 9 L 2 2 L 15 2 L 19 5.5 L 15 9 "/>
                    </Canvas>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsDragging"
                                 Value="true">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="{x:Type Slider}"
           TargetType="{x:Type Slider}">
        <Setter Property="Stylus.IsPressAndHoldEnabled"
                Value="false"/>
        <Setter Property="Background"
                Value="Transparent"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Slider}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Width="{TemplateBinding Width}">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"
                                               MinHeight="{TemplateBinding Slider.MinHeight}"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <!--
                                 #
                                 # Top TickMark: Will be shown only when Slider.TickPlacement = TopLeft or Both
                                 #
                             -->
                            <TickBar x:Name="TopTick"
                                     Placement="Top"
                                     Fill="{TemplateBinding Foreground}"
                                     Height="4"
                                     Visibility="Collapsed"/>
                            <!--
                                 #
                                 # Slider TrackBackground
                                 #
                                 # Draw Track Background. Usually, the track image is smaller than the size of
                                 # the channel. So, we need to put the background at center of the channel.
                                 #
                             -->
                            <theme:ClassicBorderDecorator Name="TrackBackground"
                                                          Margin="0,0,0,1"
                                                          Height="4"
                                                          Grid.Row="1"
                                                          BorderStyle="Sunken"
                                                          BorderBrush="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"
                                                          BorderThickness="2">
                                <!--
                                     #
                                     # SelectionRangeElement
                                     #
                                 -->
                                <Canvas Margin="-2">
                                    <!--
                                         #
                                         # SelectionRangeElement
                                         #
                                     -->
                                    <Rectangle x:Name="PART_SelectionRange"
                                               Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"
                                               Height="4.0"
                                               Visibility="Hidden"/>
                                </Canvas>
                            </theme:ClassicBorderDecorator>

                            <!--
                                 #
                                 # MainPartsPanel
                                 # ==============
                                 #   This is a panel that hold 2 transparent RepeatButtons and Thumb.
                                 #   This part usually lay on top of the Track background.
                               -->
                            <Track Grid.Row="1"
                                   Name="PART_Track">
                                <Track.DecreaseRepeatButton>
                                    <RepeatButton Style="{StaticResource &#252;}"
                                                  Command="{x:Static Slider.DecreaseLarge}"/>
                                </Track.DecreaseRepeatButton>
                                <Track.IncreaseRepeatButton>
                                    <RepeatButton Style="{StaticResource &#252;}"
                                                  Command="{x:Static Slider.IncreaseLarge}"/>
                                </Track.IncreaseRepeatButton>
                                <Track.Thumb>
                                    <Thumb x:Name="Thumb"
                                           Style="{StaticResource &#253;}"/>
                                </Track.Thumb>
                            </Track>

                            <!--
                                 #
                                 # Bottom TickMark: Will be shown only when Slider.TickPlacement = BottomRight or Both
                                 #
                             -->
                            <TickBar x:Name="BottomTick"
                                     Fill="{TemplateBinding Foreground}"
                                     Placement="Bottom"
                                     Height="4"
                                     Visibility="Collapsed"
                                     Grid.Row="2"/>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <!-- ShowTickMarkBands and Reposition the Track-->
                        <Trigger Property="TickPlacement"
                                 Value="TopLeft">
                            <Setter TargetName="TopTick"
                                    Property="Visibility"
                                    Value="Visible"/>
                            <Setter TargetName="Thumb"
                                    Property="Style"
                                    Value="{StaticResource &#254;}"/>
                            <Setter TargetName="TrackBackground"
                                    Property="Margin"
                                    Value="0,3,0,0"/>
                        </Trigger>
                        <Trigger Property="TickPlacement"
                                 Value="BottomRight">
                            <Setter TargetName="BottomTick"
                                    Property="Visibility"
                                    Value="Visible"/>
                            <Setter TargetName="Thumb"
                                    Property="Style"
                                    Value="{StaticResource &#255;}"/>
                            <Setter TargetName="TrackBackground"
                                    Property="Margin"
                                    Value="0,0,0,3"/>
                        </Trigger>
                        <Trigger Property="TickPlacement"
                                 Value="Both">
                            <Setter TargetName="TopTick"
                                    Property="Visibility"
                                    Value="Visible"/>
                            <Setter TargetName="BottomTick"
                                    Property="Visibility"
                                    Value="Visible"/>
                        </Trigger>
                        <!-- Display SelectionRange background -->
                        <Trigger Property="IsSelectionRangeEnabled"
                                 Value="true">
                            <Setter TargetName="PART_SelectionRange"
                                    Property="Visibility"
                                    Value="Visible"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Orientation"
                     Value="Vertical">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Slider}">
                            <Border Background="{TemplateBinding Background}"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Height="{TemplateBinding Height}">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="Auto"
                                                          MinWidth="{TemplateBinding Slider.MinWidth}"/>
                                        <ColumnDefinition Width="Auto"/>
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="*"/>
                                    </Grid.RowDefinitions>
                                    <!--
                                         #
                                         # Left TickMark: Will be shown only when Slider.TickPlacement = TopLeft or Both
                                         #
                                      -->
                                    <TickBar x:Name="LeftTick"
                                             Placement="Left"
                                             Fill="{TemplateBinding Foreground}"
                                             Width="4"
                                             Visibility="Collapsed"/>
                                    <!--
                                         #
                                         # Slider Track Background
                                         #
                                         # Draw Track Background. Usually, the track image is smaller than the size of
                                         # the channel. So, we need to put the background at center of the channel.
                                         #
                                     -->
                                    <theme:ClassicBorderDecorator Name="TrackBackground"
                                                                  Margin="0,0,1,0"
                                                                  Width="4"
                                                                  Grid.Column="1"
                                                                  BorderStyle="Sunken"
                                                                  BorderBrush="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"
                                                                  BorderThickness="2">
                                        <Canvas Margin="-2">
                                            <!--
                                             #
                                             # SelectionRangeElement
                                             #
                                         -->
                                            <Rectangle x:Name="PART_SelectionRange"
                                                       Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"
                                                       Width="4.0"
                                                       Visibility="Hidden"/>
                                        </Canvas>
                                    </theme:ClassicBorderDecorator>

                                    <!--
                                         #
                                         # MainPartsPanel
                                         # ==============
                                         #   This is a panel that hold 2 transparent RepeatButtons and Thumb.
                                         #   This part usually lay on top of the Track background.
                                     -->
                                    <Track Grid.Column="1"
                                           Name="PART_Track">
                                        <Track.DecreaseRepeatButton>
                                            <RepeatButton Style="{StaticResource &#252;}"
                                                          Command="{x:Static Slider.DecreaseLarge}"/>
                                        </Track.DecreaseRepeatButton>
                                        <Track.IncreaseRepeatButton>
                                            <RepeatButton Style="{StaticResource &#252;}"
                                                          Command="{x:Static Slider.IncreaseLarge}"/>
                                        </Track.IncreaseRepeatButton>
                                        <Track.Thumb>
                                            <Thumb x:Name="Thumb"
                                                   Style="{StaticResource &#256;}"/>
                                        </Track.Thumb>
                                    </Track>

                                    <!--
                                         #
                                         # Right TickMark: Will be shown only when Slider.TickPlacement = BottomRight or Both
                                         #
                                     -->
                                    <TickBar x:Name="RightTick"
                                             Fill="{TemplateBinding Foreground}"
                                             Placement="Right"
                                             Width="4"
                                             Visibility="Collapsed"
                                             Grid.Column="2"
                                             Grid.RowSpan="3"/>
                                </Grid>
                            </Border>
                            <ControlTemplate.Triggers>
                                <!-- ShowTickMarkBands and Reposition the Track-->
                                <Trigger Property="TickPlacement"
                                         Value="TopLeft">
                                    <Setter TargetName="LeftTick"
                                            Property="Visibility"
                                            Value="Visible"/>
                                    <Setter TargetName="Thumb"
                                            Property="Style"
                                            Value="{StaticResource &#257;}"/>
                                    <Setter TargetName="TrackBackground"
                                            Property="Margin"
                                            Value="3,0,0,0"/>
                                </Trigger>
                                <Trigger Property="TickPlacement"
                                         Value="BottomRight">
                                    <Setter TargetName="RightTick"
                                            Property="Visibility"
                                            Value="Visible"/>
                                    <Setter TargetName="Thumb"
                                            Property="Style"
                                            Value="{StaticResource &#258;}"/>
                                    <Setter TargetName="TrackBackground"
                                            Property="Margin"
                                            Value="0,0,3,0"/>
                                </Trigger>
                                <Trigger Property="TickPlacement"
                                         Value="Both">
                                    <Setter TargetName="LeftTick"
                                            Property="Visibility"
                                            Value="Visible"/>
                                    <Setter TargetName="RightTick"
                                            Property="Visibility"
                                            Value="Visible"/>
                                </Trigger>
                                <!-- Display SelectionRange background -->
                                <Trigger Property="IsSelectionRangeEnabled"
                                         Value="true">
                                    <Setter TargetName="PART_SelectionRange"
                                            Property="Visibility"
                                            Value="Visible"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>
    <!-- End HorizontalSlider & VerticalSlider Style -->
 

 

    <!--=================================================================
        StatusBar
    ==================================================================-->
    <Style x:Key="{x:Type StatusBar}"
           TargetType="{x:Type StatusBar}">
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="FontFamily"
                Value="{DynamicResource {x:Static SystemFonts.StatusFontFamilyKey}}"/>
        <Setter Property="FontSize"
                Value="{DynamicResource {x:Static SystemFonts.StatusFontSizeKey}}"/>
        <Setter Property="FontStyle"
                Value="{DynamicResource {x:Static SystemFonts.StatusFontStyleKey}}"/>
        <Setter Property="FontWeight"
                Value="{DynamicResource {x:Static SystemFonts.StatusFontWeightKey}}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type StatusBar}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            SnapsToDevicePixels="true">
                        <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="{x:Static StatusBar.SeparatorStyleKey}"
           TargetType="{x:Type Separator}">
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"/>
        <Setter Property="MinWidth"
                Value="1"/>
        <Setter Property="MinHeight"
                Value="1"/>
        <Setter Property="Margin"
                Value="2"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Separator}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            SnapsToDevicePixels="true"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="{x:Type StatusBarItem}"
           TargetType="{x:Type StatusBarItem}">
        <Setter Property="Padding"
                Value="3"/>
        <Setter Property="Background"
                Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment"
                Value="Left"/>
        <Setter Property="VerticalContentAlignment"
                Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type StatusBarItem}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            SnapsToDevicePixels="true">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 


     <!--=================================================================
        TabControl
    ==================================================================-->
    <Style x:Key="{x:Type TabControl}"
           TargetType="{x:Type TabControl}">
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
        <Setter Property="BorderBrush"
                Value="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"/>
        <Setter Property="BorderThickness"
                Value="3"/>
        <Setter Property="Margin"
                Value="0"/>
        <Setter Property="Padding"
                Value="1"/>
        <Setter Property="MinWidth"
                Value="10"/>
        <Setter Property="MinHeight"
                Value="10"/>
        <Setter Property="HorizontalContentAlignment"
                Value="Center"/>
        <Setter Property="VerticalContentAlignment"
                Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <Grid KeyboardNavigation.TabNavigation="Local"
                          SnapsToDevicePixels="true"
                          ClipToBounds="true">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition x:Name="ColumnDefinition0"/>
                            <ColumnDefinition x:Name="ColumnDefinition1"
                                              Width="0"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition x:Name="RowDefinition0"
                                           Height="Auto"/>
                            <RowDefinition x:Name="RowDefinition1"
                                           Height="*"/>
                        </Grid.RowDefinitions>
                        <TabPanel x:Name="HeaderPanel"
                                  Panel.ZIndex ="1"
                                  KeyboardNavigation.TabIndex="1"
                                  Grid.Column="0"
                                  Grid.Row="0"
                                  Margin="2,2,2,0"
                                  IsItemsHost="true"
                                  Background="Transparent"/>
                        <Grid x:Name="ContentPanel"
                              KeyboardNavigation.TabNavigation="Local"
                              KeyboardNavigation.DirectionalNavigation="Contained"
                              KeyboardNavigation.TabIndex="2"
                              Grid.Column="0"
                              Grid.Row="1">
                            <theme:ClassicBorderDecorator BorderStyle="Raised"
                                                          Background="{TemplateBinding Background}"
                                                          BorderThickness="{TemplateBinding BorderThickness}"
                                                          BorderBrush="{TemplateBinding BorderBrush}">
                                <ContentPresenter x:Name="PART_SelectedContentHost"
                                                  SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                  Margin="2,2,2,2"
                                                  ContentSource="SelectedContent"/>
                            </theme:ClassicBorderDecorator>
                        </Grid>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="TabStripPlacement"
                                 Value="Bottom">
                            <Setter Property="Grid.Row"
                                    Value="1"
                                    TargetName="HeaderPanel"/>
                            <Setter Property="Grid.Row"
                                    Value="0"
                                    TargetName="ContentPanel"/>
                            <Setter Property="Height"
                                    Value="*"
                                    TargetName="RowDefinition0"/>
                            <Setter Property="Height"
                                    Value="Auto"
                                    TargetName="RowDefinition1"/>
                            <Setter Property="Margin"
                                    Value="2,0,2,2"
                                    TargetName="HeaderPanel"/>
                        </Trigger>
                        <Trigger Property="TabStripPlacement"
                                 Value="Left">
                            <Setter Property="Grid.Row"
                                    Value="0"
                                    TargetName="HeaderPanel"/>
                            <Setter Property="Grid.Row"
                                    Value="0"
                                    TargetName="ContentPanel"/>
                            <Setter Property="Grid.Column"
                                    Value="0"
                                    TargetName="HeaderPanel"/>
                            <Setter Property="Grid.Column"
                                    Value="1"
                                    TargetName="ContentPanel"/>
                            <Setter Property="Width"
                                    Value="Auto"
                                    TargetName="ColumnDefinition0"/>
                            <Setter Property="Width"
                                    Value="*"
                                    TargetName="ColumnDefinition1"/>
                            <Setter Property="Height"
                                    Value="*"
                                    TargetName="RowDefinition0"/>
                            <Setter Property="Height"
                                    Value="0"
                                    TargetName="RowDefinition1"/>
                            <Setter Property="Margin"
                                    Value="2,2,0,2"
                                    TargetName="HeaderPanel"/>
                        </Trigger>
                        <Trigger Property="TabStripPlacement"
                                 Value="Right">
                            <Setter Property="Grid.Row"
                                    Value="0"
                                    TargetName="HeaderPanel"/>
                            <Setter Property="Grid.Row"
                                    Value="0"
                                    TargetName="ContentPanel"/>
                            <Setter Property="Grid.Column"
                                    Value="1"
                                    TargetName="HeaderPanel"/>
                            <Setter Property="Grid.Column"
                                    Value="0"
                                    TargetName="ContentPanel"/>
                            <Setter Property="Width"
                                    Value="*"
                                    TargetName="ColumnDefinition0"/>
                            <Setter Property="Width"
                                    Value="Auto"
                                    TargetName="ColumnDefinition1"/>
                            <Setter Property="Height"
                                    Value="*"
                                    TargetName="RowDefinition0"/>
                            <Setter Property="Height"
                                    Value="0"
                                    TargetName="RowDefinition1"/>
                            <Setter Property="Margin"
                                    Value="0,2,2,2"
                                    TargetName="HeaderPanel"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 


    <Style x:Key="&#259;">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle Margin="4,4,4,2"
                               StrokeThickness="1"
                               Stroke="Black"
                               StrokeDashArray="1 2"
                               SnapsToDevicePixels="true"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 
   
    <!--=================================================================
        TabItem
    ==================================================================-->
    <Style x:Key="{x:Type TabItem}"
           TargetType="{x:Type TabItem}">
        <Setter Property="FocusVisualStyle"
                Value="{StaticResource &#259;}"/>
        <Setter Property="Padding"
                Value="12,2,12,2"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch"/>
        <Setter Property="VerticalContentAlignment"
                Value="Stretch"/>
        <!--Setter Property="TabStripPlacement" Value="{Binding Path=TabStripPlacement,RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" /-->
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <theme:ClassicBorderDecorator x:Name="ClassicBorder"
                                                  SnapsToDevicePixels="true"
                                                  BorderStyle="TabTop"
                                                  Background="{TemplateBinding Background}"
                                                  BorderBrush="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"
                                                  BorderThickness="2">
                        <ContentPresenter
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                          HorizontalAlignment="{Binding Path=HorizontalContentAlignment,RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
                                          VerticalAlignment="{Binding Path=VerticalContentAlignment,RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
                                          ContentSource="Header"
                                          Margin="{TemplateBinding Padding}"
                                          RecognizesAccessKey="True"/>
                    </theme:ClassicBorderDecorator>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected"
                                 Value="true">
                            <Setter Property="Panel.ZIndex"
                                    Value="1"/>
                        </Trigger>
                        <Trigger Property="TabStripPlacement"
                                 Value="Bottom">
                            <Setter Property="BorderStyle"
                                    Value="TabBottom"
                                    TargetName="ClassicBorder"/>
                        </Trigger>
                        <Trigger Property="TabStripPlacement"
                                 Value="Left">
                            <Setter Property="BorderStyle"
                                    Value="TabLeft"
                                    TargetName="ClassicBorder"/>
                        </Trigger>
                        <Trigger Property="TabStripPlacement"
                                 Value="Right">
                            <Setter Property="BorderStyle"
                                    Value="TabRight"
                                    TargetName="ClassicBorder"/>
                        </Trigger>
                        <MultiTrigger>
                            <!-- Selected and Top -->
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="true"/>
                                <Condition Property="TabStripPlacement"
                                           Value="Top"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Margin"
                                    Value="-2"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <!-- Selected and Bottom -->
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="true"/>
                                <Condition Property="TabStripPlacement"
                                           Value="Bottom"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Margin"
                                    Value="-2"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <!-- Selected and Left -->
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="true"/>
                                <Condition Property="TabStripPlacement"
                                           Value="Left"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Padding"
                                    Value="11,2,14,2"/>
                            <Setter Property="Margin"
                                    Value="-2"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <!-- Selected and Right -->
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="true"/>
                                <Condition Property="TabStripPlacement"
                                           Value="Right"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Padding"
                                    Value="14,2,11,2"/>
                            <Setter Property="Margin"
                                    Value="-2"/>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 

 

    <!--=================================================================
        TextBoxBase
    ==================================================================-->
    <Style x:Key="{x:Type TextBoxBase}"
           TargetType="{x:Type TextBoxBase}">
        <Setter Property="BorderBrush"
                Value="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"/>
        <Setter Property="BorderThickness"
                Value="2"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
        <Setter Property="Padding"
                Value="1"/>
        <Setter Property="KeyboardNavigation.TabNavigation"
                Value="None"/>
        <Setter Property="HorizontalContentAlignment"
                Value="Left"/>
        <Setter Property="FocusVisualStyle"
                Value="{x:Null}"/>
        <Setter Property="AllowDrop"
                Value="true"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBoxBase}">
                    <theme:ClassicBorderDecorator Name="Bd"
                                                  BorderStyle="Sunken"
                                                  Background="{TemplateBinding Background}"
                                                  BorderThickness="{TemplateBinding BorderThickness}"
                                                  BorderBrush="{TemplateBinding BorderBrush}">
                        <ScrollViewer x:Name="PART_ContentHost"/>
                    </theme:ClassicBorderDecorator>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter TargetName="Bd"
                                    Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--=================================================================
        TextBox
    ==================================================================-->
    <Style x:Key="{x:Type TextBox}"
           BasedOn="{StaticResource {x:Type TextBoxBase}}"
           TargetType="{x:Type TextBox}">
    </Style>
    <!--=================================================================
        RichTextBox
    ==================================================================-->
    <Style x:Key="{x:Type RichTextBox}"
           BasedOn="{StaticResource {x:Type TextBoxBase}}"
           TargetType="{x:Type RichTextBox}">
        <Style.Resources>
            <Style x:Key="{x:Type FlowDocument}"
                   TargetType="{x:Type FlowDocument}">
                <Setter Property="OverridesDefaultStyle"
                        Value="true"/>
            </Style>
        </Style.Resources>
        <Setter Property="MinWidth"
                Value="10"/>
    </Style>
    <!--=================================================================
        PasswordBox
    ==================================================================-->
    <Style x:Key="{x:Type PasswordBox}"
           TargetType="{x:Type PasswordBox}">
        <Setter Property="BorderBrush"
                Value="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"/>
        <Setter Property="BorderThickness"
                Value="2"/>
        <Setter Property="FontFamily"
                Value="Times New Roman"/>
        <Setter Property="PasswordChar"
                Value="●"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
        <Setter Property="Padding"
                Value="1"/>
        <Setter Property="KeyboardNavigation.TabNavigation"
                Value="None"/>
        <Setter Property="HorizontalContentAlignment"
                Value="Left"/>
        <Setter Property="FocusVisualStyle"
                Value="{x:Null}"/>
        <Setter Property="AllowDrop"
                Value="true"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type PasswordBox}">
                    <theme:ClassicBorderDecorator Name="Bd"
                                                  BorderStyle="Sunken"
                                                  Background="{TemplateBinding Background}"
                                                  BorderThickness="{TemplateBinding BorderThickness}"
                                                  BorderBrush="{TemplateBinding BorderBrush}"
                                                  SnapsToDevicePixels="true">
                        <ScrollViewer x:Name="PART_ContentHost"
                                      SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </theme:ClassicBorderDecorator>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter TargetName="Bd"
                                    Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 

 

<!--=================================================================
        Thumb
    ==================================================================-->
    <!--
TODO:
    1. Add ThumbMinWidth & ThumbMinHeight to SystemMetrics
       (MinWidth = 2 * cxEdge, MinHeight = 2 * cyEdge)
-->
    <Style x:Key="{x:Type Thumb}"
           TargetType="{x:Type Thumb}">
        <Setter Property="Stylus.IsPressAndHoldEnabled"
                Value="false"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid>
                            <!-- Draw Edge -->
                            <Border BorderThickness="0,0,1,1"
                                    Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
                                    BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"/>
                            <Border BorderThickness="0,0,1,1"
                                    Margin="1"
                                    Background="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"
                                    BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"/>
                            <Border Margin="2"
                                    Background="{TemplateBinding Background}"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

   
    <!--=================================================================
        ToolBar
    ==================================================================-->
    <!-- Common colors for ToolBar controls -->
    <SolidColorBrush x:Key="&#260;"
                     Color="#D4D5D8"/>
    <SolidColorBrush x:Key="&#261;"
                     Color="#B6BDD2"/>
    <SolidColorBrush x:Key="&#262;"
                     Color="#8592B5"/>
    <SolidColorBrush x:Key="&#263;"
                     Color="#D4D0C8"/>
    <SolidColorBrush x:Key="&#264;"
                     Color="#8D8D8D"/>
    <SolidColorBrush x:Key="&#265;"
                     Color="#A6A6A6"/>
    <SolidColorBrush x:Key="&#266;"
                     Color="#B6BDD2"/>
    <SolidColorBrush x:Key="&#267;"
                     Color="#0A246A"/>
    <SolidColorBrush x:Key="&#268;"
                     Color="#D4D5D8"/>
    <SolidColorBrush x:Key="&#269;"
                     Color="#8592B5"/>
    <SolidColorBrush x:Key="&#270;"
                     Color="#0A246A"/>
    <SolidColorBrush x:Key="&#271;"
                     Color="#666666"/>
    <SolidColorBrush x:Key="&#272;"
                     Color="#F9F8F7"/>
    <SolidColorBrush x:Key="&#273;"
                     Color="#D4D5D8"/>
    <LinearGradientBrush x:Key="&#274;"
                         StartPoint="0,0"
                         EndPoint="0,1">
        <LinearGradientBrush.GradientStops>
            <GradientStop Color="#F9F7F6"
                          Offset="0"/>
            <GradientStop Color="#EDEBE8"
                          Offset="1"/>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="&#275;"
                         StartPoint="0,0"
                         EndPoint="688,0"
                         MappingMode="Absolute">
        <LinearGradientBrush.GradientStops>
            <GradientStop Color="#D4D0C8"
                          Offset="0"/>
            <GradientStop Color="#F5F5F4"
                          Offset="1"/>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="&#276;"
                         StartPoint="0,0"
                         EndPoint="0,1">
        <LinearGradientBrush.GradientStops>
            <GradientStop Color="#E2E0DB"
                          Offset="0"/>
            <GradientStop Color="#EAE8E4"
                          Offset="0.5"/>
            <GradientStop Color="#D5D2CA"
                          Offset="0.9"/>
            <GradientStop Color="#DBD8D1"
                          Offset="1"/>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="&#277;"
                         StartPoint="0,0"
                         EndPoint="1,0">
        <LinearGradientBrush.GradientStops>
            <GradientStop Color="#E2E0DB"
                          Offset="0"/>
            <GradientStop Color="#EAE8E4"
                          Offset="0.5"/>
            <GradientStop Color="#D5D2CA"
                          Offset="0.9"/>
            <GradientStop Color="#DBD8D1"
                          Offset="1"/>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="&#278;"
                     Color="#A0A0A0"/>
    <LinearGradientBrush x:Key="&#279;"
                         StartPoint="0,0"
                         EndPoint="0,1">
        <LinearGradientBrush.GradientStops>
            <GradientStop Color="#E6E6E6"
                          Offset="0"/>
            <GradientStop Color="#D2D2D2"
                          Offset="0.5"/>
            <GradientStop Color="#808080"
                          Offset="1"/>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="&#280;"
                         StartPoint="0,0"
                         EndPoint="1,0">
        <LinearGradientBrush.GradientStops>
            <GradientStop Color="#E6E6E6"
                          Offset="0"/>
            <GradientStop Color="#D2D2D2"
                          Offset="0.5"/>
            <GradientStop Color="#808080"
                          Offset="1"/>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>


    <Geometry x:Key="&#281;"> M 0,2.5 L 2.5,5 L 7,0.5</Geometry>

    <Style x:Key="{x:Static ToolBar.SeparatorStyleKey}"
           TargetType="{x:Type Separator}">
        <Setter Property="Background"
                Value="{StaticResource &#265;}"/>
        <Setter Property="MinWidth"
                Value="1"/>
        <Setter Property="MinHeight"
                Value="1"/>
        <Setter Property="Margin"
                Value="2,2,2,2"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Separator}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            SnapsToDevicePixels="true"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="{x:Static ToolBar.ButtonStyleKey}"
           TargetType="{x:Type Button}">
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="Padding"
                Value="2"/>
        <Setter Property="BorderThickness"
                Value="1"/>
        <Setter Property="Background"
                Value="Transparent"/>
        <Setter Property="BorderBrush"
                Value="Transparent"/>
        <Setter Property="HorizontalAlignment"
                Value="Center"/>
        <Setter Property="VerticalAlignment"
                Value="Center"/>
        <Setter Property="HorizontalContentAlignment"
                Value="Center"/>
        <Setter Property="VerticalContentAlignment"
                Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border Name="Bd"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            SnapsToDevicePixels="true">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter TargetName="Bd"
                                    Property="BorderBrush"
                                    Value="{StaticResource &#267;}"/>
                            <Setter TargetName="Bd"
                                    Property="Background"
                                    Value="{StaticResource &#266;}"/>
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused"
                                 Value="true">
                            <Setter TargetName="Bd"
                                    Property="BorderBrush"
                                    Value="{StaticResource &#267;}"/>
                            <Setter TargetName="Bd"
                                    Property="Background"
                                    Value="{StaticResource &#266;}"/>
                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter TargetName="Bd"
                                    Property="BorderBrush"
                                    Value="{StaticResource &#270;}"/>
                            <Setter TargetName="Bd"
                                    Property="Background"
                                    Value="{StaticResource &#269;}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="{x:Static ToolBar.ToggleButtonStyleKey}"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="Padding"
                Value="2"/>
        <Setter Property="BorderThickness"
                Value="1"/>
        <Setter Property="Background"
                Value="Transparent"/>
        <Setter Property="BorderBrush"
                Value="Transparent"/>
        <Setter Property="HorizontalAlignment"
                Value="Center"/>
        <Setter Property="VerticalAlignment"
                Value="Center"/>
        <Setter Property="HorizontalContentAlignment"
                Value="Center"/>
        <Setter Property="VerticalContentAlignment"
                Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            SnapsToDevicePixels="true">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked"
                                 Value="true">
                            <Setter Property="BorderBrush"
                                    Value="{StaticResource &#267;}"/>
                            <Setter Property="Background"
                                    Value="{StaticResource &#268;}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter Property="BorderBrush"
                                    Value="{StaticResource &#267;}"/>
                            <Setter Property="Background"
                                    Value="{StaticResource &#266;}"/>
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused"
                                 Value="true">
                            <Setter Property="BorderBrush"
                                    Value="{StaticResource &#267;}"/>
                            <Setter Property="Background"
                                    Value="{StaticResource &#266;}"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver"
                                           Value="true"/>
                                <Condition Property="IsChecked"
                                           Value="true"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="BorderBrush"
                                    Value="{StaticResource &#270;}"/>
                            <Setter Property="Background"
                                    Value="{StaticResource &#269;}"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsKeyboardFocused"
                                           Value="true"/>
                                <Condition Property="IsChecked"
                                           Value="true"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="BorderBrush"
                                    Value="{StaticResource &#270;}"/>
                            <Setter Property="Background"
                                    Value="{StaticResource &#269;}"/>
                        </MultiTrigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter Property="BorderBrush"
                                    Value="{StaticResource &#270;}"/>
                            <Setter Property="Background"
                                    Value="{StaticResource &#269;}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="{x:Static ToolBar.CheckBoxStyleKey}"
           BasedOn="{StaticResource {x:Static ToolBar.ToggleButtonStyleKey}}"
           TargetType="{x:Type CheckBox}"/>
    <Style x:Key="{x:Static ToolBar.RadioButtonStyleKey}"
           BasedOn="{StaticResource {x:Static ToolBar.ToggleButtonStyleKey}}"
           TargetType="{x:Type RadioButton}"/>


    <Style x:Key="&#282;"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="MinWidth"
                Value="0"/>
        <Setter Property="MinHeight"
                Value="0"/>
        <Setter Property="Width"
                Value="Auto"/>
        <Setter Property="Background"
                Value="Transparent"/>
        <Setter Property="Focusable"
                Value="false"/>
        <Setter Property="ClickMode"
                Value="Press"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Grid Background="Transparent">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"
                                              SharedSizeGroup="ComboBoxButton"/>
                        </Grid.ColumnDefinitions>
                        <Border x:Name="Chrome"
                                Grid.Column="1"
                                Width="13"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                SnapsToDevicePixels="true">
                            <Path x:Name="ArrowDownPath"
                                  Data="M 2.5 0 L 8.5 0 L 5.5 3 Z"
                                  Fill="black"
                                  VerticalAlignment="Center"/>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter TargetName="Chrome"
                                    Property="BorderBrush"
                                    Value="{x:Null}"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver"
                                           Value="true"/>
                                <Condition Property="IsChecked"
                                           Value="false"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Chrome"
                                    Property="Background"
                                    Value="{StaticResource &#266;}"/>
                        </MultiTrigger>
                        <Trigger Property="IsChecked"
                                 Value="true">
                            <Setter TargetName="Chrome"
                                    Property="BorderBrush"
                                    Value="{StaticResource &#270;}"/>
                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter TargetName="Chrome"
                                    Property="Background"
                                    Value="{StaticResource &#269;}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter TargetName="ArrowDownPath"
                                    Property="Fill"
                                    Value="{StaticResource &#264;}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="{x:Static ToolBar.ComboBoxStyleKey}"
           TargetType="{x:Type ComboBox}">
        <Setter Property="FocusVisualStyle"
                Value="{x:Null}"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
        <Setter Property="BorderBrush"
                Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
        <Setter Property="BorderThickness"
                Value="1"/>
        <Setter Property="Margin"
                Value="1,0"/>
        <Setter Property="Padding"
                Value="0"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility"
                Value="Auto"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility"
                Value="Auto"/>
        <Setter Property="ScrollViewer.CanContentScroll"
                Value="true"/>
        <Setter Property="HorizontalAlignment"
                Value="Center"/>
        <Setter Property="VerticalAlignment"
                Value="Center"/>
        <Setter Property="MinHeight"
                Value="18"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBox}">
                    <Grid SnapsToDevicePixels="true">
                        <Grid Grid.IsSharedSizeScope="true">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"
                                                  SharedSizeGroup="ComboBoxButton"/>
                            </Grid.ColumnDefinitions>
                            <Border Name="Background"
                                    Background="{TemplateBinding Background}"/>
                            <Border Name="SelectedContentBorder"
                                    Margin="2,2,1,2">
                                <ContentPresenter x:Name="ContentSite"
                                                  Content="{TemplateBinding SelectionBoxItem}"
                                                  ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                                                  ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                                                  Margin="{TemplateBinding Padding}"
                                                  VerticalAlignment="Center"
                                                  SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                            </Border>
                            <Border Name="Border"
                                    Grid.ColumnSpan="2"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    BorderBrush="{TemplateBinding BorderBrush}"/>
                            <ToggleButton BorderBrush="white"
                                          BorderThickness="1"
                                          x:Name="DropDownButton"
                                          Grid.ColumnSpan="2"
                                          Style="{StaticResource &#282;}"
                                          IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"/>
                            <TextBox Padding="{TemplateBinding Padding}"
                                     Margin="1,1,0,1"
                                     MinHeight="18"
                                     x:Name="PART_EditableTextBox"
                                     Style="{StaticResource &#211;}"
                                     Visibility="Collapsed"
                                     IsReadOnly="{Binding Path=IsReadOnly,RelativeSource={RelativeSource TemplatedParent}}"
                                     VerticalAlignment="Center"/>
                        </Grid>
                        <Popup Name="PART_Popup"
                               AllowsTransparency="true"
                               Placement="Bottom"
                               IsOpen="{Binding Path=IsDropDownOpen,RelativeSource={RelativeSource TemplatedParent}}"
                               Focusable="false"
                               PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                            <theme:SystemDropShadowChrome Name="Shdw"
                                                          Color="Transparent"
                                                          MinWidth="{TemplateBinding ActualWidth}"
                                                          MaxHeight="{TemplateBinding MaxDropDownHeight}">
                                <Border x:Name="DropDownBorder"
                                        Background="{TemplateBinding Background}"
                                        BorderThickness="1"
                                        BorderBrush="{StaticResource &#271;}">
                                    <ScrollViewer>
                                        <ItemsPresenter KeyboardNavigation.DirectionalNavigation="Contained"/>
                                    </ScrollViewer>
                                </Border>
                            </theme:SystemDropShadowChrome>
                        </Popup>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                            <Setter TargetName="Background"
                                    Property="Background"
                                    Value="{StaticResource &#263;}"/>
                            <Setter TargetName="Background"
                                    Property="Grid.ColumnSpan"
                                    Value="2"/>
                            <Setter TargetName="Border"
                                    Property="BorderBrush"
                                    Value="{StaticResource &#264;}"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsKeyboardFocusWithin"
                                           Value="true"/>
                                <Condition Property="IsDropDownOpen"
                                           Value="false"/>
                                <Condition Property="IsEditable"
                                           Value="false"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="SelectedContentBorder"
                                    Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                        </MultiTrigger>
                        <Trigger Property="IsEditable"
                                 Value="true">
                            <!-- For editable ComboBox we want to step directly on TextBox and skip ComboBox itself -->
                            <Setter TargetName="DropDownButton"
                                    Property="Background"
                                    Value="{x:Null}"/>
                            <Setter TargetName="ContentSite"
                                    Property="Visibility"
                                    Value="Collapsed"/>
                            <Setter TargetName="PART_EditableTextBox"
                                    Property="Visibility"
                                    Value="Visible"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter TargetName="DropDownButton"
                                    Property="BorderBrush"
                                    Value="{StaticResource &#267;}"/>
                            <Setter TargetName="DropDownButton"
                                    Property="Background"
                                    Value="{StaticResource &#266;}"/>
                            <Setter TargetName="Border"
                                    Property="BorderBrush"
                                    Value="{StaticResource &#267;}"/>
                        </Trigger>
                        <Trigger Property="IsKeyboardFocusWithin"
                                 Value="true">
                            <Setter TargetName="DropDownButton"
                                    Property="BorderBrush"
                                    Value="{StaticResource &#267;}"/>
                            <Setter TargetName="DropDownButton"
                                    Property="Background"
                                    Value="{StaticResource &#266;}"/>
                            <Setter TargetName="Border"
                                    Property="BorderBrush"
                                    Value="{StaticResource &#267;}"/>
                        </Trigger>
                        <Trigger SourceName="PART_Popup"
                                 Property="Popup.HasDropShadow"
                                 Value="true">
                            <Setter TargetName="Shdw"
                                    Property="Margin"
                                    Value="0,0,5,5"/>
                            <Setter TargetName="Shdw"
                                    Property="SnapsToDevicePixels"
                                    Value="true"/>
                            <Setter TargetName="Shdw"
                                    Property="Color"
                                    Value="#71000000"/>
                        </Trigger>
                        <Trigger Property="HasItems"
                                 Value="false">
                            <!-- Set minimum height for empty drop down -->
                            <Setter TargetName="DropDownBorder"
                                    Property="MinHeight"
                                    Value="95"/>
                        </Trigger>
                        <Trigger Property="IsGrouping"
                                 Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll"
                                    Value="false"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsKeyboardFocusWithin"
                                           Value="true"/>
                                <Condition Property="IsDropDownOpen"
                                           Value="false"/>
                                <Condition Property="IsEditable"
                                           Value="false"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                        </MultiTrigger>
                        <Trigger Property="IsEditable"
                                 Value="true">
                            <Setter Property="Padding"
                                    Value="2"/>
                            <Setter Property="IsTabStop"
                                    Value="false"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style x:Key="{x:Static ToolBar.TextBoxStyleKey}"
           TargetType="{x:Type TextBox}">
        <Setter Property="FocusVisualStyle"
                Value="{x:Null}"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
        <Setter Property="BorderBrush"
                Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
        <Setter Property="BorderThickness"
                Value="1"/>
        <Setter Property="Margin"
                Value="1,0"/>
        <Setter Property="Padding"
                Value="2"/>
        <Setter Property="HorizontalAlignment"
                Value="Center"/>
        <Setter Property="VerticalAlignment"
                Value="Center"/>
        <Setter Property="MinHeight"
                Value="18"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBox}">
                    <Border Name="Border"
                            Background="{TemplateBinding Background}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            SnapsToDevicePixels="true">
                        <ScrollViewer x:Name="PART_ContentHost"
                                      VerticalAlignment="Center"
                                      MinHeight="18"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                            <Setter TargetName="Border"
                                    Property="Background"
                                    Value="{StaticResource &#263;}"/>
                            <Setter TargetName="Border"
                                    Property="BorderBrush"
                                    Value="{StaticResource &#264;}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter TargetName="Border"
                                    Property="BorderBrush"
                                    Value="{StaticResource &#267;}"/>
                        </Trigger>
                        <Trigger Property="IsKeyboardFocusWithin"
                                 Value="true">
                            <Setter TargetName="Border"
                                    Property="BorderBrush"
                                    Value="{StaticResource &#267;}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style x:Key="{x:Static ToolBar.MenuStyleKey}"
           TargetType="{x:Type Menu}">
        <Setter Property="FontFamily"
                Value="{DynamicResource {x:Static SystemFonts.MenuFontFamilyKey}}"/>
        <Setter Property="FontSize"
                Value="{DynamicResource {x:Static SystemFonts.MenuFontSizeKey}}"/>
        <Setter Property="FontStyle"
                Value="{DynamicResource {x:Static SystemFonts.MenuFontStyleKey}}"/>
        <Setter Property="FontWeight"
                Value="{DynamicResource {x:Static SystemFonts.MenuFontWeightKey}}"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}"/>
        <Setter Property="VerticalContentAlignment"
                Value="Center"/>
        <Setter Property="KeyboardNavigation.TabNavigation"
                Value="Continue"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Menu}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            SnapsToDevicePixels="true">
                        <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Resources>
            <Style x:Key="{x:Static MenuItem.SeparatorStyleKey}" TargetType="{x:Type Separator}">
                <Setter Property="OverridesDefaultStyle"
                        Value="true" />
                <Setter Property="Background"
                        Value="{StaticResource &#265;}" />
                <Setter Property="Height" Value="1" />
                <Setter Property="Margin" Value="0,1,0,0" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Separator}">
                            <Grid SnapsToDevicePixels="true">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition MinWidth="24" Width="Auto" SharedSizeGroup="MenuItemIconColumnGroup" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Border Grid.Column="1" Margin="8,0,0,0" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Key="{x:Type MenuItem}"
                   TargetType="{x:Type MenuItem}">
                <Setter Property="OverridesDefaultStyle"
                        Value="true" />
                <Setter Property="HorizontalContentAlignment"
                        Value="{Binding Path=HorizontalContentAlignment,RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
                <Setter Property="VerticalContentAlignment"
                        Value="{Binding Path=VerticalContentAlignment,RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
                <Setter Property="Background"
                        Value="Transparent"/>
                <Setter Property="Foreground"
                        Value="{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}"/>
                <Setter Property="BorderThickness"
                        Value="1"/>
                <Setter Property="Margin"
                        Value="0,1,0,0"/>
                <Setter Property="Padding"
                        Value="8,3,8,3"/>
                <Setter Property="DockPanel.Dock"
                        Value="Top"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <!-- SubmenuItem Template -->
                        <ControlTemplate TargetType="{x:Type MenuItem}">
                            <Grid Background="Transparent"
                                  SnapsToDevicePixels="true">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition MinWidth="24"
                                                      Width="Auto"
                                                      SharedSizeGroup="MenuItemIconColumnGroup"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"
                                                      SharedSizeGroup="MenuItemIGTColumnGroup"/>
                                    <ColumnDefinition Width="14"/>
                                </Grid.ColumnDefinitions>
                                <Border Name="Border"
                                        Background="{TemplateBinding Background}"
                                        BorderThickness="{TemplateBinding BorderThickness}"
                                        BorderBrush="{TemplateBinding BorderBrush}"
                                        Grid.ColumnSpan="4"
                                        Margin="1,0"/>
                                <!-- Glyph -->
                                <ContentPresenter x:Name="Icon"
                                                  Margin="0"
                                                  VerticalAlignment="Center"
                                                  ContentSource="Icon"
                                                  SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                <Border Name="GlyphPanel"
                                        Margin="0,1"
                                        Width="20"
                                        Height="20"
                                        Visibility="Hidden"
                                        BorderBrush="{StaticResource &#267;}"
                                        Background="{StaticResource &#273;}"
                                        BorderThickness="1">
                                    <Path VerticalAlignment="Center"
                                          HorizontalAlignment="Center"
                                          FlowDirection="LeftToRight"
                                          Stroke="{TemplateBinding Foreground}"
                                          StrokeThickness="1.2"
                                          Data="{StaticResource &#281;}"/>
                                </Border>

                                <ContentPresenter Grid.Column="1"
                                                  ContentSource="Header"
                                                  Margin="{TemplateBinding Padding}"
                                                  RecognizesAccessKey="True"
                                                  SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                <TextBlock Grid.Column="2"
                                           Text="{TemplateBinding InputGestureText}"
                                           Margin="4,3,2,3"
                                           HorizontalAlignment="Right"/>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="Icon"
                                         Value="{x:Null}">
                                    <Setter TargetName="Icon"
                                            Property="Visibility"
                                            Value="Collapsed"/>
                                </Trigger>
                                <Trigger Property="IsChecked"
                                         Value="true">
                                    <Setter TargetName="GlyphPanel"
                                            Property="Visibility"
                                            Value="Visible"/>
                                    <Setter TargetName="Icon"
                                            Property="Visibility"
                                            Value="Collapsed"/>
                                </Trigger>
                                <Trigger Property="IsHighlighted"
                                         Value="true">
                                    <Setter TargetName="Border"
                                            Property="BorderBrush"
                                            Value="{StaticResource &#267;}"/>
                                    <Setter TargetName="Border"
                                            Property="Background"
                                            Value="{StaticResource &#266;}"/>
                                    <Setter TargetName="GlyphPanel"
                                            Property="BorderBrush"
                                            Value="{StaticResource &#270;}"/>
                                    <Setter TargetName="GlyphPanel"
                                            Property="Background"
                                            Value="{StaticResource &#262;}"/>
                                </Trigger>
                                <Trigger Property="IsEnabled"
                                         Value="false">
                                    <Setter Property="Foreground"
                                            Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Style.Triggers>
                    <Trigger Property="Role"
                             Value="TopLevelHeader">
                        <Setter Property="Padding"
                                Value="6,2,7,2"/>
                        <Setter Property="Grid.IsSharedSizeScope"
                                Value="true"/>
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="{x:Type MenuItem}">
                                    <Border Name="Border"
                                            Background="{TemplateBinding Background}"
                                            BorderBrush="{TemplateBinding BorderBrush}"
                                            BorderThickness="1"
                                            SnapsToDevicePixels="true">
                                        <DockPanel Name="Header">
                                            <!-- Glyph -->
                                            <ContentPresenter x:Name="Icon"
                                                              Margin="4,0,6,0"
                                                              VerticalAlignment="Center"
                                                              ContentSource="Icon"
                                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                            <Path x:Name="GlyphPanel"
                                                  Margin="4,0,6,0"
                                                  Visibility="Collapsed"
                                                  VerticalAlignment="Center"
                                                  FlowDirection="LeftToRight"
                                                  Stroke="{TemplateBinding Foreground}"
                                                  StrokeThickness="1.2"
                                                  Data="{StaticResource &#281;}"/>
                                            <!-- Header Content -->
                                            <ContentPresenter ContentSource="Header"
                                                              Margin="{TemplateBinding Padding}"
                                                              RecognizesAccessKey="True"
                                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                            <!-- Submenu Popup -->
                                            <Popup x:Name="PART_Popup"
                                                   Placement="Bottom"
                                                   HorizontalOffset="-1"
                                                   IsOpen="{Binding Path=IsSubmenuOpen,RelativeSource={RelativeSource TemplatedParent}}"
                                                   Focusable="false"
                                                   PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}"
                                                   AllowsTransparency="true">
                                                <theme:SystemDropShadowChrome Name="Shdw"
                                                                              Color="Transparent">
                                                    <Border Background="{StaticResource &#272;}"
                                                            BorderBrush="{StaticResource &#271;}"
                                                            BorderThickness="1">
                                                        <Grid Grid.IsSharedSizeScope="true">
                                                            <Grid.ColumnDefinitions>
                                                                <ColumnDefinition MinWidth="24"
                                                                                  Width="Auto"
                                                                                  SharedSizeGroup="MenuItemIconColumnGroup"/>
                                                                <ColumnDefinition Width="*"/>
                                                            </Grid.ColumnDefinitions>
                                                            <Rectangle Fill="{StaticResource &#277;}"
                                                                       Margin="0,1"/>
                                                            <Rectangle Fill="{StaticResource &#272;}"
                                                                       Grid.ColumnSpan="2"
                                                                       Margin="0,-1,0,0"
                                                                       VerticalAlignment="Top"
                                                                       HorizontalAlignment="Left"
                                                                       Height="1"
                                                                       Width="{Binding ElementName=Header, Path=ActualWidth}" />
                                                            <ScrollViewer CanContentScroll="true"
                                                                          Style="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type FrameworkElement}, ResourceId=MenuScrollViewer}}"
                                                                          Grid.ColumnSpan="2">
                                                                <ItemsPresenter KeyboardNavigation.DirectionalNavigation="Cycle"
                                                                                KeyboardNavigation.TabNavigation="Cycle"
                                                                                Margin="0,0,0,1"
                                                                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                                            </ScrollViewer>
                                                        </Grid>
                                                    </Border>
                                                </theme:SystemDropShadowChrome>
                                            </Popup>
                                        </DockPanel>
                                    </Border>
                                    <ControlTemplate.Triggers>
                                        <Trigger Property="IsSuspendingPopupAnimation"
                                                 Value="true">
                                            <Setter TargetName="PART_Popup"
                                                    Property="PopupAnimation"
                                                    Value="None"/>
                                        </Trigger>
                                        <Trigger Property="Icon"
                                                 Value="{x:Null}">
                                            <Setter TargetName="Icon"
                                                    Property="Visibility"
                                                    Value="Collapsed"/>
                                        </Trigger>
                                        <Trigger Property="IsChecked"
                                                 Value="true">
                                            <Setter TargetName="GlyphPanel"
                                                    Property="Visibility"
                                                    Value="Visible"/>
                                            <Setter TargetName="Icon"
                                                    Property="Visibility"
                                                    Value="Collapsed"/>
                                        </Trigger>
                                        <Trigger Property="IsHighlighted"
                                                 Value="true">
                                            <Setter TargetName="Border"
                                                    Property="BorderBrush"
                                                    Value="{StaticResource &#267;}"/>
                                            <Setter TargetName="Border"
                                                    Property="Background"
                                                    Value="{StaticResource &#266;}"/>
                                        </Trigger>
                                        <Trigger Property="IsSubmenuOpen"
                                                 Value="true">
                                            <Setter TargetName="Border"
                                                    Property="BorderBrush"
                                                    Value="{StaticResource &#271;}"/>
                                            <Setter TargetName="Border"
                                                    Property="Background"
                                                    Value="{StaticResource &#274;}"/>
                                        </Trigger>
                                        <Trigger SourceName="PART_Popup"
                                                  Property="Popup.HasDropShadow"
                                                  Value="true">
                                             <Setter TargetName="Shdw"
                                                     Property="Margin"
                                                     Value="0,0,5,5"/>
                                             <Setter TargetName="Shdw"
                                                     Property="SnapsToDevicePixels"
                                                     Value="true"/>
                                             <Setter TargetName="Shdw"
                                                     Property="Color"
                                                     Value="#71000000"/>
                                         </Trigger>
                                        <Trigger Property="IsEnabled"
                                                 Value="false">
                                            <Setter Property="Foreground"
                                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                                        </Trigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Trigger>
                    <Trigger Property="Role"
                             Value="TopLevelItem">
                        <Setter Property="Margin"
                                Value="0,1,0,1"/>
                        <Setter Property="Padding"
                                Value="7,1,8,2"/>
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="{x:Type MenuItem}">
                                    <Border Name="Border"
                                            Background="{TemplateBinding Background}"
                                            BorderBrush="{TemplateBinding BorderBrush}"
                                            BorderThickness="1"
                                            SnapsToDevicePixels="true">
                                        <DockPanel>
                                            <!-- Glyph -->
                                            <ContentPresenter x:Name="Icon"
                                                              Margin="4,0,6,0"
                                                              VerticalAlignment="Center"
                                                              ContentSource="Icon"
                                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                            <Path x:Name="GlyphPanel"
                                                  Margin="4,0,6,0"
                                                  Visibility="Collapsed"
                                                  VerticalAlignment="Center"
                                                  FlowDirection="LeftToRight"
                                                  Stroke="{TemplateBinding Foreground}"
                                                  StrokeThickness="1.2"
                                                  Data="{StaticResource &#281;}"/>
                                            <!-- Header Content -->
                                            <ContentPresenter ContentSource="Header"
                                                              Margin="{TemplateBinding Padding}"
                                                              RecognizesAccessKey="True"
                                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                        </DockPanel>
                                    </Border>
                                    <ControlTemplate.Triggers>
                                        <Trigger Property="Icon"
                                                 Value="{x:Null}">
                                            <Setter TargetName="Icon"
                                                    Property="Visibility"
                                                    Value="Collapsed"/>
                                        </Trigger>
                                        <Trigger Property="IsChecked"
                                                 Value="true">
                                            <Setter TargetName="GlyphPanel"
                                                    Property="Visibility"
                                                    Value="Visible"/>
                                            <Setter TargetName="Icon"
                                                    Property="Visibility"
                                                    Value="Collapsed"/>
                                        </Trigger>
                                        <Trigger Property="IsHighlighted"
                                                 Value="true">
                                            <Setter TargetName="Border"
                                                    Property="BorderBrush"
                                                    Value="{StaticResource &#267;}"/>
                                            <Setter TargetName="Border"
                                                    Property="Background"
                                                    Value="{StaticResource &#266;}"/>
                                        </Trigger>
                                        <Trigger Property="IsEnabled"
                                                 Value="false">
                                            <Setter Property="Foreground"
                                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                                        </Trigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Trigger>
                    <Trigger Property="Role"
                             Value="SubmenuHeader">
                        <Setter Property="DockPanel.Dock"
                                Value="Top"/>
                        <Setter Property="Padding"
                                Value="8,3,8,3"/>
                        <Setter Property="Grid.IsSharedSizeScope"
                                Value="true"/>
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="{x:Type MenuItem}">
                                    <Grid Background="Transparent"
                                          SnapsToDevicePixels="true">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition MinWidth="24"
                                                              Width="Auto"
                                                              SharedSizeGroup="MenuItemIconColumnGroup"/>
                                            <ColumnDefinition Width="*"/>
                                            <ColumnDefinition Width="Auto"
                                                              SharedSizeGroup="MenuItemIGTColumnGroup"/>
                                            <ColumnDefinition Width="14"/>
                                        </Grid.ColumnDefinitions>
                                        <Border Name="Border"
                                                Background="{TemplateBinding Background}"
                                                BorderThickness="{TemplateBinding BorderThickness}"
                                                BorderBrush="{TemplateBinding BorderBrush}"
                                                Grid.ColumnSpan="4"
                                                Margin="1,0"/>
                                        <!-- Glyph -->
                                        <ContentPresenter x:Name="Icon"
                                                          Margin="3"
                                                          VerticalAlignment="Center"
                                                          ContentSource="Icon"
                                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                        <Border Name="GlyphPanel"
                                                Margin="0,1"
                                                Width="20"
                                                Height="20"
                                                Visibility="Hidden"
                                                BorderBrush="{StaticResource &#267;}"
                                                Background="{StaticResource &#273;}"
                                                BorderThickness="1">
                                            <Path VerticalAlignment="Center"
                                                  HorizontalAlignment="Center"
                                                  FlowDirection="LeftToRight"
                                                  Stroke="{TemplateBinding Foreground}"
                                                  StrokeThickness="1.2"
                                                  Data="{StaticResource &#281;}"/>
                                        </Border>
                                        <ContentPresenter Grid.Column="1"
                                                          ContentSource="Header"
                                                          Margin="{TemplateBinding Padding}"
                                                          RecognizesAccessKey="True"
                                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                        <Path Grid.Column="3"
                                              DockPanel.Dock="Right"
                                              VerticalAlignment="Center"
                                              Margin="4,0,6,0"
                                              Fill="{TemplateBinding Foreground}"
                                              Data="{StaticResource &#234;}"/>
                                        <Popup x:Name="PART_Popup"
                                               Placement="Right"
                                               IsOpen="{Binding Path=IsSubmenuOpen,RelativeSource={RelativeSource TemplatedParent}}"
                                               Focusable="false"
                                               PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}"
                                               AllowsTransparency="true">
                                            <theme:SystemDropShadowChrome Name="Shdw"
                                                                          Color="Transparent">
                                                <Border Background="{StaticResource &#272;}"
                                                        BorderBrush="{StaticResource &#271;}"
                                                        BorderThickness="1"
                                                        Grid.IsSharedSizeScope="true">
                                                    <Grid>
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition MinWidth="24"
                                                                              Width="Auto"
                                                                              SharedSizeGroup="MenuItemIconColumnGroup"/>
                                                            <ColumnDefinition Width="*"/>
                                                        </Grid.ColumnDefinitions>
                                                        <Rectangle Fill="{StaticResource &#277;}"
                                                                   Margin="0,1"/>
                                                        <ScrollViewer CanContentScroll="true"
                                                                      Style="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type FrameworkElement}, ResourceId=MenuScrollViewer}}"
                                                                      Grid.ColumnSpan="2">
                                                            <ItemsPresenter KeyboardNavigation.DirectionalNavigation="Cycle"
                                                                            KeyboardNavigation.TabNavigation="Cycle"
                                                                            Margin="0,0,0,1"
                                                                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                                        </ScrollViewer>
                                                    </Grid>
                                                </Border>
                                            </theme:SystemDropShadowChrome>
                                        </Popup>
                                    </Grid>
                                    <ControlTemplate.Triggers>
                                        <Trigger Property="IsSuspendingPopupAnimation"
                                                 Value="true">
                                            <Setter TargetName="PART_Popup"
                                                    Property="PopupAnimation"
                                                    Value="None"/>
                                        </Trigger>
                                        <Trigger Property="Icon"
                                                 Value="{x:Null}">
                                            <Setter TargetName="Icon"
                                                    Property="Visibility"
                                                    Value="Collapsed"/>
                                        </Trigger>
                                        <Trigger Property="IsChecked"
                                                 Value="true">
                                            <Setter TargetName="GlyphPanel"
                                                    Property="Visibility"
                                                    Value="Visible"/>
                                            <Setter TargetName="Icon"
                                                    Property="Visibility"
                                                    Value="Collapsed"/>
                                        </Trigger>
                                        <Trigger Property="IsHighlighted"
                                                 Value="true">
                                            <Setter TargetName="Border"
                                                    Property="BorderBrush"
                                                    Value="{StaticResource &#267;}"/>
                                            <Setter TargetName="Border"
                                                    Property="Background"
                                                    Value="{StaticResource &#266;}"/>
                                            <Setter TargetName="GlyphPanel"
                                                    Property="BorderBrush"
                                                    Value="{StaticResource &#270;}"/>
                                            <Setter TargetName="GlyphPanel"
                                                    Property="Background"
                                                    Value="{StaticResource &#262;}"/>
                                        </Trigger>
                                        <Trigger SourceName="PART_Popup"
                                                  Property="Popup.HasDropShadow"
                                                  Value="true">
                                             <Setter TargetName="Shdw"
                                                     Property="Margin"
                                                     Value="0,0,5,5"/>
                                             <Setter TargetName="Shdw"
                                                     Property="SnapsToDevicePixels"
                                                     Value="true"/>
                                             <Setter TargetName="Shdw"
                                                     Property="Color"
                                                     Value="#71000000"/>
                                         </Trigger>
                                        <Trigger Property="IsEnabled"
                                                 Value="false">
                                            <Setter Property="Foreground"
                                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                                        </Trigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Trigger>
                </Style.Triggers>
            </Style>
        </Style.Resources>
    </Style>

 

    <!-- Thumb used in ToolBar Style -->
    <Style x:Key="&#283;"
           TargetType="{x:Type Thumb}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border Padding="{TemplateBinding Padding}"
                            Background="Transparent"
                            SnapsToDevicePixels="True">
                        <Rectangle>
                            <Rectangle.Fill>
                                <DrawingBrush Viewbox="0,0,4,4"
                                              Viewport="0,0,4,4"
                                              TileMode="Tile"
                                              ViewportUnits="Absolute"
                                              ViewboxUnits="Absolute">
                                    <DrawingBrush.Drawing>
                                        <DrawingGroup>
                                            <DrawingGroup.Children>
                                                <GeometryDrawing Brush="White"
                                                                 Geometry="M 1 1 L 1 3 L 3 3 L 3 1 z"/>
                                                <GeometryDrawing Brush="{StaticResource &#278;}"
                                                                 Geometry="M 0 0 L 0 2 L 2 2 L 2 0 z"/>
                                            </DrawingGroup.Children>
                                        </DrawingGroup>
                                    </DrawingBrush.Drawing>
                                </DrawingBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter Property="Cursor"
                                    Value="SizeAll"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="&#284;"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Background"
                Value="{StaticResource &#279;}"/>
        <Setter Property="MinHeight"
                Value="0"/>
        <Setter Property="MinWidth"
                Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border Name="Bd"
                            CornerRadius="0,3,3,0"
                            Background="{TemplateBinding Background}"
                            SnapsToDevicePixels="true">
                        <Canvas Width="6"
                                Height="7"
                                Margin="7,2,2,2"
                                HorizontalAlignment="Right"
                                VerticalAlignment="Bottom"
                                SnapsToDevicePixels="true">
                            <Path Stroke="White"
                                  Data="M 1 1.5 L 6 1.5"/>
                            <Path Stroke="{TemplateBinding Foreground}"
                                  Data="M 0 0.5 L 5 0.5"/>
                            <Path Fill="White"
                                  Data="M 0.5 4 L 6.5 4 L 3.5 7 Z"/>
                            <Path Fill="{TemplateBinding Foreground}"
                                  Data="M -0.5 3 L 5.5 3 L 2.5 6 Z"/>
                        </Canvas>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter TargetName="Bd"
                                    Property="Background"
                                    Value="{StaticResource &#266;}"/>
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused"
                                 Value="true">
                            <Setter TargetName="Bd"
                                    Property="Background"
                                    Value="{StaticResource &#266;}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{StaticResource &#278;}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="&#285;"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Background"
                Value="{StaticResource &#280;}"/>
        <Setter Property="MinHeight"
                Value="0"/>
        <Setter Property="MinWidth"
                Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border Name="Bd"
                            CornerRadius="0,0,3,3"
                            Background="{TemplateBinding Background}"
                            SnapsToDevicePixels="true">
                        <Canvas Width="7"
                                Height="6"
                                Margin="2,7,2,2"
                                HorizontalAlignment="Right"
                                VerticalAlignment="Bottom"
                                SnapsToDevicePixels="true">
                            <Path Stroke="White"
                                  Data="M 1.5 1 L 1.5 6"/>
                            <Path Stroke="{TemplateBinding Foreground}"
                                  Data="M 0.5 0 L 0.5 5"/>
                            <Path Fill="White"
                                  Data="M 3.5 0.5 L 7 3.5 L 4 6.5 Z"/>
                            <Path Fill="{TemplateBinding Foreground}"
                                  Data="M 3 -0.5 L 6 2.5 L 3 5.5 Z"/>
                        </Canvas>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter TargetName="Bd"
                                    Property="Background"
                                    Value="{StaticResource &#266;}"/>
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused"
                                 Value="true">
                            <Setter TargetName="Bd"
                                    Property="Background"
                                    Value="{StaticResource &#266;}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{StaticResource &#278;}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
  


    <Style x:Key="{x:Type ToolBar}"
           TargetType="{x:Type ToolBar}">
        <Setter Property="Background"
                Value="{StaticResource &#276;}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToolBar}">
                    <Grid Name="Grid"
                          Margin="3,1,1,1"
                          SnapsToDevicePixels="true">
                        <Grid HorizontalAlignment="Right"
                              x:Name="OverflowGrid">
                            <ToggleButton x:Name="OverflowButton"
                                          FocusVisualStyle="{x:Null}"
                                          IsEnabled="{TemplateBinding HasOverflowItems}"
                                          Style="{StaticResource &#284;}"
                                          IsChecked="{Binding Path=IsOverflowOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
                                          ClickMode="Press"/>
                            <Popup x:Name="OverflowPopup"
                                   AllowsTransparency="true"
                                   Placement="Bottom"
                                   IsOpen="{Binding Path=IsOverflowOpen,RelativeSource={RelativeSource TemplatedParent}}"
                                   StaysOpen="false"
                                   Focusable="false"
                                   PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                                <theme:SystemDropShadowChrome Name="Shdw"
                                                              Color="Transparent">
                                    <Border Background="{StaticResource &#272;}"
                                            BorderBrush="{StaticResource &#271;}"
                                            BorderThickness="1">
                                        <ToolBarOverflowPanel x:Name="PART_ToolBarOverflowPanel"
                                                              Margin="2"
                                                              WrapWidth="200"
                                                              Focusable="true"
                                                              FocusVisualStyle="{x:Null}"
                                                              KeyboardNavigation.TabNavigation="Cycle"
                                                              KeyboardNavigation.DirectionalNavigation="Cycle"
                                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                    </Border>
                                </theme:SystemDropShadowChrome>
                            </Popup>
                        </Grid>
                        <Border x:Name="MainPanelBorder"
                                Margin="0,0,11,0"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="3,3,3,3"
                                Padding="{TemplateBinding Padding}">
                            <DockPanel KeyboardNavigation.TabIndex="1"
                                       KeyboardNavigation.TabNavigation="Local">
                                <Thumb x:Name="ToolBarThumb"
                                       Style="{StaticResource &#283;}"
                                       Margin="-3,-1,0,0"
                                       Width="10"
                                       Padding="6,5,1,6"/>
                                <ContentPresenter x:Name="ToolBarHeader"
                                                  ContentSource="Header"
                                                  HorizontalAlignment="Center"
                                                  VerticalAlignment="Center"
                                                  Margin="4,0,4,0"
                                                  SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                <ToolBarPanel x:Name="PART_ToolBarPanel"
                                              IsItemsHost="true"
                                              Margin="0,1,2,2"
                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                            </DockPanel>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsOverflowOpen"
                                 Value="true">
                            <Setter TargetName="ToolBarThumb"
                                    Property="IsEnabled"
                                    Value="false"/>
                        </Trigger>
                        <Trigger Property="Header"
                                 Value="{x:Null}">
                            <Setter TargetName="ToolBarHeader"
                                    Property="Visibility"
                                    Value="Collapsed"/>
                        </Trigger>
                        <Trigger Property="ToolBarTray.IsLocked"
                                 Value="true">
                            <Setter TargetName="ToolBarThumb"
                                    Property="Visibility"
                                    Value="Collapsed"/>
                        </Trigger>
                        <Trigger SourceName="OverflowPopup"
                                 Property="Popup.HasDropShadow"
                                 Value="true">
                            <Setter TargetName="Shdw"
                                    Property="Margin"
                                    Value="0,0,5,5"/>
                            <Setter TargetName="Shdw"
                                    Property="SnapsToDevicePixels"
                                    Value="true"/>
                            <Setter TargetName="Shdw"
                                    Property="Color"
                                    Value="#71000000"/>
                        </Trigger>
                        <Trigger Property="Orientation"
                                 Value="Vertical">
                            <Setter TargetName="Grid"
                                    Property="Margin"
                                    Value="1,3,1,1"/>
                            <Setter TargetName="OverflowButton"
                                    Property="Style"
                                    Value="{StaticResource &#285;}"/>
                            <Setter TargetName="ToolBarThumb"
                                    Property="Height"
                                    Value="10"/>
                            <Setter TargetName="ToolBarThumb"
                                    Property="Width"
                                    Value="Auto"/>
                            <Setter TargetName="ToolBarThumb"
                                    Property="Margin"
                                    Value="-1,-3,0,0"/>
                            <Setter TargetName="ToolBarThumb"
                                    Property="Padding"
                                    Value="5,6,6,1"/>
                            <Setter TargetName="ToolBarHeader"
                                    Property="Margin"
                                    Value="0,0,0,4"/>
                            <Setter TargetName="PART_ToolBarPanel"
                                    Property="Margin"
                                    Value="1,0,2,2"/>
                            <Setter TargetName="ToolBarThumb"
                                    Property="DockPanel.Dock"
                                    Value="Top"/>
                            <Setter TargetName="ToolBarHeader"
                                    Property="DockPanel.Dock"
                                    Value="Top"/>
                            <Setter TargetName="OverflowGrid"
                                    Property="HorizontalAlignment"
                                    Value="Stretch"/>
                            <Setter TargetName="OverflowGrid"
                                    Property="VerticalAlignment"
                                    Value="Bottom"/>
                            <Setter TargetName="OverflowPopup"
                                    Property="Placement"
                                    Value="Right"/>
                            <Setter TargetName="MainPanelBorder"
                                    Property="Margin"
                                    Value="0,0,0,11"/>
                            <Setter Property="Background"
                                    Value="{StaticResource &#277;}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="{x:Type ToolBarTray}" TargetType="{x:Type ToolBarTray}" >
        <Setter Property="Background"
                Value="{StaticResource &#275;}"/>
    </Style>


     <!--=================================================================
        ToolTip
    ==================================================================-->
    <Style x:Key="{x:Type ToolTip}"
           TargetType="{x:Type ToolTip}">
        <Setter Property="BorderThickness"
                Value="1"/>
        <Setter Property="BorderBrush"
                Value="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.InfoBrushKey}}"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}"/>
        <Setter Property="FontFamily"
                Value="{DynamicResource {x:Static SystemFonts.StatusFontFamilyKey}}"/>
        <Setter Property="FontSize"
                Value="{DynamicResource {x:Static SystemFonts.StatusFontSizeKey}}"/>
        <Setter Property="FontStyle"
                Value="{DynamicResource {x:Static SystemFonts.StatusFontStyleKey}}"/>
        <Setter Property="FontWeight"
                Value="{DynamicResource {x:Static SystemFonts.StatusFontWeightKey}}"/>
        <Setter Property="Padding"
                Value="1,1,3,1"/>
        <Setter Property="HorizontalContentAlignment"
                Value="Left"/>
        <Setter Property="VerticalContentAlignment"
                Value="Center"/>
        <Setter Property="HasDropShadow"
                Value="{DynamicResource {x:Static SystemParameters.DropShadowKey}}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToolTip}">
                    <theme:SystemDropShadowChrome Name="Shdw"
                                                  Color="Transparent"
                                                  SnapsToDevicePixels="True">
                        <Border Background="{TemplateBinding Background}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Padding="{TemplateBinding Padding}">
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </Border>
                    </theme:SystemDropShadowChrome>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasDropShadow"
                                 Value="true">
                            <Setter TargetName="Shdw"
                                    Property="Margin"
                                    Value="0,0,5,5"/>
                            <Setter TargetName="Shdw"
                                    Property="Color"
                                    Value="#71000000"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

   
    <!--=================================================================
        TreeView
    ==================================================================-->
    <Style x:Key="{x:Type TreeView}"
           TargetType="{x:Type TreeView}">
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
        <Setter Property="BorderBrush"
                Value="{x:Static theme:ClassicBorderDecorator.ClassicBorderBrush}"/>
        <Setter Property="BorderThickness"
                Value="2"/>
        <Setter Property="Padding"
                Value="1"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility"
                Value="Auto"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility"
                Value="Auto"/>
        <Setter Property="VerticalContentAlignment"
                Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TreeView}">
                    <theme:ClassicBorderDecorator BorderStyle="Sunken"
                                                  Background="{TemplateBinding Background}"
                                                  BorderBrush="{TemplateBinding BorderBrush}"
                                                  BorderThickness="{TemplateBinding BorderThickness}">
                        <ScrollViewer Background="{TemplateBinding Background}"
                                      Focusable="false"
                                      CanContentScroll="false"
                                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                                      Padding="{TemplateBinding Padding}">
                            <ItemsPresenter/>
                        </ScrollViewer>
                    </theme:ClassicBorderDecorator>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 

        <!--=================================================================
        TreeViewItem
    ==================================================================-->
    <Style x:Key="&#286;"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Focusable"
                Value="False"/>
        <Setter Property="Width"
                Value="19"/>
        <Setter Property="Height"
                Value="13"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border Width="19"
                            Height="13"
                            Background="Transparent">
                        <Border Width="9"
                                Height="9"
                                BorderThickness="1"
                                BorderBrush="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"
                                Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
                                SnapsToDevicePixels="true">
                            <Path x:Name="ExpandPath"
                                  Margin="1,1,1,1"
                                  Fill="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
                                  Data="M 0 2 L 0 3 L 2 3 L 2 5 L 3 5 L 3 3 L 5 3 L 5 2 L 3 2 L 3 0 L 2 0 L 2 2 Z"/>
                        </Border>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked"
                                 Value="True">
                            <Setter Property="Data"
                                    TargetName="ExpandPath"
                                    Value="M 0 2 L 0 3 L 5 3 L 5 2 Z"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 

 

 
  
    <!--=================================================================
        TreeViewItem
    ==================================================================-->
    <Style x:Key="&#287;">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="{x:Type TreeViewItem}"
           TargetType="{x:Type TreeViewItem}">
        <Setter Property="Background"
                Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment"
                Value="{Binding Path=HorizontalContentAlignment,RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="VerticalContentAlignment"
                Value="{Binding Path=VerticalContentAlignment,RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="Padding"
                Value="1,0,0,0"/>
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="FocusVisualStyle"
                Value="{StaticResource &#287;}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TreeViewItem}">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition MinWidth="19"
                                              Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <ToggleButton x:Name="Expander"
                                      Style="{StaticResource &#286;}"
                                      IsChecked="{Binding Path=IsExpanded,RelativeSource={RelativeSource TemplatedParent}}"
                                      ClickMode="Press"/>
                        <Border Name="Bd"
                                Grid.Column="1"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Padding="{TemplateBinding Padding}"
                                SnapsToDevicePixels="true">
                            <ContentPresenter x:Name="PART_Header"
                                              ContentSource="Header"
                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </Border>
                        <ItemsPresenter x:Name="ItemsHost"
                                        Grid.Row="1"
                                        Grid.Column="1"
                                        Grid.ColumnSpan="2"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsExpanded"
                                 Value="false">
                            <Setter TargetName="ItemsHost"
                                    Property="Visibility"
                                    Value="Collapsed"/>
                        </Trigger>
                        <Trigger Property="HasItems"
                                 Value="false">
                            <Setter TargetName="Expander"
                                    Property="Visibility"
                                    Value="Hidden"/>
                        </Trigger>
                        <Trigger Property="IsSelected"
                                 Value="true">
                            <Setter TargetName="Bd"
                                    Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="true"/>
                                <Condition Property="IsSelectionActive"
                                           Value="false"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd"
                                    Property="Background"
                                    Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
 
    <!--=================================================================
        UserControl
    ==================================================================-->
    <Style x:Key="{x:Type UserControl}"
           TargetType="{x:Type UserControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type UserControl}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            SnapsToDevicePixels="true">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


  
    <!--=================================================================
        Window
    ==================================================================-->
    <ControlTemplate x:Key="&#288;"
                     TargetType="{x:Type Window}">
        <Border Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}">
            <Grid>
                <AdornerDecorator>
                    <ContentPresenter/>
                </AdornerDecorator>

                <ResizeGrip x:Name="WindowResizeGrip"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Bottom"
                            Visibility="Collapsed"
                            IsTabStop="false"/>
            </Grid>
        </Border>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <!-- There may be perf implications b/c of the following conditions.  We may cause
                     an extra layout to happen when WindowState changes to Minimized and ResizeMode
                     is set to CanResizeWithGrip.
                     NavigationWindow's style requires the ResizeMode condition tag even though
                     Window's style already takes care of this condition.
                     -->
                <MultiTrigger.Conditions>
                    <Condition Property="Window.ResizeMode"
                               Value="CanResizeWithGrip"/>
                    <Condition Property="Window.WindowState"
                               Value="Normal"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="WindowResizeGrip"
                        Property="Visibility"
                        Value="Visible"/>
            </MultiTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>


    <Style x:Key="{x:Type Window}"
           TargetType="{x:Type Window}">
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Window}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <AdornerDecorator>
                            <ContentPresenter/>
                        </AdornerDecorator>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Window.ResizeMode"
                     Value="CanResizeWithGrip">
                <Setter Property="Template"
                        Value="{StaticResource &#288;}"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <!--=================================================================
        Frame
    ==================================================================-->
    <ControlTemplate x:Key="&#220;"
                     TargetType="{x:Type Frame}">
        <Border Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                Padding="{TemplateBinding Padding}">
            <DockPanel>
                <Grid Background="{StaticResource &#221;}"
                      DockPanel.Dock="Top"
                      Height="22">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="16"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <!-- Menu -->
                    <Menu Name="NavMenu"
                          Grid.ColumnSpan="3"
                          Height="16"
                          Margin="1,0,0,0"
                          VerticalAlignment="Center"
                          Style="{StaticResource &#222;}">

                        <MenuItem Padding="0,2,4,0"
                                  Style="{StaticResource &#223;}"
                                  ItemContainerStyle="{StaticResource &#224;}"
                                  IsSubmenuOpen="{Binding Path=(MenuItem.IsSubmenuOpen),Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}">
                            <MenuItem.ItemsSource>
                                <MultiBinding Converter="{StaticResource &#225;}">
                                    <MultiBinding.Bindings>
                                        <Binding RelativeSource="{RelativeSource TemplatedParent}"
                                                 Path="BackStack" />
                                        <Binding RelativeSource="{RelativeSource TemplatedParent}"
                                                 Path="ForwardStack" />
                                    </MultiBinding.Bindings>
                                </MultiBinding>
                            </MenuItem.ItemsSource>
                        </MenuItem>
                    </Menu>

                    <Path Grid.Column="0"
                          SnapsToDevicePixels="false"
                          IsHitTestVisible="false"
                          Margin="2,0,0,0"
                          Grid.ColumnSpan="3"
                          StrokeThickness="1"
                          HorizontalAlignment="Left"
                          VerticalAlignment="Center"
                          Data="M22.5767,21.035 Q27,19.37 31.424,21.035 A12.5,12.5,0,0,0,53.5,13 A12.5,12.5,0,0,0,37.765,0.926 Q27,4.93 16.235,0.926 A12.5,12.5,0,0,0,0.5,13 A12.5,12.5,0,0,0,22.5767,21.035 z">
                        <Path.Fill>
                            <LinearGradientBrush StartPoint="0,0"
                                                 EndPoint="0,1">
                                <LinearGradientBrush.GradientStops>
                                    <GradientStopCollection>
                                        <GradientStop Color="#A0C2CCE7" Offset="0"/>
                                        <GradientStop Color="#60FFFFFF" Offset="1"/>
                                    </GradientStopCollection>
                                </LinearGradientBrush.GradientStops>
                            </LinearGradientBrush>
                        </Path.Fill>

                        <Path.Stroke>
                            <LinearGradientBrush StartPoint="0,0"
                                                 EndPoint="0,1">
                                <LinearGradientBrush.GradientStops>
                                    <GradientStopCollection>
                                        <GradientStop Color="#FFB7C2E3" Offset="0.2"/>
                                        <GradientStop Color="#A0FFFFFF" Offset="0.9"/>
                                    </GradientStopCollection>
                                </LinearGradientBrush.GradientStops>
                            </LinearGradientBrush>
                        </Path.Stroke>
                        <Path.LayoutTransform>
                            <ScaleTransform ScaleX="0.667" ScaleY="0.667"/>
                        </Path.LayoutTransform>
                    </Path>

                    <Button Style="{StaticResource &#226;}"
                            Margin="3,0,1,0"
                            Grid.Column="0">
                        <Button.LayoutTransform>
                            <ScaleTransform ScaleX="0.667" ScaleY="0.667"/>
                        </Button.LayoutTransform>
                    </Button>
                   

                    <Button Style="{StaticResource &#227;}"
                            Margin="1,0,0,0"
                            Grid.Column="1">
                        <Button.LayoutTransform>
                            <ScaleTransform ScaleX="0.667" ScaleY="0.667"/>
                        </Button.LayoutTransform>
                    </Button>
                </Grid>
                <ContentPresenter x:Name="PART_FrameCP"/>
            </DockPanel>
        </Border>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="CanGoForward"
                               Value="false"/>
                    <Condition Property="CanGoBack"
                               Value="false"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="NavMenu"
                        Property="IsEnabled"
                        Value="false"/>
            </MultiTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="{x:Type Frame}"
           TargetType="{x:Type Frame}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Frame}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}">
                        <ContentPresenter x:Name="PART_FrameCP"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="NavigationUIVisibility"
                     Value="Visible">
                <Setter Property="Template"
                        Value="{StaticResource &#220;}"/>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="JournalOwnership"
                               Value="OwnsJournal"/>
                    <Condition Property="NavigationUIVisibility"
                               Value="Automatic"/>
                </MultiTrigger.Conditions>
                <Setter Property="Template"
                        Value="{StaticResource &#220;}"/>
            </MultiTrigger>
        </Style.Triggers>
    </Style>
</ResourceDictionary>

 

 

 

posted on 2009-07-14 10:29  He,YuanHui  阅读(4146)  评论(8编辑  收藏  举报

Add to Google