<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->

<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  mc:Ignorable="d"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008">

   
        <!-- Color Palette -->
        <SolidColorBrush x:Key="OutsideFontColor" Color="#FF000000"/>
        <SolidColorBrush x:Key="ButtonFontColor" Color="#FF042271"/>
        <Color x:Key="Focus">#FF04CCFF</Color>
        <Color x:Key="HyperlinkFocus">#FF2B54BA</Color>
        <Color x:Key="Calendar">#FF0066CC</Color>
        <Color x:Key="PressStroke1">#FF1D415C</Color>
        <Color x:Key="PressStroke2">#FF2C628B</Color>
        <Color x:Key="TabStroke">#FF4F8BB9</Color>
        <Color x:Key="DataSortArrow">#3F2C628B</Color>
        <!--PressStroke2, 25%-->
        <Color x:Key="DropLocate">#FF6392C8</Color>
        <Color x:Key="TreeviewArrowNorm">#FF76D5FD</Color>
        <Color x:Key="TreeviewArrowOver">#FFC1EFF8</Color>
        <Color x:Key="TreeviewArrowCheck">#FF6380EE</Color>
        <Color x:Key="ExpandArrowStroke">#FF688DC4</Color>
        <Color x:Key="Arrow">#FF425080</Color>
        <Color x:Key="Arrow2">#FF7682E4</Color>
        <Color x:Key="TextBkgSelection">#FF309AFF</Color>
        <Color x:Key="TextboxOver1">#FF5296BD</Color>
        <Color x:Key="TextboxOver2">#FFC2E4F6</Color>
        <Color x:Key="TextboxPress1">#FF3B79AC</Color>
        <Color x:Key="TextboxPress2">#FFB2DBED</Color>
        <Color x:Key="ItemOver1">#FFF4FAFD</Color>
        <Color x:Key="ItemOver2">#FFCFEDFD</Color>
        <Color x:Key="ItemOverStroke">#FFD8F0FA</Color>
        <Color x:Key="ItemSelectStroke">#FF98DDFB</Color>
        <Color x:Key="Over1">#FFE2F5FF</Color>
        <Color x:Key="Over2">#FFC0E7FC</Color>
        <Color x:Key="Over3">#FF9EDDFF</Color>
        <Color x:Key="Press1">#FF759FB6</Color>
        <Color x:Key="Press2">#FFB6E0F6</Color>
        <Color x:Key="Press3">#FF9DD5F4</Color>
        <Color x:Key="PressHighlight">#FF387599</Color>
        <Color x:Key="ButtonHighlightMid">#0095D9FF</Color>
        <Color x:Key="ButtonHighlightMid2">#9935A6E6</Color>
        <!--60%-->
        <Color x:Key="ButtonHighlightMid3">#A535A6E6</Color>
        <!--65%-->
        <Color x:Key="RadioIcon1">#FF90D5E5</Color>
        <Color x:Key="RadioIcon2">#FF28A2D1</Color>
        <Color x:Key="RadioIcon3">#FF1898D1</Color>
        <Color x:Key="RadioIcon4">#FF0F83C7</Color>
        <Color x:Key="RadioIconOver1">#FF1EBEFF</Color>
        <Color x:Key="RadioIconOver2">#FF13A2F3</Color>
        <Color x:Key="RadioIconPress1">#99759FB6</Color>
        <!--Press1, 60%-->
        <Color x:Key="RadioIconPress2">#FF4B8DAF</Color>
        <Color x:Key="RadioStroke">#FF275674</Color>
        <Color x:Key="CheckInnerOver">#FF79C6F9</Color>
        <Color x:Key="CheckInnerOver2">#FFAFDEFD</Color>
        <Color x:Key="CheckInnerPress">#FF5EB6F7</Color>
        <Color x:Key="CheckInnerPress2">#FF90CFFC</Color>
        <Color x:Key="CheckOutterOver">#FF5989A5</Color>
        <Color x:Key="CheckOutterOver2">#FFDEF9FA</Color>
        <Color x:Key="ThumbPress1">#FF6CBBE5</Color>
        <Color x:Key="ThumbPress2">#FF50A1CC</Color>
        <Color x:Key="ExpanderOver1">#FFB1E7FE</Color>
        <Color x:Key="ExpanderOver2">#FFEAFFFF</Color>
        <Color x:Key="ExpanderOver3">#A56EB4F6</Color>
        <Color x:Key="ExpanderMid">#009DD5F4</Color>
        <!--Press3, 0%-->
        <Color x:Key="ExpanderPress1">#FF80CEFF</Color>
        <Color x:Key="ExpanderPress2">#FF2D84CF</Color>
        <Color x:Key="ThumbDivetOver">#E5387599</Color>
        <!--PressHighlight, 20%-->
        <Color x:Key="ThumbDivetFill1">#199DD5F4</Color>
        <!--Press3, 10%-->
        <Color x:Key="ThumbDivetFill2">#33387599</Color>
        <!--PressHighlight, 20%-->
        <!-- End Color Palette-->


        <!-- Communal Static Resources -->
        <SolidColorBrush x:Key="btnFocus" Color="{StaticResource Focus}"/>
        <SolidColorBrush x:Key="btnPressStroke1" Color="{StaticResource PressStroke1}"/>
        <SolidColorBrush x:Key="btnPressStroke2" Color="{StaticResource PressStroke2}"/>

        <LinearGradientBrush x:Key="btnPressBorder" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="{StaticResource PressStroke1}" Offset="0"/>
            <GradientStop Color="{StaticResource PressStroke2}" Offset="1"/>
        </LinearGradientBrush>

        <SolidColorBrush x:Key="hyperlinkPress" Color="{StaticResource HyperlinkFocus}"/>
        <SolidColorBrush x:Key="calendarBtnFill" Color="{StaticResource Over2}"/>
        <SolidColorBrush x:Key="calendarTodayStroke" Color="{StaticResource Calendar}"/>
        <SolidColorBrush x:Key="treeviewArrowUnchecked" Color="{StaticResource TreeviewArrowNorm}"/>
        <SolidColorBrush x:Key="treeviewArrowHover" Color="{StaticResource TreeviewArrowOver}"/>
        <SolidColorBrush x:Key="treeviewArrowChecked" Color="{StaticResource TreeviewArrowCheck}"/>

        <SolidColorBrush x:Key="TextBackgroundSelection" Color="{StaticResource TextBkgSelection}"/>
        <SolidColorBrush x:Key="TextBoxOverBrush" Color="{StaticResource TextboxOver1}"/>
        <SolidColorBrush x:Key="TextBoxPressBrush" Color="{StaticResource TextboxPress1}"/>

        <LinearGradientBrush x:Key="TextBoxOver" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="{StaticResource TextboxOver1}" Offset="0"/>
            <GradientStop Color="{StaticResource TextboxOver2}" Offset="0.355"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="TextBoxFocus" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="{StaticResource TextboxPress1}" Offset="0"/>
            <GradientStop Color="{StaticResource TextboxPress2}" Offset="0.355"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="TextBoxNorm" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFABAEB3" Offset="0"/>
            <GradientStop Color="#FFE2E8EE" Offset="0.355"/>
        </LinearGradientBrush>

        <LinearGradientBrush x:Key="grayGradient" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFFFFFFF" Offset="0"/>
            <GradientStop Color="#FFEDEDED" Offset="0.171"/>
            <GradientStop Color="#FFE7E7E7" Offset="0.5"/>
            <GradientStop Color="#FFDCDCDC" Offset="0.51"/>
            <GradientStop Color="#FFEAEBEC" Offset="1"/>
        </LinearGradientBrush>

        <SolidColorBrush x:Key="hoverStroke" Color="{StaticResource ItemOverStroke}"/>
        <SolidColorBrush x:Key="selectedStroke" Color="{StaticResource ItemSelectStroke}"/>

        <LinearGradientBrush x:Key="hoverGradient" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="{StaticResource ItemOver1}" Offset="0.5"/>
            <GradientStop Color="{StaticResource Over1}" Offset="0.5"/>
            <GradientStop Color="{StaticResource ItemOver2}" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="hoverGradientVertical" EndPoint="1,0.5" StartPoint="0,0.5">
            <GradientStop Color="{StaticResource ItemOver1}" Offset="0.5"/>
            <GradientStop Color="{StaticResource Over1}" Offset="0.5"/>
            <GradientStop Color="{StaticResource ItemOver2}" Offset="1"/>
        </LinearGradientBrush>

        <LinearGradientBrush x:Key="BtnOverFill" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="{StaticResource Over1}" Offset="0.5"/>
            <GradientStop Color="{StaticResource Over2}" Offset="0.509"/>
            <GradientStop Color="{StaticResource Over3}" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="BtnPressFill" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="{StaticResource Press1}" Offset="0"/>
            <GradientStop Color="{StaticResource Press2}" Offset="0.152"/>
            <GradientStop Color="{StaticResource Over2}" Offset="0.5"/>
            <GradientStop Color="{StaticResource Press3}" Offset="0.509"/>
        </LinearGradientBrush>

        <!-- standard button specific resources -->
        <LinearGradientBrush x:Key="btnOverFillHighlight" EndPoint="1,0.5" StartPoint="0,0.5">
            <GradientStop Color="{StaticResource ButtonHighlightMid2}" Offset="0"/>
            <GradientStop Color="{StaticResource ButtonHighlightMid}" Offset="0.101"/>
            <GradientStop Color="{StaticResource ButtonHighlightMid}" Offset="0.899"/>
            <GradientStop Color="{StaticResource ButtonHighlightMid2}" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="btnPressFillHighlight" EndPoint="1,0.5" StartPoint="0,0.5">
            <GradientStop Color="{StaticResource PressHighlight}" Offset="0"/>
            <GradientStop Color="{StaticResource ButtonHighlightMid3}" Offset="0.037"/>
            <GradientStop Color="{StaticResource ButtonHighlightMid}" Offset="0.143"/>
            <GradientStop Color="{StaticResource ButtonHighlightMid}" Offset="0.857"/>
            <GradientStop Color="{StaticResource ButtonHighlightMid3}" Offset="0.963"/>
            <GradientStop Color="{StaticResource PressHighlight}" Offset="1"/>
        </LinearGradientBrush>

        <!-- Radio/Checkbox specific resources -->
        <SolidColorBrush x:Key="checkOverStroke" Color="{StaticResource CheckOutterOver}"/>
        <SolidColorBrush x:Key="checkOverFill" Color="{StaticResource CheckOutterOver2}"/>
        <SolidColorBrush x:Key="checkPressFill" Color="{StaticResource TextboxOver2}"/>
        <SolidColorBrush x:Key="checkInnerOverFill" Color="{StaticResource CheckInnerOver2}"/>
        <SolidColorBrush x:Key="checkInnerPressFill" Color="{StaticResource CheckInnerPress2}"/>
        <SolidColorBrush x:Key="checkIconStroke" Color="{StaticResource Arrow}"/>
        <SolidColorBrush x:Key="radioIconStroke" Color="{StaticResource RadioStroke}"/>

        <LinearGradientBrush x:Key="radioIconFill" EndPoint="0.8,0.8" StartPoint="0.3,0.3">
            <GradientStop Color="{StaticResource RadioIcon1}" Offset="0"/>
            <GradientStop Color="{StaticResource RadioIcon2}" Offset="0.179"/>
            <GradientStop Color="{StaticResource RadioIcon3}" Offset="0.496"/>
            <GradientStop Color="{StaticResource RadioIcon4}" Offset="0.812"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="radioIconFillOver" EndPoint="0.8,0.8" StartPoint="0.3,0.3">
            <GradientStop Color="{StaticResource Over2}" Offset="0"/>
            <GradientStop Color="{StaticResource Focus}" Offset="0.179"/>
            <GradientStop Color="{StaticResource RadioIconOver1}" Offset="0.496"/>
            <GradientStop Color="{StaticResource RadioIconOver2}" Offset="0.812"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="radioIconFillPress" EndPoint="0.8,0.8" StartPoint="0.3,0.3">
            <GradientStop Color="{StaticResource RadioIconPress1}" Offset="0"/>
            <GradientStop Color="{StaticResource RadioIconPress2}" Offset="0.317"/>
            <GradientStop Color="{StaticResource PressHighlight}" Offset="0.504"/>
            <GradientStop Color="{StaticResource PressStroke2}" Offset="0.817"/>
        </LinearGradientBrush>

        <LinearGradientBrush x:Key="checkInnerOverStroke" EndPoint="0.8,0.8" StartPoint="0.3,0.3">
            <GradientStop Color="{StaticResource CheckInnerOver}" Offset="0"/>
            <GradientStop Color="{StaticResource ItemOver2}" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="checkInnerPressStroke" EndPoint="0.8,0.8" StartPoint="0.3,0.3">
            <GradientStop Color="{StaticResource CheckInnerPress}" Offset="0"/>
            <GradientStop Color="{StaticResource Over2}" Offset="1"/>
        </LinearGradientBrush>

        <!-- slider specific resources -->
        <LinearGradientBrush x:Key="ThumbOver" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFFFFFFF" Offset="0"/>
            <GradientStop Color="{StaticResource Over1}" Offset="0.484"/>
            <GradientStop Color="{StaticResource Over2}" Offset="0.493"/>
            <GradientStop Color="{StaticResource Over3}" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="ThumbPress" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="{StaticResource ItemOver1}" Offset="0"/>
            <GradientStop Color="{StaticResource Press3}" Offset="0.576"/>
            <GradientStop Color="{StaticResource ThumbPress1}" Offset="0.581"/>
            <GradientStop Color="{StaticResource ThumbPress2}" Offset="1"/>
        </LinearGradientBrush>

        <!-- datagrid specific resources -->
        <SolidColorBrush x:Key="HeaderSeparator" Color="#FFD7D5D8" />
        <SolidColorBrush x:Key="GridBorder" Color="#FFD6D7D6" />

        <SolidColorBrush x:Key="dropLocator" Color="{StaticResource DropLocate}" />
        <LinearGradientBrush x:Key="sortArrow" EndPoint="0.725,0.832" StartPoint="0.275,0.168">
            <GradientStop Color="{StaticResource PressStroke2}"/>
            <GradientStop Color="{StaticResource DataSortArrow}" Offset="1"/>
        </LinearGradientBrush>

        <!-- combobox/datepicker/numericupdown specific resources -->
        <LinearGradientBrush x:Key="ComboTogglePressHighlight" EndPoint="1,0.5" StartPoint="0,0.5">
            <GradientStop Color="{StaticResource PressHighlight}" Offset="0"/>
            <GradientStop Color="{StaticResource ButtonHighlightMid3}" Offset="0.088"/>
            <GradientStop Color="{StaticResource ButtonHighlightMid}" Offset="0.221"/>
            <GradientStop Color="{StaticResource ButtonHighlightMid}" Offset="0.779"/>
            <GradientStop Color="{StaticResource ButtonHighlightMid3}" Offset="0.912"/>
            <GradientStop Color="{StaticResource PressHighlight}" Offset="1"/>
        </LinearGradientBrush>

        <!-- expander specific resources -->
        <SolidColorBrush x:Key="expanderArrowStroke" Color="{StaticResource ExpandArrowStroke}"/>

        <LinearGradientBrush x:Key="ExpanderArrowHoverFill1" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="{StaticResource ItemOver1}" Offset="0"/>
            <GradientStop Color="{StaticResource ExpanderOver1}" Offset="0.52"/>
            <GradientStop Color="{StaticResource Over3}" Offset="0.521"/>
            <GradientStop Color="{StaticResource Over2}" Offset="0.78"/>
            <GradientStop Color="{StaticResource ExpanderOver2}" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="ExpanderArrowHoverFill2" EndPoint="1,0" StartPoint="0,0">
            <GradientStop Color="{StaticResource ExpanderOver3}" Offset="0"/>
            <GradientStop Color="{StaticResource ExpanderMid}" Offset="0.346"/>
            <GradientStop Color="{StaticResource ExpanderMid}" Offset="0.696"/>
            <GradientStop Color="{StaticResource ExpanderOver3}" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="ExpanderArrowHoverFill3" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="#B9FFFFFF" Offset="0"/>
            <GradientStop Color="#33FFFFFF" Offset="0.51"/>
            <GradientStop Color="#00FFFFFF" Offset="0.52"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="ExpanderArrowPressedFill1" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="{StaticResource ItemOver2}" Offset="0"/>
            <GradientStop Color="{StaticResource ExpanderPress1}" Offset="0.52"/>
            <GradientStop Color="{StaticResource CheckInnerOver}" Offset="0.521"/>
            <GradientStop Color="{StaticResource TreeviewArrowOver}" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="ExpanderArrowPressedFill2" EndPoint="1,0" StartPoint="0,0">
            <GradientStop Color="{StaticResource ExpanderPress2}" Offset="0"/>
            <GradientStop Color="{StaticResource ExpanderMid}" Offset="0.5"/>
            <GradientStop Color="{StaticResource ExpanderPress2}" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="ExpanderArrowPressedFill3" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="#A5FFFFFF" Offset="0"/>
            <GradientStop Color="#26FFFFFF" Offset="0.506"/>
            <GradientStop Color="#00FFFFFF" Offset="0.521"/>
        </LinearGradientBrush>

        <!-- Tab specific resources -->
        <SolidColorBrush x:Key="TabOverStroke" Color="{StaticResource TabStroke}"/>

        <!-- Tab vertical (btn over vertical) -->
        <LinearGradientBrush x:Key="VTabOverGradient" EndPoint="1,0.5" StartPoint="0,0.5">
            <GradientStop Color="{StaticResource Over1}" Offset="0.5"/>
            <GradientStop Color="{StaticResource Over2}" Offset="0.509"/>
            <GradientStop Color="{StaticResource Over3}" Offset="1"/>
        </LinearGradientBrush>

        <!-- Scrollbar specific resources -->
        <SolidColorBrush x:Key="ScrollbarBkgNormStroke" Color="#FFA4A4A4"/>

        <LinearGradientBrush x:Key="HScrollbarBkgNormFill" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFEFEFF0" Offset="0.5"/>
            <GradientStop Color="#FFD5D6D8" Offset="0.513"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="HScrollbarBkgOverFill" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="{StaticResource Over1}" Offset="0.5"/>
            <GradientStop Color="{StaticResource Over2}" Offset="0.513"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="HScrollbarBkgPressFill" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="{StaticResource Press2}" Offset="0.5"/>
            <GradientStop Color="{StaticResource ThumbPress1}" Offset="0.513"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VScrollbarBkgNormFill" EndPoint="1,0.5" StartPoint="0,0.5">
            <GradientStop Color="#FFEFEFF0" Offset="0.5"/>
            <GradientStop Color="#FFD5D6D8" Offset="0.513"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VScrollbarBkgOverFill" EndPoint="1,0.5" StartPoint="0,0.5">
            <GradientStop Color="{StaticResource Over1}" Offset="0.5"/>
            <GradientStop Color="{StaticResource Over2}" Offset="0.513"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VScrollbarBkgPressFill" EndPoint="1,0.5" StartPoint="0,0.5">
            <GradientStop Color="{StaticResource Press2}" Offset="0.5"/>
            <GradientStop Color="{StaticResource ThumbPress1}" Offset="0.513"/>
        </LinearGradientBrush>

        <LinearGradientBrush x:Key="HThumbDivetNormFill" EndPoint="0.5,1" StartPoint="0.5,0.1">
            <GradientStop Color="#FF979797" Offset="0"/>
            <GradientStop Color="#19979797" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="HThumbDivetNormStroke" EndPoint="0.5,1" StartPoint="0.5,0.1">
            <GradientStop Color="#B2000000" Offset="0"/>
            <GradientStop Color="#33000000" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="HThumbDivetOverFill" EndPoint="0.5,1" StartPoint="0.5,0.1">
            <GradientStop Color="{StaticResource Press3}" Offset="0"/>
            <GradientStop Color="{StaticResource ThumbDivetFill1}" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="HThumbDivetOverStroke" EndPoint="0.5,1" StartPoint="0.5,0.1">
            <GradientStop Color="{StaticResource ThumbDivetOver}" Offset="0"/>
            <GradientStop Color="{StaticResource ThumbDivetFill2}" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="HThumbDivetPressFill" EndPoint="0.5,1" StartPoint="0.5,0.1">
            <GradientStop Color="{StaticResource RadioIconPress2}" Offset="0"/>
            <GradientStop Color="{StaticResource ThumbDivetFill1}" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="HThumbDivetPressStroke" EndPoint="0.5,1" StartPoint="0.5,0.1">
            <GradientStop Color="{StaticResource PressStroke1}" Offset="0"/>
            <GradientStop Color="{StaticResource ThumbDivetFill2}" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VThumbDivetNormFill" EndPoint="1,0.5" StartPoint="0.1,0.5">
            <GradientStop Color="#FF979797" Offset="0"/>
            <GradientStop Color="#19979797" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VThumbDivetNormStroke" EndPoint="1,0.5" StartPoint="0.1,0.5">
            <GradientStop Color="#B2000000" Offset="0"/>
            <GradientStop Color="#33000000" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VThumbDivetOverFill" EndPoint="1,0.5" StartPoint="0.1,0.5">
            <GradientStop Color="{StaticResource Press3}" Offset="0"/>
            <GradientStop Color="{StaticResource ThumbDivetFill1}" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VThumbDivetOverStroke" EndPoint="1,0.5" StartPoint="0.1,0.5">
            <GradientStop Color="{StaticResource ThumbDivetOver}" Offset="0"/>
            <GradientStop Color="{StaticResource ThumbDivetFill2}" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VThumbDivetPressFill" EndPoint="1,0.5" StartPoint="0.1,0.5">
            <GradientStop Color="{StaticResource RadioIconPress2}" Offset="0"/>
            <GradientStop Color="{StaticResource ThumbDivetFill1}" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VThumbDivetPressStroke" EndPoint="1,0.5" StartPoint="0.1,0.5">
            <GradientStop Color="{StaticResource PressStroke1}" Offset="0"/>
            <GradientStop Color="{StaticResource ThumbDivetFill2}" Offset="1"/>
        </LinearGradientBrush>
        <!-- End Static Resources -->


        <Color x:Key="BlackColor">#FF000000</Color>
        <Color x:Key="WhiteColor">#FFFFFFFF</Color>


        <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888"/>


        <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFF"/>


        <Style x:Key="NuclearButtonFocusVisual">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Border>
                            <Rectangle Margin="2" Stroke="#60000000" StrokeThickness="1" StrokeDashArray="1 2"/>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="{x:Type Button}" BasedOn="{x:Null}">
            <Setter Property="Foreground" Value="{StaticResource ButtonFontColor}"/>
            <Setter Property="Padding" Value="3"/>
            <Setter Property="FocusVisualStyle" Value="{DynamicResource NuclearButtonFocusVisual}"/>
<Setter Property="Template" Value="{DynamicResource ButtonTemplate}" />
        </Style>
    
    <ControlTemplate x:Key="ButtonTemplate" TargetType="{x:Type Button}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundOver" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundOver_Highlight" Storyboard.TargetProperty="Opacity" To="0.65"/>
                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundOver" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundOver_Highlight" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="PressedOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity" To="0.84"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgoundPressed_Highlight" Storyboard.TargetProperty="Opacity" To="0.65"/>
                            </Storyboard>
                            <Storyboard x:Key="PressedOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgoundPressed_Highlight" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Grid x:Name="Grid">
                            <Border x:Name="BackgroundNorm" Background="{StaticResource grayGradient}" BorderThickness="1" BorderBrush="#FF8E8F8F" CornerRadius="3"/>
                            <Border x:Name="BackgroundNorm_highlight" Margin="1" BorderBrush="#F2FFFFFF" BorderThickness="1,0,1,1" CornerRadius="3" Opacity="0.65"/>
                            <Border x:Name="BackgroundOver" Background="{StaticResource BtnOverFill}" BorderBrush="{StaticResource TextBoxPressBrush}" BorderThickness="1" CornerRadius="3" Opacity="0"/>
                            <Border x:Name="BackgroundOver_Highlight" Margin="1" Background="{StaticResource btnOverFillHighlight}" BorderBrush="{StaticResource hoverStroke}" BorderThickness="1,0,1,1" CornerRadius="3" Opacity="0"/>
                            <Border x:Name="BackgroundPressed" Background="{StaticResource BtnPressFill}" BorderBrush="{StaticResource btnPressBorder}" BorderThickness="1" CornerRadius="3" Opacity="0"/>
                            <Border x:Name="BackgoundPressed_Highlight" Background="{StaticResource btnPressFillHighlight}" Margin="1" CornerRadius="2.5" Opacity="0"/>
                            <Border x:Name="Background_overlay" Margin="1,1,1,0" BorderThickness="1" CornerRadius="3,3,0,0">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#00FFFFFF" Offset="0"/>
                                        <GradientStop Color="#72FFFFFF" Offset="0.157"/>
                                        <GradientStop Color="#72FFFFFF" Offset="0.5"/>
                                        <GradientStop Color="#00FFFFFF" Offset="0.51"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border x:Name="DisabledVisualElement" Background="#FFF1F1F1" BorderBrush="#FFB2B2B2" BorderThickness="1" CornerRadius="3" IsHitTestVisible="false" Visibility="Collapsed"/>
                            <ContentPresenter
                        		x:Name="contentPresenter"
                        		Content="{TemplateBinding Content}"
                        		ContentTemplate="{TemplateBinding ContentTemplate}"
                        		VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        		HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        		Margin="{TemplateBinding Padding}"/>
                            <TextBlock Panel.ZIndex="1"
                        		x:Name="DisabledOverlay"
                        		Text="{TemplateBinding Content}"
                        		Foreground="#FF969696"
                        		HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        		VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        		Margin="{TemplateBinding Padding}"
                        		Visibility="Collapsed"/>
                            <Border x:Name="FocusVisualElement" Margin="1" BorderBrush="{StaticResource btnFocus}" BorderThickness="1" CornerRadius="2" IsHitTestVisible="false" Opacity="0"/>
                            <Border x:Name="DefaultBorder" Margin="1" BorderBrush="{StaticResource btnFocus}" BorderThickness="1" CornerRadius="2" IsHitTestVisible="false" Opacity="0"/>
                        </Grid>

                        <ControlTemplate.Triggers>
                            <Trigger Property="IsDefault" Value="True">
                                <Setter Property="Opacity" TargetName="DefaultBorder" Value="1"/>
                            </Trigger>
                            <Trigger Property="IsKeyboardFocused" Value="true">

                                <Trigger.ExitActions>
                                    <BeginStoryboard x:Name="FocusedOff_BeginStoryboard" Storyboard="{StaticResource FocusedOff}"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard x:Name="FocusedOn_BeginStoryboard" Storyboard="{StaticResource FocusedOn}"/>
                                </Trigger.EnterActions>

                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                                </Trigger.EnterActions>

                            </Trigger>
                            <Trigger Property="IsPressed" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOff}" />
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOn}"/>
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="true"/>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
                                <Setter Property="Visibility" TargetName="DisabledVisualElement" Value="Visible"/>
                                <Setter Property="Visibility" TargetName="DisabledOverlay" Value="Visible"/>
                                <Setter Property="Visibility" TargetName="contentPresenter" Value="Collapsed"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>

        <Style x:Key="RadioButtonFocusVisual">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Border>
                            <Rectangle Margin="15,0,0,0" Stroke="#60000000" StrokeThickness="1" StrokeDashArray="1 2"/>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="CheckBoxFocusVisual">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Border>
                            <Rectangle Margin="15,0,0,0" Stroke="#60000000" StrokeThickness="1" StrokeDashArray="1 2"/>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="{x:Type CheckBox}">
            <Setter Property="SnapsToDevicePixels" Value="true"/>
            <Setter Property="FocusVisualStyle" Value="{DynamicResource CheckBoxFocusVisual}"/>
            <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Top"/>
            <Setter Property="Padding" Value="4,1,0,0"/>

<Setter Property="Template" Value="{DynamicResource CheckBoxTemplate}" />
        </Style>
    
    <ControlTemplate x:Key="CheckBoxTemplate" TargetType="{x:Type CheckBox}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Background_Over" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="BoxOver" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>

                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Background_Over" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="BoxOver" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>

                            </Storyboard>
                            <Storyboard x:Key="PressedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="BoxPress" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Background_Press" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="PressedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Background_Press" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="BoxPress" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="CheckedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="CheckIcon" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.9"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="CheckedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="CheckIcon" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="IndeterminateOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="IndeterminateIcon" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.9"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="IndeterminateOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="IndeterminateIcon" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusedVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusedVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <BulletDecorator Background="Transparent">
                            <BulletDecorator.Bullet>
                                <Grid>
                                    <Rectangle x:Name="Background" Margin="1" Width="13" Height="13" Fill="#FFF4F4F4" Stroke="#FF868686" StrokeThickness="1" />
                                    <Rectangle x:Name="Background_Over" Width="13" Height="13" Fill="{StaticResource checkOverFill}" Stroke="{StaticResource checkOverStroke}" StrokeThickness="1" Opacity="0"/>
                                    <Rectangle x:Name="Background_Press" Width="13" Height="13" Fill="{StaticResource checkPressFill}" Stroke="{StaticResource btnPressStroke2}" StrokeThickness="1" Opacity="0"/>
                                    <Rectangle x:Name="BoxFill" Width="9" Height="9" Fill="#FFCACFD5" StrokeThickness="1">
                                        <Rectangle.Stroke>
                                            <LinearGradientBrush EndPoint="0.8,0.8" StartPoint="0.3,0.3">
                                                <GradientStop Color="#FFB3B8BD"/>
                                                <GradientStop Color="#FFE0E0E0" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Stroke>
                                    </Rectangle>
                                    <Rectangle x:Name="BoxOver" Margin="3" Width="9" Height="9" Fill="{StaticResource checkInnerOverFill}" Stroke="{StaticResource checkInnerOverStroke}" StrokeThickness="1" Opacity="0"/>
                                    <Rectangle x:Name="BoxPress" Width="9" Height="9" Fill="{StaticResource checkInnerPressFill}" Stroke="{StaticResource checkInnerPressStroke}" StrokeThickness="1" Opacity="0" />
                                    <Rectangle x:Name="BoxGradient" Width="7" Height="7" StrokeThickness="1">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush StartPoint="0.238,0.228" EndPoint="0.752,0.749">
                                                <GradientStop Color="#00F6F6F6" Offset="0.254" />
                                                <GradientStop Color="#53F8F8F8" Offset="0.54"/>
                                                <GradientStop Color="#BFFFFFFF" Offset="0.996"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>
                                    <Rectangle x:Name="IndeterminateIcon" Width="5" Height="2" Fill="{StaticResource checkIconStroke}" Opacity="0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                    <Path x:Name="CheckIcon" Margin="0,3.333,3.833,0" Width="7" Height="9" Fill="{StaticResource checkIconStroke}" Stretch="Fill" Opacity="0" VerticalAlignment="Top" HorizontalAlignment="Right" Data="M103.78572,598.96112 L105.09846,597.5661 L107.00806,600.16229 C107.00806,600.16229 109.91004,592.74463 109.91004,592.74463 C109.91004,592.74463 111.74678,593.79761 111.74678,593.79761 C111.74678,593.79761 107.88566,602.75848 107.88566,602.75848 L106.60118,602.75848 z"/>
                                    <Rectangle x:Name="FocusedVisualElement" Stroke="{StaticResource btnFocus}" StrokeThickness="1" Visibility="Visible" Opacity="0"/>
                                    <Rectangle x:Name="DisabledVisualElement" Margin="1" Fill="#4CFFFFFF" Visibility="Collapsed"/>
                                </Grid>
                            </BulletDecorator.Bullet>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
                        </BulletDecorator>

                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True">
                                <Trigger.ExitActions>

                                    <BeginStoryboard Storyboard="{StaticResource FocusedOff}" x:Name="FocusedOff_BeginStoryboard"/>

                                </Trigger.ExitActions>
                                <Trigger.EnterActions>

                                    <BeginStoryboard Storyboard="{StaticResource FocusedOn}" x:Name="FocusedOn_BeginStoryboard"/>

                                </Trigger.EnterActions>
                            </Trigger>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsChecked" Value="True" />
                                    <Condition Property="IsThreeState" Value="True" />
                                </MultiTrigger.Conditions>
                                <MultiTrigger.EnterActions>

                                    <BeginStoryboard Storyboard="{StaticResource CheckedOn}" x:Name="CheckedOn_BeginStoryboard"/>

                                </MultiTrigger.EnterActions>
                                <MultiTrigger.ExitActions>

                                    <BeginStoryboard Storyboard="{StaticResource CheckedOff}" x:Name="CheckedOff_BeginStoryboard"/>

                                </MultiTrigger.ExitActions>
                            </MultiTrigger>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsChecked" Value="{x:Null}" />
                                    <Condition Property="IsThreeState" Value="True" />
                                </MultiTrigger.Conditions>
                                <MultiTrigger.EnterActions>

                                    <BeginStoryboard Storyboard="{StaticResource IndeterminateOn}" x:Name="IndeterminateOn_BeginStoryboard"/>

                                </MultiTrigger.EnterActions>
                                <MultiTrigger.ExitActions>

                                    <BeginStoryboard Storyboard="{StaticResource IndeterminateOff}" x:Name="IndeterminateOff_BeginStoryboard"/>

                                </MultiTrigger.ExitActions>
                                <Setter Property="Opacity" TargetName="CheckIcon" Value="0"/>
                                <Setter Property="Visibility" TargetName="CheckIcon" Value="Collapsed"/>
                            </MultiTrigger>
                            <Trigger Property="IsChecked" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource CheckedOff}" x:Name="CheckedOn_BeginStoryboard1"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource CheckedOn}" x:Name="CheckedOff_BeginStoryboard1"/>
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="IsPressed" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOff}"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOn}"/>
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">

                                <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
                                <Setter Property="Visibility" TargetName="DisabledVisualElement" Value="Visible"/>
                            </Trigger>
                        </ControlTemplate.Triggers>

                    </ControlTemplate>

        <Style TargetType="{x:Type RadioButton}">
            <Setter Property="SnapsToDevicePixels" Value="true"/>
            <Setter Property="FocusVisualStyle" Value="{DynamicResource RadioButtonFocusVisual}"/>
            <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Top"/>
            <Setter Property="Padding" Value="4,1,0,0"/>
<Setter Property="Template" Value="{DynamicResource RadioButtonTemplate}" />
        </Style>
    
    <ControlTemplate x:Key="RadioButtonTemplate" TargetType="{x:Type RadioButton}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="CircleOver" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="BackgroundOver" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>

                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="BackgroundOver" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="CircleOver" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>

                            </Storyboard>
                            <Storyboard x:Key="PressedOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundPress" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="CircleFillPress" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="CircleIconPress" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="PressedOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundPress" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="CircleFillPress" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="CircleIconPress" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="CheckedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="CircleIcon" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="CheckIconOver" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="CircleIconPress" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>


                            </Storyboard>
                            <Storyboard x:Key="CheckedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="CircleIcon" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="CheckIconOver" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="CircleIconPress" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>


                            </Storyboard>
                            <Storyboard x:Key="FocusedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusedVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusedVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <BulletDecorator Background="Transparent">
                            <BulletDecorator.Bullet>
                                <Grid>
                                    <Ellipse x:Name="Background" Width="14" Height="14" Fill="#FFF4F4F4" Stroke="#FF6F6F6F" StrokeThickness="1"/>
                                    <Ellipse x:Name="BackgroundOver" Width="14" Height="14" Fill="{StaticResource checkOverFill}" Stroke="{StaticResource checkOverStroke}" StrokeThickness="1" Opacity="0"/>
                                    <Ellipse x:Name="BackgroundPress" Width="14" Height="14" Fill="{StaticResource checkPressFill}" Stroke="{StaticResource btnPressStroke2}" StrokeThickness="1" Opacity="0"/>
                                    <Ellipse x:Name="CircleFill" Margin="2" Fill="#FFCACFD5" StrokeThickness="1">
                                        <Ellipse.Stroke>
                                            <LinearGradientBrush EndPoint="0.8,0.8" StartPoint="0.3,0.3">
                                                <GradientStop Color="#FFB3B8BD" Offset="0"/>
                                                <GradientStop Color="#FFE0E0E0" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Ellipse.Stroke>
                                    </Ellipse>
                                    <Ellipse x:Name="CircleOver" Margin="2" Fill="{StaticResource checkInnerOverFill}" Stroke="{StaticResource checkInnerOverStroke}" StrokeThickness="1" Opacity="0"/>
                                    <Ellipse x:Name="CircleFillPress" Margin="2" Fill="{StaticResource checkInnerPressFill}" Stroke="{StaticResource checkInnerPressStroke}" StrokeThickness="1" Opacity="0" Visibility="Visible"/>
                                    <Ellipse x:Name="CircleGradient" Margin="3" StrokeThickness="1">
                                        <Ellipse.Fill>
                                            <LinearGradientBrush EndPoint="0.8,0.8" StartPoint="0.3,0.3">
                                                <GradientStop Color="#00F6F6F6" Offset="0"/>
                                                <GradientStop Color="#53F8F8F8" Offset="0.3"/>
                                                <GradientStop Color="#BFFFFFFF" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Ellipse.Fill>
                                    </Ellipse>
                                    <Ellipse x:Name="CircleIcon" Margin="3" Fill="{StaticResource radioIconFill}" Stroke="{StaticResource radioIconStroke}" StrokeThickness="1.25" Opacity="0"/>
                                    <Ellipse x:Name="CheckIconOver" Margin="3" Fill="{StaticResource radioIconFillOver}" Stroke="{StaticResource radioIconStroke}" StrokeThickness="1.25" Opacity="0"/>
                                    <Ellipse x:Name="CircleIconPress" Margin="3" Fill="{StaticResource radioIconFillPress}" Stroke="{StaticResource radioIconStroke}" StrokeThickness="1.25" Opacity="0"/>
                                    <Ellipse x:Name="DisabledVisualElement" Width="14" Height="14" Fill="#FFFFFFFF" Stroke="#FFFFFFFF" Opacity="0.35" Visibility="Collapsed"/>
                                    <Ellipse x:Name="FocusedVisualElement" Margin="-1" Width="16" Height="16" Stroke="{StaticResource btnFocus}" StrokeThickness="1" IsHitTestVisible="false" Opacity="0" />
                                </Grid>
                            </BulletDecorator.Bullet>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
                        </BulletDecorator>

                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource FocusedOff}" x:Name="FocusedOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource FocusedOn}" x:Name="FocusedOn_BeginStoryboard"/>
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="IsChecked" Value="false">

                                <Trigger.ExitActions>
                                    <BeginStoryboard x:Name="CheckedOn_BeginStoryboard" Storyboard="{StaticResource CheckedOn}"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard x:Name="CheckedOff_BeginStoryboard" Storyboard="{StaticResource CheckedOff}"/>
                                </Trigger.EnterActions>

                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="IsPressed" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOff}"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOn}"/>
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">

                                <Setter Property="Foreground" Value="#80000000"/>
                                <Setter Property="Visibility" TargetName="DisabledVisualElement" Value="Visible"/>
                            </Trigger>

                        </ControlTemplate.Triggers>
                    </ControlTemplate>

        <Style x:Key="NuclearRepeatButton" d:IsControlPart="True" TargetType="{x:Type RepeatButton}" BasedOn="{x:Null}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundOver" Storyboard.TargetProperty="Opacity" To="1" />
                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundOver" Storyboard.TargetProperty="Opacity" To="0" />
                            </Storyboard>
                            <Storyboard x:Key="PressedOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity" To="1" />
                            </Storyboard>
                            <Storyboard x:Key="PressedOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity" To="0" />
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Grid>
                            <Rectangle x:Name="Background" Fill="{StaticResource VScrollbarBkgNormFill}" Stroke="{StaticResource ScrollbarBkgNormStroke}" StrokeThickness="1" RadiusX="0.5" RadiusY="0.5" Opacity="0" />
                            <Rectangle x:Name="BackgroundOver" Fill="{StaticResource VScrollbarBkgOverFill}" Stroke="{StaticResource TextBoxPressBrush}" StrokeThickness="1" RadiusX="0.5" RadiusY="0.5" Opacity="0"/>
                            <Rectangle x:Name="BackgroundPressed" Fill="{StaticResource VScrollbarBkgPressFill}" Stroke="{StaticResource btnPressStroke2}" StrokeThickness="1" RadiusX="0.5" RadiusY="0.5" Opacity="0"/>
                            <Rectangle x:Name="Highlight" Margin="1" Stroke="#99FFFFFF" StrokeThickness="1" RadiusX="0.5" RadiusY="0.5" Opacity="0" IsHitTestVisible="false"/>
                            <Rectangle x:Name="DisabledElement" Fill="#FFFFFFFF" Opacity="0"/>
                            <ContentPresenter HorizontalAlignment="Center" x:Name="ContentPresenter" VerticalAlignment="Center" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsKeyboardFocused" Value="true"/>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                                </Trigger.EnterActions>

                            </Trigger>
                            <Trigger Property="IsPressed" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOff}" x:Name="PressedOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOn}" x:Name="PressedOn_BeginStoryboard"/>
                                </Trigger.EnterActions>

                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">

                                <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
                                <Setter Property="Opacity" TargetName="DisabledElement" Value="0.7"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="NuclearThumbStyle" d:IsControlPart="True" TargetType="{x:Type Thumb}" BasedOn="{x:Null}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundOver" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BorderOver" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BorderOver1" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BorderOver2" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundOver" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BorderOver" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BorderOver1" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BorderOver2" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="PressedOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BorderPress" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BorderPress1" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BorderPress2" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="PressedOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BorderPress" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BorderPress1" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BorderPress2" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Grid Margin="0,0,0,0" x:Name="Grid">
                            <Rectangle x:Name="Background" Fill="{StaticResource VScrollbarBkgNormFill}" Stroke="{StaticResource ScrollbarBkgNormStroke}" RadiusX="1.5" RadiusY="1.5"/>
                            <Rectangle x:Name="BackgroundOver" Fill="{StaticResource VScrollbarBkgOverFill}" Stroke="{StaticResource TextBoxPressBrush}" RadiusX="1.5" RadiusY="1.5" Opacity="0"/>
                            <Rectangle x:Name="BackgroundPressed" Fill="{StaticResource VScrollbarBkgPressFill}" Stroke="{StaticResource btnPressStroke2}" RadiusX="1.5" RadiusY="1.5" Opacity="0"/>
                            <Rectangle x:Name="BorderHighlight" Width="11" Height="10" HorizontalAlignment="Center" VerticalAlignment="Center">
                                <Rectangle.Stroke>
                                    <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                        <GradientStop Color="#00FFFFFF" Offset="0"/>
                                        <GradientStop Color="#59FFFFFF" Offset="1"/>
                                    </LinearGradientBrush>
                                </Rectangle.Stroke>
                            </Rectangle>
                            <Border Margin="0,0,0,6" Width="9" Height="2" Background="{StaticResource VThumbDivetNormFill}" BorderBrush="{StaticResource VThumbDivetNormStroke}" BorderThickness="1,1,0,0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                            <Border Width="9" Height="2" Background="{StaticResource VThumbDivetNormFill}" BorderBrush="{StaticResource VThumbDivetNormStroke}" BorderThickness="1,1,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                            <Border Margin="0,0,0,-6" Width="9" Height="2" Background="{StaticResource VThumbDivetNormFill}" BorderBrush="{StaticResource VThumbDivetNormStroke}" BorderThickness="1,1,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                            <Border x:Name="BorderOver" Margin="0,0,0,6" Width="9" Height="2" Background="{StaticResource VThumbDivetOverFill}" BorderBrush="{StaticResource VThumbDivetOverStroke}" BorderThickness="1,1,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" Opacity="0"/>
                            <Border x:Name="BorderOver1" Width="9" Height="2" Background="{StaticResource VThumbDivetOverFill}" BorderBrush="{StaticResource VThumbDivetOverStroke}" BorderThickness="1,1,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0"/>
                            <Border x:Name="BorderOver2" Margin="0,0,0,-6" Width="9" Height="2" Background="{StaticResource VThumbDivetOverFill}" BorderBrush="{StaticResource VThumbDivetOverStroke}" BorderThickness="1,1,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" Opacity="0"/>
                            <Border x:Name="BorderPress" Margin="0,0,0,6" Width="9" Height="2" Background="{StaticResource VThumbDivetPressFill}" BorderBrush="{StaticResource VThumbDivetPressStroke}" BorderThickness="1,1,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0"/>
                            <Border x:Name="BorderPress1" Width="9" Height="2" Background="{StaticResource VThumbDivetPressFill}" BorderBrush="{StaticResource VThumbDivetPressStroke}" BorderThickness="1,1,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" Opacity="0"/>
                            <Border x:Name="BorderPress2" Margin="0,0,0,-6" Width="9" Height="2" Background="{StaticResource VThumbDivetPressFill}" BorderBrush="{StaticResource VThumbDivetPressStroke}" BorderThickness="1,1,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" Opacity="0"/>
                            <Rectangle x:Name="Highlight" Margin="1" Stroke="#FFFFFFFF" RadiusX="0.5" RadiusY="0.5" Opacity="0.6" IsHitTestVisible="false" />
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True"/>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter Property="Opacity" TargetName="Grid" Value="0"/>
                            </Trigger>
                            <Trigger Property="IsDragging" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOff}" x:Name="PressedOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOn}" x:Name="PressedOn_BeginStoryboard"/>
                                </Trigger.EnterActions>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="NuclearScrollRepeatButtonStyle" d:IsControlPart="True" TargetType="{x:Type RepeatButton}">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="BorderBrush" Value="Transparent"/>
            <Setter Property="IsTabStop" Value="false"/>
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                        <Grid>
                            <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>


        <Style TargetType="{x:Type ScrollBar}">
            <Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ScrollBar}">
                        <Grid x:Name="GridRoot" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
                            <Grid.RowDefinitions>
                                <RowDefinition MaxHeight="18"/>
                                <RowDefinition Height="0.00001*"/>
                                <RowDefinition MaxHeight="18"/>
                            </Grid.RowDefinitions>
                            <Rectangle Grid.RowSpan="5" RadiusX="0" RadiusY="0" StrokeThickness="1" Stroke="#FFF0F0F0" Fill="#FFEFEFEF"/>
                            <RepeatButton x:Name="DecreaseRepeat" Style="{DynamicResource NuclearRepeatButton}" Command="ScrollBar.LineUpCommand">
                                <Grid>
                                    <Path x:Name="ArrowUp" Height="6" Width="10" Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z " HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Uniform" IsHitTestVisible="False">
                                        <Path.Fill>
                                            <LinearGradientBrush EndPoint="0.7,0.75" StartPoint="0.25,0">
                                                <GradientStop Color="#CC000000" Offset="0.25"/>
                                                <GradientStop Color="#7F000000" Offset="0.75"/>
                                                <GradientStop Color="#33000000" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Path.Fill>
                                    </Path>
                                </Grid>
                            </RepeatButton>

                            <Track Grid.Row="1" x:Name="PART_Track" Orientation="Vertical" IsDirectionReversed="true">
                                <Track.Thumb>
                                    <Thumb Style="{DynamicResource NuclearThumbStyle}"/>
                                </Track.Thumb>
                                <Track.IncreaseRepeatButton>
                                    <RepeatButton x:Name="PageUp" Style="{DynamicResource NuclearScrollRepeatButtonStyle}" Command="ScrollBar.PageDownCommand"/>
                                </Track.IncreaseRepeatButton>
                                <Track.DecreaseRepeatButton>
                                    <RepeatButton x:Name="PageDown" Style="{DynamicResource NuclearScrollRepeatButtonStyle}" Command="ScrollBar.PageUpCommand"/>
                                </Track.DecreaseRepeatButton>
                            </Track>

                            <RepeatButton Grid.Row="2" x:Name="IncreaseRepeat" Style="{DynamicResource NuclearRepeatButton}" Command="ScrollBar.LineDownCommand">
                                <Grid>
                                    <Path x:Name="ArrowDown" Grid.Row="4" Height="6" Width="10" Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z " HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Uniform" IsHitTestVisible="False">
                                        <Path.Fill>
                                            <LinearGradientBrush EndPoint="0.4,1" StartPoint="-0.3,0">
                                                <GradientStop Color="#CC000000" Offset="0.25"/>
                                                <GradientStop Color="#7F000000" Offset="0.75"/>
                                                <GradientStop Color="#33000000" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Path.Fill>
                                    </Path>
                                </Grid>
                            </RepeatButton>
                        </Grid>

                        <ControlTemplate.Triggers>
                            <Trigger Property="Orientation" Value="Horizontal">

                                <Setter Property="LayoutTransform" TargetName="GridRoot">
                                    <Setter.Value>
                                        <RotateTransform Angle="-90"/>
                                    </Setter.Value>
                                </Setter>

                                <Setter TargetName="PART_Track" Property="Orientation" Value="Vertical"/>

                                <Setter Property="Command" Value="ScrollBar.LineLeftCommand" TargetName="DecreaseRepeat"/>
                                <Setter Property="Command" Value="ScrollBar.LineRightCommand" TargetName="IncreaseRepeat"/>
                                <Setter Property="Command" Value="ScrollBar.PageLeftCommand" TargetName="PageDown"/>
                                <Setter Property="Command" Value="ScrollBar.PageRightCommand" TargetName="PageUp"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="{x:Type ScrollViewer}" BasedOn="{x:Null}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ScrollViewer}">
                        <Grid Background="{TemplateBinding Background}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <ScrollContentPresenter Grid.Column="0" Grid.Row="0" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" CanContentScroll="{TemplateBinding CanContentScroll}"/>

                            <ScrollBar Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Grid.Column="0" Grid.Row="1" x:Name="PART_HorizontalScrollBar"   Orientation="Horizontal" Value="{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}" Minimum="0" Maximum="{TemplateBinding ScrollableWidth}" AutomationProperties.AutomationId="HorizontalScrollBar"/>
                            <ScrollBar Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Grid.Column="1" Grid.Row="0" x:Name="PART_VerticalScrollBar"   Orientation="Vertical" Value="{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}" Minimum="0" Maximum="{TemplateBinding ScrollableHeight}" AutomationProperties.AutomationId="VerticalScrollBar"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="{x:Type ListBox}">
            <Setter Property="SnapsToDevicePixels" Value="true"/>
            <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
            <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
            <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="BorderBrush" Value="{StaticResource btnPressStroke2}"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Padding" Value="1"/>
            <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListBox}">
                        <Grid>
                            <Border BorderThickness="{TemplateBinding BorderThickness}" Background="#FFFFFFFF" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="2">
                                <ScrollViewer Margin="1"   Focusable="false" Background="{TemplateBinding Background}">

                                    <StackPanel Margin="2" IsItemsHost="true"/>

                                </ScrollViewer>
                            </Border>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="false"/>
                            <Trigger Property="IsGrouping" Value="true">
                                <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>


        <Style d:IsControlPart="True" TargetType="{x:Type ListBoxItem}">
            <Setter Property="SnapsToDevicePixels" Value="true"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="Padding" Value="3" />
            <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListBoxItem}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundGradientOver" Storyboard.TargetProperty="Opacity" To="0.73"/>
                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundGradientOver" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="SelectedOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundGradientSelected" Storyboard.TargetProperty="Opacity" To="0.84"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundGradientSelectedDisabled" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="SelectedOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundGradientSelected" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundGradientSelectedDisabled" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Grid SnapsToDevicePixels="true">
                            <Rectangle x:Name="BackgroundGradientOver" Fill="{StaticResource hoverGradient}" Stroke="{StaticResource hoverStroke}" RadiusX="2" RadiusY="2" Opacity="0"/>
                            <Rectangle x:Name="BackgroundGradientSelectedDisabled" Fill="{StaticResource grayGradient}" Stroke="#7F8E8F8F" RadiusX="2" RadiusY="2" Opacity="0"/>
                            <Rectangle x:Name="BackgroundGradientSelected" Fill="{StaticResource BtnOverFill}" Stroke="{StaticResource selectedStroke}" RadiusX="2" RadiusY="2" Opacity="0"/>
                            <Rectangle x:Name="BackgroundHighlight" Margin="1" Stroke="#A0FFFFFF" RadiusX="1" RadiusY="1"/>
                            <ContentPresenter
	                        	x:Name="contentPresenter"
	                        	Content="{TemplateBinding Content}"
	                        	ContentTemplate="{TemplateBinding ContentTemplate}"
	                        	HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
	                        	Margin="{TemplateBinding Padding}"/>
                        </Grid>
                        <ControlTemplate.Triggers>

                            <Trigger Property="IsSelected" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource SelectedOff}" x:Name="SelectedOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource SelectedOn}" x:Name="SelectedOn_BeginStoryboard"/>
                                </Trigger.EnterActions>

                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                                </Trigger.EnterActions>
                            </Trigger>

                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
                                <Setter Property="Visibility" TargetName="BackgroundGradientSelected" Value="Hidden"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="ExpanderHeaderFocusVisual">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Border>
                            <Rectangle SnapsToDevicePixels="true" Margin="0" Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" />
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="ExpanderDownHeaderStyle" TargetType="{x:Type ToggleButton}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ToggleButton}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circleOver1" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circleOver2" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circleOver3" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="HoverBackground" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circleOver1" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circleOver2" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circleOver3" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="HoverBackground" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="PressedOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circlePress1" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circlePress2" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circlePress3" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="HoverBackground1" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="PressedOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circlePress1" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circlePress2" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circlePress3" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="HoverBackground1" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="CheckedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.1000000" Duration="00:00:00.0010000" Storyboard.TargetName="arrowDown" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="-1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.1000000" Duration="00:00:00.0010000" Storyboard.TargetName="HoverBackground2" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="-1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="CheckedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.4000000" Duration="00:00:00.0010000" Storyboard.TargetName="arrowDown" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.4000000" Duration="00:00:00.0010000" Storyboard.TargetName="HoverBackground2" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusBackground" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.84"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusBackground" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Grid>
                            <Rectangle x:Name="HoverBackground" Fill="{StaticResource hoverGradient}" Stroke="{StaticResource hoverStroke}" RadiusX="2" RadiusY="2" Opacity="0" RenderTransformOrigin="0.5,0.5">
                                <Rectangle.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Rectangle.RenderTransform>
                            </Rectangle>
                            <Rectangle x:Name="HoverBackground1" Fill="{StaticResource hoverGradient}" Stroke="{StaticResource hoverStroke}" RadiusX="2" RadiusY="2" Opacity="0" RenderTransformOrigin="0.5,0.5">
                                <Rectangle.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Rectangle.RenderTransform>
                            </Rectangle>
                            <Rectangle x:Name="HoverBackground2" Fill="{StaticResource hoverGradient}" Stroke="{StaticResource hoverStroke}" RadiusX="2" RadiusY="2" Opacity="0" RenderTransformOrigin="0.5,0.5">
                                <Rectangle.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Rectangle.RenderTransform>
                            </Rectangle>
                            <Grid Margin="{TemplateBinding Padding}">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="18"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
                                <Grid Height="18" HorizontalAlignment="Left" VerticalAlignment="Top">
                                    <Ellipse x:Name="circleOver1" Height="18" Width="18" Fill="{StaticResource ExpanderArrowHoverFill1}" Stroke="#00000000" Opacity="0"/>
                                    <Ellipse x:Name="circleOver2" Height="18" Width="18" Fill="{StaticResource ExpanderArrowHoverFill2}" Stroke="#00000000" Opacity="0"/>
                                    <Ellipse x:Name="circleOver3" Height="18" Width="18" Fill="{StaticResource ExpanderArrowHoverFill3}" Stroke="{StaticResource expanderArrowStroke}" Opacity="0"/>
                                    <Ellipse x:Name="circlePress1" Height="18" Width="18" Fill="{StaticResource ExpanderArrowPressedFill1}" Stroke="#00000000" Opacity="0"/>
                                    <Ellipse x:Name="circlePress2" Height="18" Width="18" Fill="{StaticResource ExpanderArrowPressedFill2}" Stroke="#00000000" Opacity="0"/>
                                    <Ellipse x:Name="circlePress3" Height="18" Width="18" Fill="{StaticResource ExpanderArrowPressedFill3}" Stroke="{StaticResource expanderArrowStroke}" Opacity="0"/>
                                    <Path x:Name="arrowDown" Stroke="{StaticResource ButtonFontColor}" StrokeThickness="2" Data="M 1,1.5 L 4.5,5 L 8,1.5" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform/>
                                                <SkewTransform/>
                                                <RotateTransform/>
                                                <TranslateTransform/>
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                </Grid>
                                <ContentPresenter x:Name="header" Margin="4,0,0,0" Grid.Column="1" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="Left" VerticalAlignment="Center" IsHitTestVisible="false"/>
                            </Grid>
                            <Rectangle x:Name="FocusBackground" Stroke="{StaticResource selectedStroke}" RadiusX="2" RadiusY="2" IsHitTestVisible="false" Opacity="0"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource FocusedOff}" x:Name="FocusedOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource FocusedOn}" x:Name="FocusedOn_BeginStoryboard"/>
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="IsChecked" Value="true">

                                <Trigger.ExitActions>
                                    <BeginStoryboard x:Name="CheckedOff_BeginStoryboard" Storyboard="{StaticResource CheckedOff}"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard x:Name="CheckedOn_BeginStoryboard" Storyboard="{StaticResource CheckedOn}"/>
                                </Trigger.EnterActions>

                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                                </Trigger.EnterActions>


                            </Trigger>
                            <Trigger Property="IsPressed" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOff}" x:Name="PressedOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOn}" x:Name="PressedOn_BeginStoryboard"/>
                                </Trigger.EnterActions>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="ExpanderRightHeaderStyle" TargetType="{x:Type ToggleButton}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ToggleButton}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circleOver1" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circleOver2" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circleOver3" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="HoverBackground" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circleOver1" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circleOver2" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circleOver3" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="HoverBackground" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="PressedOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circlePress1" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circlePress2" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circlePress3" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="HoverBackground1" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="PressedOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circlePress1" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circlePress2" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circlePress3" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="HoverBackground1" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="CheckedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.1000000" Storyboard.TargetName="arrowRight" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="90"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.1000000" Storyboard.TargetName="HoverBackground2" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="-1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="CheckedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.4000000" Storyboard.TargetName="arrowRight" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="-90"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.4000000" Storyboard.TargetName="HoverBackground2" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusBackground" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.84"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusBackground" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Grid>
                            <Rectangle x:Name="HoverBackground" Fill="{StaticResource hoverGradientVertical}" Stroke="{StaticResource hoverStroke}" RadiusX="2" RadiusY="2" Opacity="0" RenderTransformOrigin="0.5,0.5">
                                <Rectangle.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Rectangle.RenderTransform>
                            </Rectangle>

                            <Rectangle x:Name="HoverBackground1" Fill="{StaticResource hoverGradientVertical}" Stroke="{StaticResource hoverStroke}" RadiusX="2" RadiusY="2" Opacity="0" RenderTransformOrigin="0.5,0.5">
                                <Rectangle.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Rectangle.RenderTransform>
                            </Rectangle>

                            <Rectangle x:Name="HoverBackground2" Fill="{StaticResource hoverGradientVertical}" Stroke="{StaticResource hoverStroke}" RadiusX="2" RadiusY="2" Opacity="0" RenderTransformOrigin="0.5,0.5">
                                <Rectangle.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Rectangle.RenderTransform>
                            </Rectangle>



                            <Grid SnapsToDevicePixels="False" Background="Transparent">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="18"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <Grid>
                                    <Grid.LayoutTransform>
                                        <TransformGroup>
                                            <ScaleTransform ScaleX="1" ScaleY="1"/>
                                            <SkewTransform AngleX="0" AngleY="0"/>
                                            <RotateTransform Angle="0"/>
                                            <TranslateTransform X="0" Y="0"/>
                                        </TransformGroup>
                                    </Grid.LayoutTransform>
                                    <Ellipse x:Name="circleOver1" Width="18" Height="18" Fill="{StaticResource ExpanderArrowHoverFill1}" Stroke="#00000000" Opacity="0"/>
                                    <Ellipse x:Name="circleOver2" Width="18" Height="18" Fill="{StaticResource ExpanderArrowHoverFill2}" Stroke="#00000000" Opacity="0"/>
                                    <Ellipse x:Name="circleOver3" Width="18" Height="18" Fill="{StaticResource ExpanderArrowHoverFill3}" Stroke="{StaticResource expanderArrowStroke}" Opacity="0"/>
                                    <Ellipse x:Name="circlePress1" Width="18" Height="18" Fill="{StaticResource ExpanderArrowPressedFill1}" Stroke="#00000000" Opacity="0"/>
                                    <Ellipse x:Name="circlePress2" Width="18" Height="18" Fill="{StaticResource ExpanderArrowPressedFill2}" Stroke="#00000000" Opacity="0"/>
                                    <Ellipse x:Name="circlePress3" Width="18" Height="18" Fill="{StaticResource ExpanderArrowPressedFill3}" Stroke="{StaticResource expanderArrowStroke}" Opacity="0"/>
                                    <Path x:Name="arrowRight" Stroke="{StaticResource ButtonFontColor}" StrokeThickness="2" Data="M 1,1.5 L 4.5,5 L 8,1.5" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform/>
                                                <SkewTransform/>
                                                <RotateTransform Angle="-90"/>
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                </Grid>
                                <ContentPresenter SnapsToDevicePixels="True" HorizontalAlignment="Center" Margin="6,4,6,0" VerticalAlignment="Top" Grid.Row="1" RecognizesAccessKey="True">
                                    <ContentPresenter.LayoutTransform>
                                        <TransformGroup>
                                            <TransformGroup.Children>
                                                <TransformCollection>
                                                    <RotateTransform Angle="-90" />
                                                </TransformCollection>
                                            </TransformGroup.Children>
                                        </TransformGroup>
                                    </ContentPresenter.LayoutTransform>
                                </ContentPresenter>
                                <Rectangle x:Name="FocusBackground" Stroke="{StaticResource selectedStroke}" RadiusX="2" RadiusY="2" IsHitTestVisible="false" Opacity="0" Grid.RowSpan="2" />
                            </Grid>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource FocusedOff}" />
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource FocusedOn}" />
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="IsChecked" Value="true">

                                <Trigger.ExitActions>
                                    <BeginStoryboard x:Name="CheckedOff_BeginStoryboard" Storyboard="{StaticResource CheckedOff}"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard x:Name="CheckedOn_BeginStoryboard" Storyboard="{StaticResource CheckedOn}"/>
                                </Trigger.EnterActions>

                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}" x:Name="HoverOn_BeginStoryboard"/>
                                </Trigger.EnterActions>


                            </Trigger>
                            <Trigger Property="IsPressed" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOff}" x:Name="PressedOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOn}" x:Name="PressedOn_BeginStoryboard"/>
                                </Trigger.EnterActions>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ExpanderUpHeaderStyle" TargetType="{x:Type ToggleButton}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ToggleButton}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circleOver1" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circleOver2" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circleOver3" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="HoverBackground" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circleOver1" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circleOver2" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circleOver3" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="HoverBackground" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="PressedOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circlePress1" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circlePress2" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circlePress3" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="HoverBackground1" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="PressedOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circlePress1" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circlePress2" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circlePress3" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="HoverBackground1" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="CheckedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="arrowUp" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="-1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HoverBackground2" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="CheckedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="arrowUp" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HoverBackground2" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusBackground" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.84"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusBackground" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Grid>
                            <Rectangle x:Name="HoverBackground" Fill="{StaticResource hoverGradient}" Stroke="{StaticResource hoverStroke}" RadiusX="2" RadiusY="2" Opacity="0" RenderTransformOrigin="0.5,0.5">
                                <Rectangle.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleY="-1"/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Rectangle.RenderTransform>
                            </Rectangle>
                            <Rectangle x:Name="HoverBackground1" Fill="{StaticResource hoverGradient}" Stroke="{StaticResource hoverStroke}" RadiusX="2" RadiusY="2" Opacity="0" RenderTransformOrigin="0.5,0.5">
                                <Rectangle.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleY="-1"/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Rectangle.RenderTransform>
                            </Rectangle>
                            <Rectangle x:Name="HoverBackground2" Fill="{StaticResource hoverGradient}" Stroke="{StaticResource hoverStroke}" RadiusX="2" RadiusY="2" Opacity="0" RenderTransformOrigin="0.5,0.5">
                                <Rectangle.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleY="-1"/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Rectangle.RenderTransform>
                            </Rectangle>
                            <Grid Margin="{TemplateBinding Padding}">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="18"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
                                <Grid Height="18" HorizontalAlignment="Left" VerticalAlignment="Top">
                                    <Grid.LayoutTransform>
                                        <TransformGroup>
                                            <TransformGroup.Children>
                                                <TransformCollection>
                                                    <RotateTransform Angle="180" />
                                                </TransformCollection>
                                            </TransformGroup.Children>
                                        </TransformGroup>
                                    </Grid.LayoutTransform>
                                    <Ellipse x:Name="circleOver1" Width="18" Height="18" Fill="{StaticResource ExpanderArrowHoverFill1}" Stroke="#00000000" Opacity="0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                    <Ellipse x:Name="circleOver2" Width="18" Height="18" Fill="{StaticResource ExpanderArrowHoverFill2}" Stroke="#00000000" Opacity="0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                    <Ellipse x:Name="circleOver3" Width="18" Height="18" Fill="{StaticResource ExpanderArrowHoverFill3}" Stroke="{StaticResource expanderArrowStroke}" Opacity="0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                    <Ellipse x:Name="circlePress1" Width="18" Height="18" Fill="{StaticResource ExpanderArrowPressedFill1}" Stroke="#00000000" Opacity="0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                    <Ellipse x:Name="circlePress2" Width="18" Height="18" Fill="{StaticResource ExpanderArrowPressedFill2}" Stroke="#00000000" Opacity="0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                    <Ellipse x:Name="circlePress3" Width="18" Height="18" Fill="{StaticResource ExpanderArrowPressedFill3}" Stroke="{StaticResource expanderArrowStroke}" Opacity="0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                    <Path x:Name="arrowUp" Stroke="{StaticResource ButtonFontColor}" StrokeThickness="2" Data="M 1,1.5 L 4.5,5 L 8,1.5" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform ScaleY="-1"/>
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                </Grid>
                                <ContentPresenter SnapsToDevicePixels="True" HorizontalAlignment="Left" Margin="4,2,0,2" VerticalAlignment="Center" Grid.Column="1" RecognizesAccessKey="True" />
                            </Grid>
                            <Rectangle x:Name="FocusBackground" Stroke="{StaticResource selectedStroke}" RadiusX="2" RadiusY="2" IsHitTestVisible="false" Opacity="0"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource FocusedOff}" />
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource FocusedOn}" />
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="IsChecked" Value="true">

                                <Trigger.ExitActions>
                                    <BeginStoryboard x:Name="CheckedOff_BeginStoryboard" Storyboard="{StaticResource CheckedOff}"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard x:Name="CheckedOn_BeginStoryboard" Storyboard="{StaticResource CheckedOn}"/>
                                </Trigger.EnterActions>

                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}" x:Name="HoverOn_BeginStoryboard"/>
                                </Trigger.EnterActions>


                            </Trigger>
                            <Trigger Property="IsPressed" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOff}" x:Name="PressedOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOn}" x:Name="PressedOn_BeginStoryboard"/>
                                </Trigger.EnterActions>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ExpanderLeftHeaderStyle" TargetType="{x:Type ToggleButton}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ToggleButton}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circleOver1" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circleOver2" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circleOver3" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="HoverBackground" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circleOver1" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circleOver2" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circleOver3" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="HoverBackground" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="PressedOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circlePress1" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circlePress2" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="circlePress3" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="HoverBackground1" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="PressedOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circlePress1" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circlePress2" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="circlePress3" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="HoverBackground1" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="CheckedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="arrowLeft" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="-1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="arrowLeft" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="-90"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HoverBackground2" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="CheckedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="arrowLeft" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="arrowLeft" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="90"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HoverBackground2" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusBackground" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.84"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusBackground" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Grid>
                            <Rectangle x:Name="HoverBackground" Fill="{StaticResource hoverGradientVertical}" Stroke="{StaticResource hoverStroke}" RadiusX="2" RadiusY="2" Opacity="0" RenderTransformOrigin="0.5,0.5">
                                <Rectangle.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="-1"/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Rectangle.RenderTransform>
                            </Rectangle>
                            <Rectangle x:Name="HoverBackground1" Fill="{StaticResource hoverGradientVertical}" Stroke="{StaticResource hoverStroke}" RadiusX="2" RadiusY="2" Opacity="0" RenderTransformOrigin="0.5,0.5">
                                <Rectangle.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="-1"/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Rectangle.RenderTransform>
                            </Rectangle>
                            <Rectangle x:Name="HoverBackground2" Fill="{StaticResource hoverGradientVertical}" Stroke="{StaticResource hoverStroke}" RadiusX="2" RadiusY="2" Opacity="0" RenderTransformOrigin="0.5,0.5">
                                <Rectangle.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="-1"/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Rectangle.RenderTransform>
                            </Rectangle>
                            <Grid Margin="{TemplateBinding Padding}">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="18"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <Grid Width="18" HorizontalAlignment="Center" VerticalAlignment="Top">
                                    <Grid.LayoutTransform>
                                        <TransformGroup>
                                            <ScaleTransform ScaleX="1" ScaleY="1"/>
                                            <SkewTransform AngleX="0" AngleY="0"/>
                                            <RotateTransform Angle="0"/>
                                            <TranslateTransform X="0" Y="0"/>
                                        </TransformGroup>
                                    </Grid.LayoutTransform>
                                    <Ellipse x:Name="circleOver1" Width="18" Height="18" Fill="{StaticResource ExpanderArrowHoverFill1}" Stroke="#00000000" Opacity="0"/>
                                    <Ellipse x:Name="circleOver2" Width="18" Height="18" Fill="{StaticResource ExpanderArrowHoverFill2}" Stroke="#00000000" Opacity="0"/>
                                    <Ellipse x:Name="circleOver3" Width="18" Height="18" Fill="{StaticResource ExpanderArrowHoverFill3}" Stroke="{StaticResource expanderArrowStroke}" Opacity="0"/>
                                    <Ellipse x:Name="circlePress1" Width="18" Height="18" Fill="{StaticResource ExpanderArrowPressedFill1}" Stroke="#00000000" Opacity="0"/>
                                    <Ellipse x:Name="circlePress2" Width="18" Height="18" Fill="{StaticResource ExpanderArrowPressedFill2}" Stroke="#00000000" Opacity="0"/>
                                    <Ellipse x:Name="circlePress3" Width="18" Height="18" Fill="{StaticResource ExpanderArrowPressedFill3}" Stroke="{StaticResource expanderArrowStroke}" Opacity="0"/>
                                    <Path x:Name="arrowLeft" Stroke="{StaticResource ButtonFontColor}" StrokeThickness="2" Data="M 1,1.5 L 4.5,5 L 8,1.5" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform/>
                                                <SkewTransform/>
                                                <RotateTransform Angle="90"/>
                                                <TranslateTransform/>
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                </Grid>
                                <ContentPresenter SnapsToDevicePixels="True" HorizontalAlignment="Center" Margin="3,4,3,0" VerticalAlignment="Top" Grid.Row="1" RecognizesAccessKey="True">
                                    <ContentPresenter.LayoutTransform>
                                        <TransformGroup>
                                            <TransformGroup.Children>
                                                <TransformCollection>
                                                    <RotateTransform Angle="90" />
                                                </TransformCollection>
                                            </TransformGroup.Children>
                                        </TransformGroup>
                                    </ContentPresenter.LayoutTransform>
                                </ContentPresenter>
                            </Grid>
                            <Rectangle x:Name="FocusBackground" Stroke="{StaticResource selectedStroke}" RadiusX="2" RadiusY="2" IsHitTestVisible="false" Opacity="0"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource FocusedOff}" />
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource FocusedOn}" />
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="IsChecked" Value="true">

                                <Trigger.ExitActions>
                                    <BeginStoryboard x:Name="CheckedOff_BeginStoryboard" Storyboard="{StaticResource CheckedOff}"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard x:Name="CheckedOn_BeginStoryboard" Storyboard="{StaticResource CheckedOn}"/>
                                </Trigger.EnterActions>

                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}" x:Name="HoverOn_BeginStoryboard"/>
                                </Trigger.EnterActions>


                            </Trigger>
                            <Trigger Property="IsPressed" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOff}" x:Name="PressedOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOn}" x:Name="PressedOn_BeginStoryboard"/>
                                </Trigger.EnterActions>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="{x:Type Expander}">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="Foreground" Value="{StaticResource ButtonFontColor}"/>
            <Setter Property="FontWeight" Value="Bold"/>
            <Setter Property="Padding" Value="4"/>
            <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 SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,1" CornerRadius="3">
                            <Grid>
                                <DockPanel>
                                    <ToggleButton FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontStretch="{TemplateBinding FontStretch}" FontStyle="{TemplateBinding FontStyle}" FontWeight="{TemplateBinding FontWeight}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}" Margin="1,1,1,0" MinHeight="0" MinWidth="0" x:Name="HeaderSite" Style="{StaticResource ExpanderDownHeaderStyle}" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" DockPanel.Dock="Top" />
                                    <Border x:Name="border" Grid.Column="0" Grid.Row="1" Background="#FFFFFFFF" BorderThickness="1" CornerRadius="2" Padding="0" Visibility="Collapsed">
                                        <Border.BorderBrush>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="#FFABAEB3" Offset="0"/>
                                                <GradientStop Color="#FFE2E8EE" Offset="0.355"/>
                                            </LinearGradientBrush>
                                        </Border.BorderBrush>
                                        <ContentPresenter Focusable="false" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="1,1,1,1" x:Name="ExpandSite" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" DockPanel.Dock="Bottom" />
                                    </Border>
                                </DockPanel>
                                <Border x:Name="DisabledVisualElement" IsHitTestVisible="false" Background="#A5FFFFFF" Opacity="0"/>
                                <Border x:Name="FocusVisualElement" IsHitTestVisible="false" BorderBrush="#00FFFFFF" BorderThickness="1" Visibility="Collapsed"/>
                            </Grid>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsExpanded" Value="true">
                                <Setter Property="Visibility" TargetName="border" Value="Visible" />
                            </Trigger>
                            <Trigger Property="ExpandDirection" Value="Down" />
                            <Trigger Property="ExpandDirection" Value="Right">
                                <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Right" />
                                <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Left" />
                                <Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderRightHeaderStyle}" />
                            </Trigger>
                            <Trigger Property="ExpandDirection" Value="Up">
                                <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Top" />
                                <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Bottom" />
                                <Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderUpHeaderStyle}" />
                            </Trigger>
                            <Trigger Property="ExpandDirection" Value="Left">
                                <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Left" />
                                <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Right" />
                                <Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderLeftHeaderStyle}" />
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                                <Setter Property="Opacity" TargetName="DisabledVisualElement" Value="1"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
            <ControlTemplate.Resources>
                <Storyboard x:Key="HoverOn">
                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BtnOver" Storyboard.TargetProperty="Opacity" To="0.8"/>
                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Background_over" Storyboard.TargetProperty="Opacity" To="1"/>
                </Storyboard>
                <Storyboard x:Key="HoverOff">
                    <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BtnOver" Storyboard.TargetProperty="Opacity" To="0"/>
                    <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="Background_over" Storyboard.TargetProperty="Opacity" To="0"/>
                </Storyboard>
                <Storyboard x:Key="PressedOn">
                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BtnPress" Storyboard.TargetProperty="Opacity" To="0.8"/>
                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Background_press" Storyboard.TargetProperty="Opacity" To="1"/>
                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BtnPress_highlight" Storyboard.TargetProperty="Opacity" To="1"/>
                </Storyboard>
                <Storyboard x:Key="PressedOff">
                    <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BtnPress" Storyboard.TargetProperty="Opacity" To="0"/>
                    <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="Background_press" Storyboard.TargetProperty="Opacity" To="0"/>
                    <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BtnPress_highlight" Storyboard.TargetProperty="Opacity" To="0"/>
                </Storyboard>
            </ControlTemplate.Resources>
            <Grid>
                <Rectangle x:Name="Background" Fill="#FFFFFFFF" Stroke="#FFABAEB3" RadiusX="3" RadiusY="3" IsHitTestVisible="false"/>
                <Rectangle x:Name="Background_over" Stroke="{StaticResource TextBoxOverBrush}" RadiusX="3" RadiusY="3" Opacity="0" IsHitTestVisible="false"/>
                <Rectangle x:Name="Background_press" Stroke="{StaticResource TextBoxPressBrush}" RadiusX="3" RadiusY="3" Opacity="0" IsHitTestVisible="false"/>
                <Border x:Name="BtnOver" Width="20" Background="{StaticResource BtnOverFill}" BorderBrush="{StaticResource TextBoxPressBrush}" BorderThickness="1" CornerRadius="0,3,3,0" Opacity="0" HorizontalAlignment="Right"/>
                <Border x:Name="BtnPress" Width="20" Background="{StaticResource BtnPressFill}" BorderBrush="{StaticResource btnPressStroke1}" BorderThickness="1" CornerRadius="0,3,3,0" Opacity="0" HorizontalAlignment="Right"/>
                <Border x:Name="BtnPress_highlight" Background="{StaticResource ComboTogglePressHighlight}" Margin="1" Width="18" CornerRadius="0,2,2,0" Opacity="0" HorizontalAlignment="Right"/>
                <Border x:Name="BtnOverlay" Margin="1" Width="18" CornerRadius="0,2,2,0" HorizontalAlignment="Right">
                    <Border.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#00FFFFFF"/>
                            <GradientStop Color="#72FFFFFF" Offset="0.189"/>
                            <GradientStop Color="#72FFFFFF" Offset="0.5"/>
                            <GradientStop Color="#00FFFFFF" Offset="0.51"/>
                        </LinearGradientBrush>
                    </Border.Background>
                </Border>
                <Path x:Name="BtnArrow" Margin="0,0,7,0" Width="6" Data="F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z " HorizontalAlignment="Right" Stretch="Uniform">
                    <Path.Fill>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="{StaticResource Arrow}" Offset="0"/>
                            <GradientStop Color="#FF000000" Offset="1"/>
                        </LinearGradientBrush>
                    </Path.Fill>
                </Path>
                <Rectangle x:Name="DisabledVisualElement" Margin="1" Fill="#00FFFFFF" RadiusX="3" RadiusY="3" IsHitTestVisible="false" Visibility="Collapsed"/>
            </Grid>
            <ControlTemplate.Triggers>
                <Trigger Property="IsMouseOver" Value="true">
                    <Trigger.ExitActions>
                        <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                    </Trigger.ExitActions>
                    <Trigger.EnterActions>
                        <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                    </Trigger.EnterActions>

                </Trigger>
                <Trigger Property="IsChecked" Value="true"/>
                <Trigger Property="IsPressed" Value="True">
                    <Trigger.ExitActions>
                        <BeginStoryboard Storyboard="{StaticResource PressedOff}" x:Name="PressedOff_BeginStoryboard"/>
                    </Trigger.ExitActions>
                    <Trigger.EnterActions>
                        <BeginStoryboard Storyboard="{StaticResource PressedOn}" x:Name="PressedOn_BeginStoryboard"/>
                    </Trigger.EnterActions>
                </Trigger>
                <Trigger Property="IsEnabled" Value="False">
                    <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
                    <Setter Property="Visibility" TargetName="DisabledVisualElement" Value="Visible"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>


        <ControlTemplate x:Key="ComboBoxTextBox" TargetType="{x:Type TextBox}">
            <Border x:Name="PART_ContentHost" Focusable="False" Background="{TemplateBinding Background}"/>
        </ControlTemplate>


        <Style TargetType="{x:Type ComboBox}">
            <Setter Property="SnapsToDevicePixels" Value="true"/>
            <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
<Setter Property="Template" Value="{DynamicResource ComboBoxTemplate}" />
        </Style>
    
    <ControlTemplate x:Key="ComboBoxTemplate" TargetType="{x:Type ComboBox}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="FocusedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Grid>
                            <ToggleButton Grid.Column="2" Template="{DynamicResource ComboBoxToggleButton}" x:Name="ToggleButton" Focusable="false" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"/>
                            <ContentPresenter HorizontalAlignment="Left" Margin="3,3,23,3" x:Name="ContentSite" VerticalAlignment="Center" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" IsHitTestVisible="False"/>

                            <TextBox Visibility="Hidden" Template="{DynamicResource ComboBoxTextBox}" HorizontalAlignment="Left" Margin="3,3,23,3" x:Name="PART_EditableTextBox" Style="{x:Null}" VerticalAlignment="Center" Focusable="True" Background="Transparent" IsReadOnly="{TemplateBinding IsReadOnly}"/>
                            <Rectangle x:Name="DisabledVisualElement" Fill="#A5FFFFFF" RadiusX="4" RadiusY="4" IsHitTestVisible="false" Visibility="Collapsed" />
                            <Rectangle x:Name="FocusVisualElement" Margin="-1" Stroke="{StaticResource selectedStroke}" StrokeThickness="1" RadiusX="4" RadiusY="4" IsHitTestVisible="false" Opacity="0"/>
                            <Popup IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" x:Name="Popup" Focusable="False" AllowsTransparency="True" PopupAnimation="Slide">
                                <Grid MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True">
                                    <Border x:Name="DropDownBorder" Background="#FFFFFFFF" BorderBrush="{StaticResource TextBoxNorm}" BorderThickness="1" CornerRadius="1,1,3,3">
                                        <ScrollViewer Margin="4,6,4,6"   SnapsToDevicePixels="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" CanContentScroll="True">

                                            <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained"/>

                                        </ScrollViewer>
                                    </Border>
                                </Grid>
                            </Popup>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource FocusedOff}" x:Name="FocusedOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource FocusedOn}"/>
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="HasItems" Value="false">
                                <Setter Property="MinHeight" Value="95" TargetName="DropDownBorder"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
                                <Setter Property="Visibility" TargetName="DisabledVisualElement" Value="Visible"/>
                            </Trigger>
                            <Trigger Property="IsGrouping" Value="true">
                                <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
                            </Trigger>
                            <Trigger Property="AllowsTransparency" SourceName="Popup" Value="true">
                                <Setter Property="CornerRadius" Value="4" TargetName="DropDownBorder"/>
                                <Setter Property="Margin" Value="0,2,0,0" TargetName="DropDownBorder"/>
                            </Trigger>
                            <Trigger Property="IsEditable" Value="true">
                                <Setter Property="IsTabStop" Value="false"/>
                                <Setter Property="Visibility" Value="Visible" TargetName="PART_EditableTextBox"/>
                                <Setter Property="Visibility" Value="Hidden" TargetName="ContentSite"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>

        <Style d:IsControlPart="True" TargetType="{x:Type ComboBoxItem}">
            <Setter Property="SnapsToDevicePixels" Value="true"/>
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="Padding" Value="3" />
            <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ComboBoxItem}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundGradientOver" Storyboard.TargetProperty="Opacity" To="0.73"/>
                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundGradientOver" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="SelectedOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundGradientSelected" Storyboard.TargetProperty="Opacity" To="0.84"/>
                            </Storyboard>
                            <Storyboard x:Key="SelectedOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundGradientSelected" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Grid SnapsToDevicePixels="true">
                            <Rectangle x:Name="BackgroundGradientOver" Fill="{StaticResource hoverGradient}" Stroke="{StaticResource hoverStroke}" RadiusX="2" RadiusY="2"  Opacity="0"/>
                            <Rectangle x:Name="BackgroundGradientSelected" Fill="{StaticResource BtnOverFill}" Stroke="{StaticResource selectedStroke}" RadiusX="2" RadiusY="2" Opacity="0"/>
                            <Rectangle x:Name="BackgroundHighlight" Margin="1" Stroke="#A0FFFFFF" RadiusX="1" RadiusY="1"/>
                            <ContentPresenter
	                        	x:Name="contentPresenter"
	                        	Content="{TemplateBinding Content}"
	                        	ContentTemplate="{TemplateBinding ContentTemplate}"
	                        	HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
	                        	Margin="{TemplateBinding Padding}"/>
                        </Grid>
                        <ControlTemplate.Triggers>

                            <Trigger Property="IsMouseOver" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}" x:Name="HoverOn_BeginStoryboard"/>
                                </Trigger.EnterActions>
                            </Trigger>

                            <Trigger Property="IsHighlighted" Value="true"/>
                            <Trigger Property="Selector.IsSelected" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource SelectedOff}" x:Name="SelectedOff_BeginStoryboard1"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource SelectedOn}" x:Name="SelectedOn_BeginStoryboard1"/>
                                </Trigger.EnterActions>
                            </Trigger>

                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="{x:Type ProgressBar}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ProgressBar}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="IndeterminateOn" RepeatBehavior="Forever">
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateGradientFill" Storyboard.TargetProperty="(Shape.Fill).(Brush.Transform).(TransformGroup.Children)[0].X" RepeatBehavior="Forever">
                                    <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:.5" Value="20"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Grid>

                            <Border x:Name="PART_Track" BorderThickness="1" CornerRadius="3" Opacity="0.825">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFFFFFFF"/>
                                        <GradientStop Color="#FFD8D8D8" Offset="0.327"/>
                                        <GradientStop Color="#FFDADADA" Offset="0.488"/>
                                        <GradientStop Color="#FFBEBEBE" Offset="0.539"/>
                                        <GradientStop Color="#FFD6D6D6" Offset="0.77"/>
                                        <GradientStop Color="#FFFFFFFF" Offset="1"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                                <Border.BorderBrush>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFBBBBBB" Offset="0"/>
                                        <GradientStop Color="#FF7E7E7E" Offset="1"/>
                                    </LinearGradientBrush>
                                </Border.BorderBrush>
                            </Border>
                            <Grid x:Name="IndeterminateRoot" Visibility="Collapsed">
                                <Rectangle x:Name="IndeterminateSolidFill" Margin="1" Fill="#FF00C120" RadiusX="2" RadiusY="2"/>
                                <Rectangle x:Name="ProgressBarRootGradient" Margin="1" RadiusX="1.5" RadiusY="1.5" Panel.ZIndex="1">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FFE8FFEC" Offset="0"/>
                                            <GradientStop Color="#84BDFFC9" Offset="0.516"/>
                                            <GradientStop Color="#00D6D6D6" Offset="0.521"/>
                                            <GradientStop Color="#FF7BFF94" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Rectangle x:Name="IndeterminateGradientFill" Margin="1" StrokeThickness="1" RadiusX="2" RadiusY="2" Opacity="0.7">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush EndPoint="0,1" StartPoint="20,1" MappingMode="Absolute" SpreadMethod="Repeat">
                                            <LinearGradientBrush.Transform>
                                                <TransformGroup>
                                                    <TranslateTransform X="0"/>
                                                    <SkewTransform AngleX="-10"/>
                                                </TransformGroup>
                                            </LinearGradientBrush.Transform>
                                            <GradientStop Color="#FF95FFA8" Offset="0.129"/>
                                            <GradientStop Color="#9159FF76" Offset="0.304"/>
                                            <GradientStop Color="#0007B324" Offset="0.498"/>
                                            <GradientStop Color="#8661FF7C" Offset="0.714"/>
                                            <GradientStop Color="#FF8BFFA1" Offset="0.949"/>
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                            </Grid>
                            <Grid x:Name="DeterminateRoot">
                                <Rectangle x:Name="PART_Indicator" Margin="1" RadiusX="1.5" RadiusY="1.5" HorizontalAlignment="Left" Opacity="0.83">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FFE4FFDA" Offset="0"/>
                                            <GradientStop Color="#FFBDF4C0" Offset="0.198"/>
                                            <GradientStop Color="#FF9CEBAB" Offset="0.516"/>
                                            <GradientStop Color="#FF00C523" Offset="0.521"/>
                                            <GradientStop Color="#FF00D724" Offset="0.797"/>
                                            <GradientStop Color="#FF10DC2E" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                            </Grid>
                            <Border x:Name="DisabledVisualElement" Background="#A5FFFFFF" BorderBrush="#59C0C0C0" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" IsHitTestVisible="False" Visibility="Collapsed"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter Property="Visibility" TargetName="DisabledVisualElement" Value="Visible"/>
                            </Trigger>
                            <Trigger Property="IsIndeterminate" Value="True">
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource IndeterminateOn}"/>
                                </Trigger.EnterActions>
                                <Setter Property="Visibility" TargetName="IndeterminateRoot" Value="Visible"/>
                                <Setter Property="Visibility" TargetName="DeterminateRoot" Value="Collapsed"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="{x:Type TextBox}">
            <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
            <Setter Property="AllowDrop" Value="true"/>
            <Setter Property="Background" Value="#FFFFFFFF"/>
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            <Setter Property="VerticalContentAlignment" Value="Stretch"/>
            <Setter Property="Padding" Value="4"/>
            <Setter Property="BorderThickness" Value="1"/>
<Setter Property="Template" Value="{DynamicResource TextBoxTemplate}" />
        </Style>
    
    <ControlTemplate x:Key="TextBoxTemplate" TargetType="{x:Type TextBox}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Over" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="Over" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>

                        </ControlTemplate.Resources>
                        <Grid>
                            <Border x:Name="BorderBase" Background="{TemplateBinding Background}" BorderBrush="{StaticResource TextBoxNorm}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3"/>
                            <Border x:Name="Over" BorderBrush="{StaticResource TextBoxOver}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" Opacity="0"/>
                            <ScrollViewer Margin="0" x:Name="PART_ContentHost" Padding="{TemplateBinding Padding}" />
                            <Border x:Name="DisabledVisualElement" Background="#A5FFFFFF" BorderBrush="#59C0C0C0" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" IsHitTestVisible="False" Visibility="Collapsed"/>
                            <Border x:Name="FocusVisualElement" BorderBrush="{StaticResource TextBoxFocus}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" IsHitTestVisible="False" Opacity="0"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource FocusedOff}" x:Name="FocusedOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource FocusedOn}" x:Name="FocusedOn_BeginStoryboard"/>
                                </Trigger.EnterActions>
                            </Trigger>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsMouseOver" Value="True"/>
                                    <Condition Property="IsFocused" Value="False"/>
                                </MultiTrigger.Conditions>
                                <MultiTrigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                                </MultiTrigger.ExitActions>
                                <MultiTrigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                                </MultiTrigger.EnterActions>
                            </MultiTrigger>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
                                <Setter Property="Visibility" TargetName="DisabledVisualElement" Value="Visible"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>

        <Style TargetType="{x:Type PasswordBox}">
            <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
            <Setter Property="AllowDrop" Value="true"/>
            <Setter Property="Background" Value="#FFFFFFFF"/>
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            <Setter Property="VerticalContentAlignment" Value="Stretch"/>
            <Setter Property="Padding" Value="4"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type PasswordBox}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Over" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="Over" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>

                        </ControlTemplate.Resources>
                        <Grid>
                            <Border x:Name="BorderBase" Background="{TemplateBinding Background}" BorderBrush="{StaticResource TextBoxNorm}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3"/>
                            <Border x:Name="Over" BorderBrush="{StaticResource TextBoxOver}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" Opacity="0"/>
                            <ScrollViewer Margin="0" x:Name="PART_ContentHost" Padding="{TemplateBinding Padding}" />
                            <Border x:Name="DisabledVisualElement" Background="#A5FFFFFF" BorderBrush="#59C0C0C0" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" IsHitTestVisible="False" Visibility="Collapsed"/>
                            <Border x:Name="FocusVisualElement" BorderBrush="{StaticResource TextBoxFocus}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" IsHitTestVisible="False" Opacity="0"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource FocusedOff}" x:Name="FocusedOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource FocusedOn}" x:Name="FocusedOn_BeginStoryboard"/>
                                </Trigger.EnterActions>
                            </Trigger>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsMouseOver" Value="True"/>
                                    <Condition Property="IsFocused" Value="False"/>
                                </MultiTrigger.Conditions>
                                <MultiTrigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                                </MultiTrigger.ExitActions>
                                <MultiTrigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                                </MultiTrigger.EnterActions>
                            </MultiTrigger>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
                                <Setter Property="Visibility" TargetName="DisabledVisualElement" Value="Visible"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="{x:Type RichTextBox}">
            <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
            <Setter Property="AllowDrop" Value="true"/>
            <Setter Property="Background" Value="#FFFFFFFF"/>
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            <Setter Property="VerticalContentAlignment" Value="Stretch"/>
            <Setter Property="Padding" Value="4"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type RichTextBox}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Over" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="Over" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>

                        </ControlTemplate.Resources>
                        <Grid>
                            <Border x:Name="BorderBase" Background="{TemplateBinding Background}" BorderBrush="{StaticResource TextBoxNorm}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3"/>
                            <Border x:Name="Over" BorderBrush="{StaticResource TextBoxOver}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" Opacity="0"/>
                            <ScrollViewer Margin="0" x:Name="PART_ContentHost" Padding="{TemplateBinding Padding}" />
                            <Border x:Name="DisabledVisualElement" Background="#A5FFFFFF" BorderBrush="#59C0C0C0" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" IsHitTestVisible="False" Visibility="Collapsed"/>
                            <Border x:Name="FocusVisualElement" BorderBrush="{StaticResource TextBoxFocus}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" IsHitTestVisible="False" Opacity="0"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource FocusedOff}" x:Name="FocusedOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource FocusedOn}" x:Name="FocusedOn_BeginStoryboard"/>
                                </Trigger.EnterActions>
                            </Trigger>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsMouseOver" Value="True"/>
                                    <Condition Property="IsFocused" Value="False"/>
                                </MultiTrigger.Conditions>
                                <MultiTrigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                                </MultiTrigger.ExitActions>
                                <MultiTrigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                                </MultiTrigger.EnterActions>
                            </MultiTrigger>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
                                <Setter Property="Visibility" TargetName="DisabledVisualElement" Value="Visible"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="{x:Type Label}">
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Top"/>
            <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Label}">
                        <Grid>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="false"/>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="{x:Type Menu}">
            <Setter Property="SnapsToDevicePixels" Value="True"/>
            <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Menu}">
                        <Grid>
                            <Border x:Name="Border" Background="{StaticResource grayGradient}" />
                            <StackPanel IsItemsHost="True" ClipToBounds="True" Orientation="Horizontal"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter Property="Background" Value="#A5FFFFFF" TargetName="Border"/>
                                <Setter Property="BorderBrush" Value="#59C0C0C0" TargetName="Border"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <DropShadowBitmapEffect x:Key="PopupDropShadow" ShadowDepth="1.5" Softness="0.15"/>

        <Style 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="{StaticResource OutsideFontColor}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type MenuItem}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HighlightOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundGradientSelected" Storyboard.TargetProperty="Opacity" To="0.84"/>
                            </Storyboard>
                            <Storyboard x:Key="HighlightOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundGradientSelected" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                            <Grid Margin="1,1,1,1">

                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition MinWidth="17" Width="Auto" SharedSizeGroup="MenuItemIconColumnGroup"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup"/>
                                    <ColumnDefinition Width="14"/>
                                </Grid.ColumnDefinitions>
                                <Rectangle x:Name="BackgroundGradientOver" Fill="{StaticResource hoverGradient}" Stroke="{StaticResource hoverStroke}" RadiusX="2" RadiusY="2"  Opacity="0" Grid.ColumnSpan="4"/>
                                <Rectangle x:Name="BackgroundGradientSelected" Fill="{StaticResource BtnOverFill}" Stroke="{StaticResource selectedStroke}" RadiusX="2" RadiusY="2" Opacity="0" Grid.ColumnSpan="4"/>
                                <Rectangle x:Name="BackgroundHighlight" Margin="1" Stroke="#A0FFFFFF" RadiusX="1" RadiusY="1" Grid.ColumnSpan="4" Opacity="0"/>
                                <ContentPresenter Margin="4,0,6,0" x:Name="Icon" VerticalAlignment="Center" ContentSource="Icon"/>
                                <Grid Visibility="Hidden" Margin="4,0,6,0" x:Name="GlyphPanel" VerticalAlignment="Center">
                                    <Path x:Name="GlyphPanelpath" VerticalAlignment="Center" Fill="{TemplateBinding Foreground}" Data="M0,2 L0,4.8 L2.5,7.4 L7.1,2.8 L7.1,0 L2.5,4.6 z" FlowDirection="LeftToRight"/>
                                </Grid>

                                <ContentPresenter Grid.Column="1" Margin="{TemplateBinding Padding}" x:Name="HeaderHost" RecognizesAccessKey="True" ContentSource="Header"/>

                                <Grid Grid.Column="3" Margin="4,0,6,0" x:Name="ArrowPanel" VerticalAlignment="Center">
                                    <Path x:Name="ArrowPanelPath" VerticalAlignment="Center" Fill="{TemplateBinding Foreground}" Data="M0,0 L0,8 L4,4 z"/>
                                </Grid>

                                <Popup IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" x:Name="SubMenuPopup" Focusable="false" AllowsTransparency="true" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" VerticalOffset="-3">
                                    <Grid x:Name="SubMenu">
                                        <Border x:Name="SubMenuBorder" Background="#FFFFFFFF" BorderBrush="{StaticResource TextBoxNorm}" BorderThickness="1"/>

                                        <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle"/>
                                    </Grid>
                                </Popup>

                            </Grid>
                        </Border>

                        <ControlTemplate.Triggers>

                            <Trigger Property="Role" Value="TopLevelHeader">
                                <Setter Property="Margin" Value="0,1,0,1"/>
                                <Setter Property="Padding" Value="6,3,6,3"/>
                                <Setter Property="Grid.IsSharedSizeScope" Value="true"/>
                                <Setter Property="Placement" Value="Bottom" TargetName="SubMenuPopup"/>
                                <Setter Property="Visibility" Value="Collapsed" TargetName="ArrowPanel"/>
                            </Trigger>

                            <Trigger Property="Role" Value="TopLevelItem">
                                <Setter Property="Margin" Value="0,1,0,1"/>
                                <Setter Property="Padding" Value="6,3,6,3"/>
                                <Setter Property="Visibility" Value="Collapsed" TargetName="ArrowPanel"/>
                            </Trigger>

                            <Trigger Property="Role" Value="SubmenuHeader">
                                <Setter Property="DockPanel.Dock" Value="Top"/>
                                <Setter Property="Padding" Value="0,2,0,2"/>
                                <Setter Property="Grid.IsSharedSizeScope" Value="true"/>
                            </Trigger>

                            <Trigger Property="Role" Value="SubmenuItem">
                                <Setter Property="DockPanel.Dock" Value="Top"/>
                                <Setter Property="Padding" Value="0,2,0,2"/>
                                <Setter Property="Visibility" Value="Collapsed" TargetName="ArrowPanel"/>
                            </Trigger>
                            <Trigger Property="IsSuspendingPopupAnimation" Value="true">
                                <Setter Property="PopupAnimation" Value="None" TargetName="SubMenuPopup"/>
                            </Trigger>

                            <Trigger Property="Icon" Value="{x:Null}">
                                <Setter Property="Visibility" Value="Collapsed" TargetName="Icon"/>
                            </Trigger>

                            <Trigger Property="IsChecked" Value="true">
                                <Setter Property="Visibility" Value="Visible" TargetName="GlyphPanel"/>
                                <Setter Property="Visibility" Value="Collapsed" TargetName="Icon"/>
                            </Trigger>

                            <Trigger Property="AllowsTransparency" SourceName="SubMenuPopup" Value="true">
                                <Setter Property="Margin" Value="0,0,3,3" TargetName="SubMenu"/>
                                <Setter Property="SnapsToDevicePixels" Value="true" TargetName="SubMenu"/>
                                <Setter Property="BitmapEffect" Value="{DynamicResource PopupDropShadow}" TargetName="SubMenuBorder"/>
                            </Trigger>

                            <Trigger Property="IsHighlighted" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HighlightOff}" />
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HighlightOn}" />
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="{x:Type Separator}">
            <Setter Property="Height" Value="1"/>
            <Setter Property="Margin" Value="0,2,0,2"/>
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Separator}">
                        <Border BorderBrush="#FF888888" BorderThickness="1"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="{x:Type TabControl}">
            <Setter Property="Background" Value="#FFFFFFFF"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Padding" Value="5"/>
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            <Setter Property="VerticalContentAlignment" Value="Stretch"/>
            <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TabControl}">
                        <Grid ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition x:Name="ColumnDefinition0" />
                                <ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" x:Name="RowDefinition0" />
                                <RowDefinition Height="*" x:Name="RowDefinition1" />
                            </Grid.RowDefinitions>
                            <Border CornerRadius="2,2,0,0" x:Name="border" Margin="0,0,0,-1.5" Panel.ZIndex="100">
                                <TabPanel x:Name="HeaderPanel" IsItemsHost="true" Panel.ZIndex="1" KeyboardNavigation.TabIndex="1" RenderTransformOrigin="0.5,0.5" Width="Auto" Height="Auto" Margin="2,0,0,0">
                                    <TabPanel.LayoutTransform>
                                        <TransformGroup>
                                            <ScaleTransform ScaleX="1" ScaleY="1" />
                                            <SkewTransform AngleX="0" AngleY="0" />
                                            <RotateTransform Angle="0" />
                                            <TranslateTransform X="0" Y="0" />
                                        </TransformGroup>
                                    </TabPanel.LayoutTransform>
                                    <TabPanel.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform ScaleX="1" ScaleY="1" />
                                            <SkewTransform AngleX="0" AngleY="0" />
                                            <RotateTransform />
                                            <TranslateTransform X="0" Y="0" />
                                        </TransformGroup>
                                    </TabPanel.RenderTransform>

                                </TabPanel>
                            </Border>
                            <Border Grid.Row="1" x:Name="ContentPanel" MinHeight="10" MinWidth="10" Background="#FFFFFFFF" BorderBrush="#FF979AA2" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1">
                                <ContentPresenter Margin="4" x:Name="PART_SelectedContentHost" ContentSource="SelectedContent"/>
                            </Border>
                            <Border x:Name="DisabledVisualTop" Grid.Row="1" Grid.RowSpan="2" Background="#8CFFFFFF" CornerRadius="1" Panel.ZIndex="1" IsHitTestVisible="False" Opacity="0"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="TabStripPlacement" Value="Bottom">
                                <Setter Property="Grid.Row" TargetName="ContentPanel" Value="0" />
                                <Setter Property="Height" TargetName="RowDefinition0" Value="*" />
                                <Setter Property="Height" TargetName="RowDefinition1" Value="Auto" />
                                <Setter Property="Grid.Row" TargetName="border" Value="1"/>
                                <Setter Property="CornerRadius" TargetName="ContentPanel" Value="2,2,0,0"/>
                                <Setter Property="CornerRadius" TargetName="border" Value="0,0,2,2"/>
                                <Setter Property="Margin" TargetName="border" Value="0,-1.5,0,0"/>
                            </Trigger>
                            <Trigger Property="TabStripPlacement" Value="Left">

                                <Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0" />
                                <Setter Property="Grid.Row" TargetName="ContentPanel" Value="0" />
                                <Setter Property="Grid.Column" TargetName="ContentPanel" Value="1" />
                                <Setter Property="Width" TargetName="ColumnDefinition0" Value="Auto" />
                                <Setter Property="Width" TargetName="ColumnDefinition1" Value="*" />
                                <Setter Property="Height" TargetName="RowDefinition0" Value="*" />
                                <Setter Property="Height" TargetName="RowDefinition1" Value="0" />
                                <Setter Property="Grid.Column" TargetName="border" Value="0"/>
                                <Setter Property="Margin" TargetName="border" Value="0,0,-1,0"/>
                                <Setter Property="Margin" TargetName="ContentPanel" Value="0,0,0,0"/>
                                <Setter Property="CornerRadius" TargetName="border" Value="0,2,2,0"/>
                                <Setter Property="CornerRadius" TargetName="ContentPanel" Value="0,2,2,0"/>
                                <Setter Property="Margin" TargetName="HeaderPanel" Value="5,2,0,0"/>

                            </Trigger>
                            <Trigger Property="TabStripPlacement" Value="Right">
                                <Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0" />
                                <Setter Property="Grid.Row" TargetName="ContentPanel" Value="0" />
                                <Setter Property="Grid.Column" TargetName="ContentPanel" Value="0" />
                                <Setter Property="Width" TargetName="ColumnDefinition0" Value="*" />
                                <Setter Property="Width" TargetName="ColumnDefinition1" Value="Auto" />
                                <Setter Property="Height" TargetName="RowDefinition0" Value="*" />
                                <Setter Property="Height" TargetName="RowDefinition1" Value="0" />
                                <Setter Property="Grid.Column" TargetName="border" Value="1"/>
                                <Setter Property="CornerRadius" TargetName="ContentPanel" Value="2,0,0,2"/>
                                <Setter Property="CornerRadius" TargetName="border" Value="0,2,2,0"/>
                                <Setter Property="Margin" TargetName="border" Value="-6,2,0,0"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                                <Setter Property="Opacity" TargetName="DisabledVisualTop" Value="1"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style d:IsControlPart="True" TargetType="{x:Type TabItem}">
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Padding" Value="10,6,10,6"/>
            <Setter Property="MinWidth" Value="5"/>
            <Setter Property="MinHeight" Value="5"/>
            <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TabItem}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="SelectedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="TemplateTopSelected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="TemplateTopUnselected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="SelectedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="TemplateTopSelected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="TemplateTopUnselected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="TopUnselectedOver" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="TopUnselectedOver" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Grid x:Name="grid">
                            <Grid.LayoutTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="1" ScaleY="1"/>
                                    <SkewTransform AngleX="0" AngleY="0"/>
                                    <RotateTransform Angle="0"/>
                                    <TranslateTransform X="0" Y="0"/>
                                </TransformGroup>
                            </Grid.LayoutTransform>


                            <Grid x:Name="TemplateTopSelected" Margin="-2,0,-2,0" Panel.ZIndex="0" Opacity="0">
                                <Grid>
                                    <Border x:Name="BackgroundTop" Background="#FFFFFFFF" BorderBrush="#FF979AA2" BorderThickness="1,1,1,0" />
                                </Grid>
                                <Border x:Name="DisabledVisualTopSelected" Background="#8CFFFFFF" IsHitTestVisible="false" Visibility="Collapsed" />
                            </Grid>
                            <Grid x:Name="TemplateTopUnselected" Margin="0,2,0,1" >
                                <Grid>
                                    <Border x:Name="TopUnselected_Background" BorderBrush="#FF94979F" BorderThickness="1,1,1,0">
                                        <Border.Background>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                                <GradientStop Color="#FFF3F3F3" Offset="0.152"/>
                                                <GradientStop Color="#FFF3F3F3" Offset="0.456"/>
                                                <GradientStop Color="#FFEBEBEB" Offset="0.465"/>
                                                <GradientStop Color="#FFD6D6D5" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Border.Background>
                                    </Border>
                                    <Border x:Name="TopUnselectedOver" Background="{StaticResource BtnOverFill}" BorderBrush="{StaticResource TabOverStroke}" BorderThickness="1,1,1,0" Opacity="0"/>
                                    <Border x:Name="TopUnselected_Highlight" Margin="1" BorderBrush="#FFFFFFFF" BorderThickness="1,1,1,0"/>
                                </Grid>
                                <Border x:Name="DisabledVisualTopUnSelected" Background="#8CFFFFFF" IsHitTestVisible="false" Visibility="Collapsed"/>
                            </Grid>


                            <ContentPresenter HorizontalAlignment="Center" Margin="{TemplateBinding Padding}" x:Name="ContentSite" VerticalAlignment="Center" RecognizesAccessKey="True" ContentSource="Header" Opacity="1"/>

                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="TabStripPlacement" Value="Left">
                                <Setter Property="LayoutTransform" TargetName="grid">
                                    <Setter.Value>
                                        <TransformGroup>
                                            <ScaleTransform ScaleX="1" ScaleY="1" />
                                            <SkewTransform AngleX="0" AngleY="0" />
                                            <RotateTransform Angle="-90" />
                                            <TranslateTransform X="0" Y="0" />
                                        </TransformGroup>
                                    </Setter.Value>
                                </Setter>
                            </Trigger>
                            <Trigger Property="TabStripPlacement" Value="Right">
                                <Setter Property="LayoutTransform" TargetName="grid">
                                    <Setter.Value>
                                        <TransformGroup>
                                            <ScaleTransform ScaleX="1" ScaleY="1" />
                                            <SkewTransform AngleX="0" AngleY="0" />
                                            <RotateTransform Angle="90" />
                                            <TranslateTransform X="0" Y="0" />
                                        </TransformGroup>
                                    </Setter.Value>
                                </Setter>
                            </Trigger>
                            <Trigger Property="TabStripPlacement" Value="Bottom">
                                <Setter Property="LayoutTransform" TargetName="ContentSite">
                                    <Setter.Value>
                                        <TransformGroup>
                                            <ScaleTransform ScaleX="1" ScaleY="1" />
                                            <SkewTransform AngleX="0" AngleY="0" />
                                            <RotateTransform Angle="180" />
                                            <TranslateTransform X="0" Y="0" />
                                        </TransformGroup>
                                    </Setter.Value>
                                </Setter>
                                <Setter Property="LayoutTransform" TargetName="grid">
                                    <Setter.Value>
                                        <TransformGroup>
                                            <ScaleTransform ScaleX="1" ScaleY="1"/>
                                            <SkewTransform AngleX="0" AngleY="0"/>
                                            <RotateTransform Angle="180"/>
                                            <TranslateTransform X="0" Y="0"/>
                                        </TransformGroup>
                                    </Setter.Value>
                                </Setter>
                            </Trigger>
                            <MultiTrigger>
                                <MultiTrigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                                </MultiTrigger.ExitActions>
                                <MultiTrigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}" x:Name="HoverOn_BeginStoryboard"/>
                                </MultiTrigger.EnterActions>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsMouseOver" Value="True" />
                                    <Condition Property="Selector.IsSelected" Value="False" />
                                </MultiTrigger.Conditions>
                            </MultiTrigger>
                            <Trigger Property="IsSelected" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource SelectedOff}" x:Name="SelectedOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource SelectedOn}"/>
                                </Trigger.EnterActions>
                                <Setter Property="Panel.ZIndex" Value="100" />

                            </Trigger>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsMouseOver" Value="True" SourceName="grid" />
                                    <Condition Property="Selector.IsSelected" Value="True" />
                                </MultiTrigger.Conditions>
                            </MultiTrigger>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
                                <Setter Property="Visibility" TargetName="DisabledVisualTopUnSelected" Value="Visible"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Foreground" Value="{DynamicResource OutsideFontColor}"/>
        </Style>

        <Style x:Key="NuclearSliderThumb" d:IsControlPart="True" TargetType="{x:Type Thumb}">
            <Setter Property="SnapsToDevicePixels" Value="true"/>
            <Setter Property="Height" Value="21"/>
            <Setter Property="Width" Value="11"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Over" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="Over" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="PressedOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Press" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="PressedOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="Press" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Grid>
                            <Path x:Name="Base" Stretch="Fill" Stroke="#FF707070" StrokeThickness="1" StrokeLineJoin="Round" Data="F1 M 0,1 C 0,0 1,0 1,0 L 7,0 C 7,0 7.750000,0 8,1 C 8.013672,1.054688 8,11.875000 8,11.875000 L 4.625000,15.250000 C 4.312500,15.583984 3.625000,15.250000 3.625000,15.250000 L 0,11.750000 C 0,11.750000 0,1.062500 0,1 Z">
                                <Path.Fill>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                        <GradientStop Color="#FFF2F2F2" Offset="0.498"/>
                                        <GradientStop Color="#FFE1E1E1" Offset="0.498"/>
                                        <GradientStop Color="#FFF3F3F3" Offset="0.143"/>
                                        <GradientStop Color="#FFD1D1D1" Offset="1"/>
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                            <Path x:Name="Over" Fill="{StaticResource ThumbOver}" Stroke="{StaticResource TextBoxPressBrush}" Stretch="Fill" Data="F1 M 0,1 C 0,0 1,0 1,0 L 7,0 C 7,0 7.750000,0 8,1 C 8.013672,1.054688 8,11.875000 8,11.875000 L 4.625000,15.250000 C 4.312500,15.583984 3.625000,15.250000 3.625000,15.250000 L 0,11.750000 C 0,11.750000 0,1.062500 0,1 Z" Opacity="0"/>
                            <Path x:Name="Press" Fill="{StaticResource ThumbPress}" Stroke="{StaticResource btnPressStroke2}" Stretch="Fill" Data="F1 M 0,1 C 0,0 1,0 1,0 L 7,0 C 7,0 7.750000,0 8,1 C 8.013672,1.054688 8,11.875000 8,11.875000 L 4.625000,15.250000 C 4.312500,15.583984 3.625000,15.250000 3.625000,15.250000 L 0,11.750000 C 0,11.750000 0,1.062500 0,1 Z" Opacity="0"/>
                            <Path x:Name="Highlight" Margin="1" Stroke="#FFFFFFFF" Stretch="Fill" Data="F1 M 0,1 C 0,0 1,0 1,0 L 7,0 C 7,0 7.750000,0 8,1 C 8.013672,1.054688 8,11.875000 8,11.875000 L 4.625000,15.250000 C 4.312500,15.583984 3.625000,15.250000 3.625000,15.250000 L 0,11.750000 C 0,11.750000 0,1.062500 0,1 Z"/>
                            <Path x:Name="DisabledVisualElement" Fill="#FFFFFFFF" Stroke="#FFFFFFFF" StrokeThickness="1" StrokeLineJoin="Round" Stretch="Fill" Opacity="0.5" Data="F1 M 0,1 C 0,0 1,0 1,0 L 7,0 C 7,0 7.750000,0 8,1 C 8.013672,1.054688 8,11.875000 8,11.875000 L 4.625000,15.250000 C 4.312500,15.583984 3.625000,15.250000 3.625000,15.250000 L 0,11.750000 C 0,11.750000 0,1.062500 0,1 Z" IsHitTestVisible="false" Visibility="Collapsed" />
                            <Path x:Name="FocusVisualElement" Margin="-1" Stroke="{StaticResource btnFocus}" StrokeThickness="1"  StrokeLineJoin="Round" Stretch="Fill" Data="F1 M 0.009766,1.453125 C 0.291016,0.093750 1.509766,0.000000 1.509766,0.000000 L 6.509766,0.000000 C 6.509766,0.000000 7.728516,0.000000 8.009766,1.500000 L 8.009766,11.500000 L 4.988770,15.200195 C 4.197266,15.854492 3.384766,15.166992 3.384766,15.166992 L 0.009766,11.500000 C 0.009766,11.500000 -0.012207,1.560059 0.009766,1.453125 Z" IsHitTestVisible="false" Opacity="0"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource FocusedOff}" x:Name="FocusedOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource FocusedOn}" x:Name="FocusedOn_BeginStoryboard"/>
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="True">

                                <Trigger.ExitActions>
                                    <BeginStoryboard x:Name="HoverOff_BeginStoryboard" Storyboard="{StaticResource HoverOff}"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                                </Trigger.EnterActions>

                            </Trigger>
                            <Trigger Property="IsDragging" Value="True">
                                <Trigger.EnterActions>
                                    <BeginStoryboard x:Name="PressedOn_BeginStoryboard" Storyboard="{StaticResource PressedOn}"/>
                                </Trigger.EnterActions>
                                <Trigger.ExitActions>
                                    <BeginStoryboard x:Name="PressedOff_BeginStoryboard" Storyboard="{StaticResource PressedOff}"/>
                                </Trigger.ExitActions>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Visibility" TargetName="DisabledVisualElement" Value="Visible"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="{x:Type Slider}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Slider}">
                        <Grid x:Name="GridRoot">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>

                            <TickBar Visibility="Collapsed" x:Name="TopTick" Height="4" SnapsToDevicePixels="True" Placement="Top" Fill="#FF405A78"/>
                            <Rectangle Margin="5.5,0,5.5,0" Grid.Column="0" Grid.ColumnSpan="3" Height="6" RadiusX="3" RadiusY="3">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFB0B0B0" Offset="0.341"/>
                                        <GradientStop Color="#FFE7EAEA" Offset="0.346"/>
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>

                            <Track x:Name="PART_Track">
                                <Track.Thumb>
                                    <Thumb Style="{DynamicResource NuclearSliderThumb}"/>
                                </Track.Thumb>
                                <Track.IncreaseRepeatButton>
                                    <RepeatButton Style="{DynamicResource NuclearScrollRepeatButtonStyle}" Command="Slider.IncreaseLarge"/>
                                </Track.IncreaseRepeatButton>
                                <Track.DecreaseRepeatButton>
                                    <RepeatButton Style="{DynamicResource NuclearScrollRepeatButtonStyle}" Command="Slider.DecreaseLarge"/>
                                </Track.DecreaseRepeatButton>
                            </Track>

                            <TickBar Visibility="Collapsed" Grid.Row="2" x:Name="BottomTick" Height="4" SnapsToDevicePixels="True" Placement="Bottom" Fill="{TemplateBinding Foreground}"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="TickPlacement" Value="TopLeft">
                                <Setter Property="Visibility" Value="Visible" TargetName="TopTick"/>
                            </Trigger>
                            <Trigger Property="TickPlacement" Value="BottomRight">
                                <Setter Property="Visibility" Value="Visible" TargetName="BottomTick"/>
                            </Trigger>
                            <Trigger Property="TickPlacement" Value="Both">
                                <Setter Property="Visibility" Value="Visible" TargetName="TopTick"/>
                                <Setter Property="Visibility" Value="Visible" TargetName="BottomTick"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false"/>

                            <Trigger Property="Orientation" Value="Vertical">
                                <Setter Property="LayoutTransform" TargetName="GridRoot">
                                    <Setter.Value>
                                        <RotateTransform Angle="-90"/>
                                    </Setter.Value>
                                </Setter>
                                <Setter TargetName="PART_Track" Property="Orientation" Value="Horizontal"/>
                            </Trigger>

                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="{x:Type TreeView}">
            <Setter Property="Background" Value="#FFFFFFFF"/>
            <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Top"/>
            <Setter Property="BorderBrush" Value="{StaticResource btnPressStroke2}"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Padding" Value="4"/>
            <Setter Property="Cursor" Value="Arrow"/>
            <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TreeView}">
                        <Grid>
                            <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                                <ScrollViewer   Focusable="False" Background="{TemplateBinding Background}" Padding="4" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" CanContentScroll="False">
                                    <ItemsPresenter/>
                                </ScrollViewer>
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="NuclearTreeViewItemToggleButton" d:IsControlPart="True" TargetType="{x:Type ToggleButton}">
            <Setter Property="Focusable" Value="False"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ToggleButton}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="(Shape.Fill)">
                                    <DiscreteObjectKeyFrame KeyTime="00:00:00.1000000" Value="{StaticResource treeviewArrowHover}"/>
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="UncheckedVisual" Storyboard.TargetProperty="(Shape.Fill)">
                                    <DiscreteObjectKeyFrame KeyTime="00:00:00.1000000" Value="{StaticResource treeviewArrowHover}"/>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="(Shape.Fill)">
                                    <DiscreteObjectKeyFrame KeyTime="00:00:00.4000000" Value="{StaticResource treeviewArrowChecked}"/>
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="UncheckedVisual" Storyboard.TargetProperty="(Shape.Fill)">
                                    <DiscreteObjectKeyFrame KeyTime="00:00:00.4000000" Value="{StaticResource treeviewArrowUnchecked}"/>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="CheckedOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="UncheckedVisual" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="CheckedOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="UncheckedVisual" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Grid HorizontalAlignment="Right" Margin="2,2,5,2">
                            <Path x:Name="UncheckedVisual" Height="9" Width="6" HorizontalAlignment="Right" VerticalAlignment="Center" Fill="{StaticResource treeviewArrowUnchecked}" StrokeLineJoin="Miter" Data="M 0,0 L 0,9 L 5,4.5 Z"/>
                            <Path x:Name="CheckedVisual" Height="6" Width="6" HorizontalAlignment="Right" VerticalAlignment="Center" Fill="{StaticResource treeviewArrowChecked}" StrokeLineJoin="Miter" Opacity="0" Data="M 6,0 L 6,6 L 0,6 Z"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" />
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="IsChecked" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource CheckedOff}" />
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource CheckedOn}" />
                                </Trigger.EnterActions>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style d:IsControlPart="True" TargetType="{x:Type TreeViewItem}">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Top"/>
            <Setter Property="Padding" Value="5,3,15,3"/>
            <Setter Property="Cursor" Value="Arrow"/>
            <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TreeViewItem}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="SelectedOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="select_gradient" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="select_highlight" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="SelectedOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="select_gradient" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="select_highlight" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="hover_gradient" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.65"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>

                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="hover_gradient" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>

                            </Storyboard>
                        </ControlTemplate.Resources>
                        <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="{DynamicResource NuclearTreeViewItemToggleButton}" IsChecked="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"/>
                            <Rectangle x:Name="select_gradient" Grid.Column="1" Fill="{StaticResource BtnOverFill}" Stroke="{StaticResource selectedStroke}" StrokeThickness="1" RadiusX="2" RadiusY="2" Opacity="0" IsHitTestVisible="False"/>
                            <Rectangle x:Name="select_highlight" Margin="1" Grid.Column="1" Stroke="#A0FFFFFF" Opacity="0"/>
                            <Rectangle x:Name="inactive" Grid.Column="1" Fill="#FF999999" Stroke="#FF333333" StrokeThickness="1" RadiusX="2" RadiusY="2" Opacity="0" IsHitTestVisible="False"/>
                            <Rectangle x:Name="hover_gradient" Grid.Column="1" Fill="{StaticResource hoverGradient}" Stroke="{StaticResource hoverStroke}" StrokeThickness="1" RadiusX="2" RadiusY="2" Opacity="0" IsHitTestVisible="False"/>
                            <Rectangle x:Name="highlight" Grid.Column="1" Margin="1" StrokeThickness="1" RadiusX="1" RadiusY="1" Opacity="0" IsHitTestVisible="False" Stroke="#FFFFFFFF"/>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" x:Name="PART_Header" ContentSource="Header" Grid.Column="1" Margin="{TemplateBinding Padding}" />

                            <ItemsPresenter Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1" x:Name="ItemsHost"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="true" SourceName="PART_Header" >
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" />
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="IsExpanded" Value="false">
                                <Setter Property="Visibility" Value="Collapsed" TargetName="ItemsHost"/>
                            </Trigger>
                            <Trigger Property="HasItems" Value="false">
                                <Setter Property="Visibility" Value="Hidden" TargetName="Expander"/>
                            </Trigger>
                            <Trigger Property="IsSelected" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource SelectedOff}" />
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource SelectedOn}" />
                                </Trigger.EnterActions>

                            </Trigger>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsSelected" Value="true"/>
                                    <Condition Property="IsSelectionActive" Value="false"/>
                                </MultiTrigger.Conditions>
                                <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>

        <Style x:Key="{x:Static ToolBar.ButtonStyleKey}" TargetType="{x:Type Button}" BasedOn="{x:Null}">
            <Setter Property="Foreground" Value="{StaticResource ButtonFontColor}"/>
							<Setter Property="FontSize" Value="10"/>
				<Setter Property="MinHeight" Value="18"/>
				<Setter Property="MinWidth" Value="50"/>
            <Setter Property="Padding" Value="3"/>
            <Setter Property="FocusVisualStyle" Value="{DynamicResource NuclearButtonFocusVisual}"/>
            <Setter Property="Template" Value="{DynamicResource ButtonTemplate}" />
        </Style>

        <Style x:Key="{x:Static ToolBar.CheckBoxStyleKey}" TargetType="{x:Type CheckBox}">
				<Setter Property="FontSize" Value="10"/>
            <Setter Property="SnapsToDevicePixels" Value="true"/>
            <Setter Property="FocusVisualStyle" Value="{DynamicResource CheckBoxFocusVisual}"/>
            <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Top"/>
            <Setter Property="Padding" Value="4,1,0,0"/>

            <Setter Property="Template" Value="{DynamicResource CheckBoxTemplate}" />
        </Style>

        <Style x:Key="{x:Static ToolBar.RadioButtonStyleKey}" TargetType="{x:Type RadioButton}">
				<Setter Property="FontSize" Value="10"/>
            <Setter Property="SnapsToDevicePixels" Value="true"/>
            <Setter Property="FocusVisualStyle" Value="{DynamicResource RadioButtonFocusVisual}"/>
            <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Top"/>
            <Setter Property="Padding" Value="4,1,0,0"/>
            <Setter Property="Template" Value="{DynamicResource RadioButtonTemplate}" />
        </Style>

        <Style x:Key="{x:Static ToolBar.ComboBoxStyleKey}" TargetType="{x:Type ComboBox}">
				<Setter Property="FontSize" Value="10"/>
            <Setter Property="SnapsToDevicePixels" Value="true"/>
            <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
            <Setter Property="Template" Value="{DynamicResource ComboBoxTemplate}" />
        </Style>

        <Style x:Key="{x:Static ToolBar.TextBoxStyleKey}" TargetType="{x:Type TextBox}">
				<Setter Property="FontSize" Value="10"/>
            <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
            <Setter Property="AllowDrop" Value="true"/>
            <Setter Property="Background" Value="#FFFFFFFF"/>
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            <Setter Property="VerticalContentAlignment" Value="Stretch"/>
            <Setter Property="Padding" Value="4"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Template" Value="{DynamicResource TextBoxTemplate}" />
        </Style>

        <LinearGradientBrush x:Key="ToolBarHorizontalBackground" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="#FFFFFF" Offset="0"/>
            <GradientStop Color="#FFFBFF" Offset="0.5"/>
            <GradientStop Color="#F7F7F7" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="ToolBarToggleButtonHorizontalBackground" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="#ECECEC" Offset="0"/>
            <GradientStop Color="#DDDDDD" Offset="0.5"/>
            <GradientStop Color="#A0A0A0" Offset="1"/>
        </LinearGradientBrush>
        <SolidColorBrush x:Key="ToolBarButtonHover" Color="#FF818181" />
        <SolidColorBrush x:Key="ToolBarGripper" Color="#C6C3C6"/>
        <Style x:Key="ToolBarHorizontalOverflowButtonStyle" TargetType="{x:Type ToggleButton}">
            <Setter Property="Background" Value="{StaticResource ToolBarToggleButtonHorizontalBackground}"/>
            <Setter Property="MinHeight" Value="0"/>
            <Setter Property="MinWidth" Value="0"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ToggleButton}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundOver" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundOver_Highlight" Storyboard.TargetProperty="Opacity" To="0.65"/>
                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundOver" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundOver_Highlight" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="PressedOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity" To="0.84"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgoundPressed_Highlight" Storyboard.TargetProperty="Opacity" To="0.65"/>
                            </Storyboard>
                            <Storyboard x:Key="PressedOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgoundPressed_Highlight" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Border SnapsToDevicePixels="true" x:Name="Bd" CornerRadius="0,0,0,0" >
                            <Grid>
                                <Border x:Name="BackgroundNorm" Background="{StaticResource grayGradient}" BorderThickness="1" BorderBrush="#FF8E8F8F" CornerRadius="0,3,3,0"/>
                                <Border x:Name="BackgroundNorm_highlight" Margin="1" BorderBrush="#F2FFFFFF" BorderThickness="1,0,1,1" CornerRadius="0,3,3,0" Opacity="0.65"/>
                                <Border x:Name="BackgroundOver" Background="{StaticResource BtnOverFill}" BorderBrush="{StaticResource TextBoxPressBrush}" BorderThickness="1" CornerRadius="0,3,3,0" Opacity="0"/>
                                <Border x:Name="BackgroundOver_Highlight" Margin="1" Background="{StaticResource btnOverFillHighlight}" BorderBrush="{StaticResource hoverStroke}" BorderThickness="1,0,1,1" CornerRadius="0,3,3,0" Opacity="0"/>
                                <Border x:Name="BackgroundPressed" Background="{StaticResource BtnPressFill}" BorderBrush="{StaticResource btnPressBorder}" BorderThickness="1" CornerRadius="0,3,3,0" Opacity="0"/>
                                <Border x:Name="BackgoundPressed_Highlight" Background="{StaticResource btnPressFillHighlight}" Margin="1" CornerRadius="0,3,3,0" Opacity="0"/>
                                <Border x:Name="Background_overlay" Margin="1,1,1,0" BorderThickness="1" CornerRadius="0,3,3,0">
                                    <Border.Background>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#00FFFFFF" Offset="0"/>
                                            <GradientStop Color="#72FFFFFF" Offset="0.157"/>
                                            <GradientStop Color="#72FFFFFF" Offset="0.5"/>
                                            <GradientStop Color="#00FFFFFF" Offset="0.51"/>
                                        </LinearGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Canvas SnapsToDevicePixels="true" HorizontalAlignment="Right" Margin="7,2,2,2" VerticalAlignment="Bottom" Width="6" Height="7">
                                    <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 x:Name="FocusVisualElement" Margin="1" BorderBrush="{StaticResource btnFocus}" BorderThickness="1" CornerRadius="2" IsHitTestVisible="false" Opacity="0"/>
                                <Border x:Name="DisabledVisualElement" Background="#FFF1F1F1" BorderBrush="#FFB2B2B2" BorderThickness="1" CornerRadius="3" IsHitTestVisible="false" Opacity="0" />
                            </Grid>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsKeyboardFocused" Value="true">

                                <Trigger.ExitActions>
                                    <BeginStoryboard x:Name="FocusedOff_BeginStoryboard" Storyboard="{StaticResource FocusedOff}"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard x:Name="FocusedOn_BeginStoryboard" Storyboard="{StaticResource FocusedOn}"/>
                                </Trigger.EnterActions>

                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                                </Trigger.EnterActions>

                            </Trigger>
                            <Trigger Property="IsPressed" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOff}" />
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOn}"/>
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="true"/>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{StaticResource ToolBarGripper}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <SolidColorBrush x:Key="ToolBarSubMenuBackground" Color="#FFFDFDFD"/>
        <SolidColorBrush x:Key="ToolBarMenuBorder" Color="#FFFFFFFF"/>
        <Style x:Key="ToolBarThumbStyle" TargetType="{x:Type Thumb}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <Border SnapsToDevicePixels="True" Background="Transparent" Padding="{TemplateBinding Padding}" CornerRadius="0,0,0,0">
                            <Rectangle>
                                <Rectangle.Fill>
                                    <DrawingBrush TileMode="Tile" Viewbox="0,0,4,4" ViewboxUnits="Absolute" Viewport="0,0,4,4" ViewportUnits="Absolute">
                                        <DrawingBrush.Drawing>
                                            <DrawingGroup>
                                                <GeometryDrawing Brush="White" Geometry="M 1 1 L 1 3 L 3 3 L 3 1 z"/>
                                                <GeometryDrawing Brush="{StaticResource ToolBarGripper}" Geometry="M 0 0 L 0 2 L 2 2 L 2 0 z"/>
                                            </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>
        <LinearGradientBrush x:Key="ToolBarToggleButtonVerticalBackground" EndPoint="1,0" StartPoint="0,0">
            <GradientStop Color="#ECECEC" Offset="0"/>
            <GradientStop Color="#DDDDDD" Offset="0.5"/>
            <GradientStop Color="#A0A0A0" Offset="1"/>
        </LinearGradientBrush>
        <Style x:Key="ToolBarVerticalOverflowButtonStyle" TargetType="{x:Type ToggleButton}">
            <Setter Property="Background" Value="{StaticResource ToolBarToggleButtonVerticalBackground}"/>
            <Setter Property="MinHeight" Value="0"/>
            <Setter Property="MinWidth" Value="0"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ToggleButton}">
                        <Border SnapsToDevicePixels="true" x:Name="Bd" Background="{TemplateBinding Background}" CornerRadius="0,0,3,3">
                            <Canvas SnapsToDevicePixels="true" HorizontalAlignment="Right" Margin="2,7,2,2" VerticalAlignment="Bottom" Width="7" Height="6">
                                <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 Property="Background" TargetName="Bd" Value="{StaticResource ToolBarButtonHover}"/>
                            </Trigger>
                            <Trigger Property="IsKeyboardFocused" Value="true">
                                <Setter Property="Background" TargetName="Bd" Value="{StaticResource ToolBarButtonHover}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{StaticResource ToolBarGripper}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <LinearGradientBrush x:Key="ToolBarVerticalBackground" EndPoint="1,0" StartPoint="0,0">
            <GradientStop Color="#FFFFFF" Offset="0"/>
            <GradientStop Color="#FFFBFF" Offset="0.5"/>
            <GradientStop Color="#F7F7F7" Offset="1"/>
        </LinearGradientBrush>
        <Style TargetType="{x:Type ToolBar}">
            <Setter Property="Background" Value="{StaticResource ToolBarHorizontalBackground}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ToolBar}">
                        <Grid SnapsToDevicePixels="true" Margin="3,1,1,1" x:Name="Grid">
                            <Grid HorizontalAlignment="Right" x:Name="OverflowGrid" Margin="0,0,-3,0">
                                <ToggleButton IsEnabled="{TemplateBinding HasOverflowItems}" FocusVisualStyle="{x:Null}" x:Name="OverflowButton" Style="{StaticResource ToolBarHorizontalOverflowButtonStyle}" ClickMode="Press" IsChecked="{Binding Path=IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                                <Popup Focusable="false" AllowsTransparency="true" IsOpen="{Binding Path=IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" StaysOpen="False" x:Name="OverflowPopup">
                                    <Border x:Name="Shdw" Background="#FFFFFFFF" BorderBrush="{StaticResource TextBoxNorm}" BorderThickness="1" CornerRadius="1,1,3,3">
                                        <Border BorderThickness="1,1,1,1" >
                                            <ToolBarOverflowPanel Focusable="true" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" FocusVisualStyle="{x:Null}" Margin="2" x:Name="PART_ToolBarOverflowPanel" WrapWidth="200" KeyboardNavigation.DirectionalNavigation="Cycle" KeyboardNavigation.TabNavigation="Cycle"/>
                                        </Border>
                                    </Border>
                                </Popup>
                            </Grid>
                            <Border Margin="0,0,11,0" x:Name="MainPanelBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0,0,0,0" Padding="{TemplateBinding Padding}" >
                                <Grid>
                                    <Border x:Name="BackgroundNorm" Background="{StaticResource grayGradient}" BorderThickness="1" BorderBrush="#FF8E8F8F"/>
                                    <DockPanel KeyboardNavigation.TabIndex="1" KeyboardNavigation.TabNavigation="Local">
                                        <Thumb Padding="6,5,1,6" Margin="-3,-1,0,0" x:Name="ToolBarThumb" Style="{StaticResource ToolBarThumbStyle}" Width="10"/>
                                        <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" Margin="4,0,4,0" x:Name="ToolBarHeader" VerticalAlignment="Center" ContentSource="Header"/>
                                        <Grid>
                                            <Border x:Name="BackgroundNorm1" Background="{StaticResource grayGradient}" BorderThickness="0,1,0,1" BorderBrush="#FF8E8F8F"/>
                                            <ToolBarPanel SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="0,1,2,2" x:Name="PART_ToolBarPanel" IsItemsHost="true" />
                                        </Grid>
                                    </DockPanel>
                                </Grid>
                            </Border>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsOverflowOpen" Value="true">
                                <Setter Property="IsEnabled" TargetName="ToolBarThumb" Value="false"/>
                            </Trigger>
                            <Trigger Property="Header" Value="{x:Null}">
                                <Setter Property="Visibility" TargetName="ToolBarHeader" Value="Collapsed"/>
                            </Trigger>
                            <Trigger Property="ToolBarTray.IsLocked" Value="true">
                                <Setter Property="Visibility" TargetName="ToolBarThumb" Value="Collapsed"/>
                            </Trigger>
                            <Trigger Property="HasDropShadow" SourceName="OverflowPopup" Value="true">
                                <Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5"/>
                                <Setter Property="SnapsToDevicePixels" TargetName="Shdw" Value="true"/>
                                <Setter Property="Background" TargetName="Shdw" Value="#71000000"/>
                            </Trigger>
                            <Trigger Property="Orientation" Value="Vertical">
                                <Setter Property="Margin" TargetName="Grid" Value="1,3,1,1"/>
                                <Setter Property="Style" TargetName="OverflowButton" Value="{StaticResource ToolBarVerticalOverflowButtonStyle}"/>
                                <Setter Property="Height" TargetName="ToolBarThumb" Value="10"/>
                                <Setter Property="Width" TargetName="ToolBarThumb" Value="Auto"/>
                                <Setter Property="Margin" TargetName="ToolBarThumb" Value="-1,-3,0,0"/>
                                <Setter Property="Padding" TargetName="ToolBarThumb" Value="5,6,6,1"/>
                                <Setter Property="Margin" TargetName="ToolBarHeader" Value="0,0,0,4"/>
                                <Setter Property="Margin" TargetName="PART_ToolBarPanel" Value="1,0,2,2"/>
                                <Setter Property="DockPanel.Dock" TargetName="ToolBarThumb" Value="Top"/>
                                <Setter Property="DockPanel.Dock" TargetName="ToolBarHeader" Value="Top"/>
                                <Setter Property="HorizontalAlignment" TargetName="OverflowGrid" Value="Stretch"/>
                                <Setter Property="VerticalAlignment" TargetName="OverflowGrid" Value="Bottom"/>
                                <Setter Property="Placement" TargetName="OverflowPopup" Value="Right"/>
                                <Setter Property="Margin" TargetName="MainPanelBorder" Value="0,0,0,11"/>
                                <Setter Property="Background" Value="{StaticResource ToolBarVerticalBackground}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Foreground" Value="#FF000000"/>
        </Style>

        <BorderGapMaskConverter x:Key="BorderGapMaskConverter" />
        <Style TargetType="{x:Type GroupBox}">
            <Setter Property="BorderBrush" Value="#D5DFE5" />
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
            <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 Grid.ColumnSpan="4" Grid.Row="1" Grid.RowSpan="3" BorderThickness="1,1,1,1" CornerRadius="4" >
                                <Border.OpacityMask>
                                    <MultiBinding Converter="{StaticResource BorderGapMaskConverter}" ConverterParameter="7">
                                        <Binding Path="ActualWidth" ElementName="Header" />
                                        <Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" />
                                        <Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" />
                                    </MultiBinding>
                                </Border.OpacityMask>
                            </Border>
                            <Border Grid.Column="0" Grid.ColumnSpan="4" Grid.Row="1" Grid.RowSpan="3" Background="#FFFFFFFF" BorderBrush="{StaticResource TextBoxNorm}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" x:Name="ContentBorder" />
                            <!--<Border x:Name="DropDownBorder" Background="#FFFFFFFF" BorderBrush="{StaticResource TextBoxNorm}" BorderThickness="1" CornerRadius="1,1,3,3"/>-->
                            <Border x:Name="BackgroundNorm" Background="{StaticResource grayGradient}" BorderThickness="1" BorderBrush="#FF8E8F8F" CornerRadius="3,3,0,0" Grid.ColumnSpan="4" Grid.RowSpan="2"/>

                            <Border x:Name="Header" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" Padding="3,1,3,0">
                                <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentSource="Header" RecognizesAccessKey="True" Margin="0,4,0,4" />
                            </Border>

                            <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="2" />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Foreground" Value="{DynamicResource OutsideFontColor}"/>
        </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 SnapsToDevicePixels="true" Background="{TemplateBinding Background}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <DockPanel Margin="{TemplateBinding Padding}">
                                <ScrollViewer Focusable="false" DockPanel.Dock="Top" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
                                    <GridViewHeaderRowPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="2,0,2,0" AllowsColumnReorder="{Binding Path=TemplatedParent.View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContainerStyle="{Binding Path=TemplatedParent.View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContextMenu="{Binding Path=TemplatedParent.View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplate="{Binding Path=TemplatedParent.View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplateSelector="{Binding Path=TemplatedParent.View.ColumnHeaderTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderToolTip="{Binding Path=TemplatedParent.View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}" Columns="{Binding Path=TemplatedParent.View.Columns, RelativeSource={RelativeSource TemplatedParent}}" />

                                </ScrollViewer>
                                <ScrollContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" x:Name="PART_ScrollContentPresenter" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" CanContentScroll="{TemplateBinding CanContentScroll}" KeyboardNavigation.DirectionalNavigation="Local" />
                            </DockPanel>
                            <ScrollBar Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Cursor="Arrow" x:Name="PART_HorizontalScrollBar" Grid.Row="1" Orientation="Horizontal" ViewportSize="{TemplateBinding ViewportWidth}" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0.0" Value="{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
                            <ScrollBar Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Cursor="Arrow" x:Name="PART_VerticalScrollBar" Grid.Column="1" Orientation="Vertical" ViewportSize="{TemplateBinding ViewportHeight}" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0.0" Value="{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
                            <DockPanel Grid.Column="1" Grid.Row="1" Background="{Binding Path=Background, ElementName=PART_VerticalScrollBar}" LastChildFill="false">
                                <Rectangle Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Width="1" Fill="White" DockPanel.Dock="Left" />
                                <Rectangle Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Height="1" Fill="White" DockPanel.Dock="Top" />
                            </DockPanel>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style TargetType="{x:Type ListView}">
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
            <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="HorizontalContentAlignment" Value="Stretch" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="BorderBrush" Value="{StaticResource btnPressStroke2}"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Padding" Value="1"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListView}">
                        <Border BorderThickness="{TemplateBinding BorderThickness}" Background="#FFFFFFFF" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="2">

                            <ScrollViewer Padding="{TemplateBinding Padding}" Style="{DynamicResource {x:Static GridView.GridViewScrollViewerStyleKey}}">
                                <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            </ScrollViewer>
                        </Border>

                        <ControlTemplate.Triggers>
                            <Trigger Property="IsGrouping" Value="true">
                                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false"/>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ListViewItemFocusVisual">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Rectangle Stroke="#8E6EA6F5" StrokeThickness="1" RadiusX="2" RadiusY="2" />
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="{x:Type ListViewItem}">
            <Setter Property="FocusVisualStyle" Value="{StaticResource ListViewItemFocusVisual}" />
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="Margin" Value="0,0,0,1" />
            <Setter Property="Padding" Value="5,2,5,2" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
            <Setter Property="Padding" Value="3" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListViewItem}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundGradientOver" Storyboard.TargetProperty="Opacity" To="0.73"/>
                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundGradientOver" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="SelectedOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundGradientSelected" Storyboard.TargetProperty="Opacity" To="0.84"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundGradientSelectedDisabled" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="SelectedOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundGradientSelected" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundGradientSelectedDisabled" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Border SnapsToDevicePixels="true" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2" x:Name="border">

                            <Grid Margin="2,0,2,0">
                                <Rectangle x:Name="BackgroundGradientOver" Fill="{StaticResource hoverGradient}" Stroke="{StaticResource hoverStroke}" RadiusX="2" RadiusY="2" Opacity="0"/>
                                <Rectangle x:Name="BackgroundGradientSelectedDisabled" Fill="{StaticResource grayGradient}" Stroke="#7F8E8F8F" RadiusX="2" RadiusY="2" Opacity="0"/>
                                <Rectangle x:Name="BackgroundGradientSelected" Fill="{StaticResource BtnOverFill}" Stroke="{StaticResource selectedStroke}" RadiusX="2" RadiusY="2" Opacity="0"/>
                                <Rectangle x:Name="BackgroundHighlight" Margin="1" Stroke="#A0FFFFFF" RadiusX="1" RadiusY="1"/>
                                <GridViewRowPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="0,2,0,2" VerticalAlignment="Stretch" />
                            </Grid>

                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                                </Trigger.EnterActions>
                            </Trigger>
                            <Trigger Property="IsSelected" Value="true">

                                <Trigger.ExitActions>
                                    <BeginStoryboard x:Name="SelectedOff_BeginStoryboard" Storyboard="{StaticResource SelectedOff}"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard x:Name="SelectedOn_BeginStoryboard" Storyboard="{StaticResource SelectedOn}"/>
                                </Trigger.EnterActions>

                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
                                <Setter Property="Visibility" TargetName="BackgroundGradientSelected" Value="Hidden"/>
                            </Trigger>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsSelected" Value="true" />
                                    <Condition Property="Selector.IsSelectionActive" Value="false" />
                                </MultiTrigger.Conditions>

                            </MultiTrigger>

                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>


        <Style x:Key="GridViewColumnHeaderGripper" TargetType="{x:Type Thumb}">
            <Setter Property="Canvas.Right" Value="-8.5" />
            <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="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <Border Padding="{TemplateBinding Padding}" Background="#00FFFFFF">
                            <Rectangle HorizontalAlignment="Center" Width="0.5">
                                <Rectangle.Fill>
                                    <SolidColorBrush Color="{DynamicResource WhiteColor}" />
                                </Rectangle.Fill>
                            </Rectangle>
                        </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="Padding" Value="2,0,2,0" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundOver" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundOver_Highlight" Storyboard.TargetProperty="Opacity" To="0.65"/>
                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundOver" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundOver_Highlight" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="PressedOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity" To="0.84"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgoundPressed_Highlight" Storyboard.TargetProperty="Opacity" To="0.65"/>
                            </Storyboard>
                            <Storyboard x:Key="PressedOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgoundPressed_Highlight" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Grid Margin="0,1,0,1">
                            <Grid>
                                <Border x:Name="BackgroundNorm" Background="{StaticResource grayGradient}" BorderThickness="1" BorderBrush="#FF8E8F8F"/>
                                <Border x:Name="BackgroundNorm_highlight" Margin="1" BorderBrush="#F2FFFFFF" BorderThickness="1,0,1,1" Opacity="0.65"/>
                                <Border x:Name="BackgroundOver" Background="{StaticResource BtnOverFill}" BorderBrush="{StaticResource TextBoxPressBrush}" BorderThickness="1" Opacity="0"/>
                                <Border x:Name="BackgroundOver_Highlight" Margin="1" Background="{StaticResource btnOverFillHighlight}" BorderBrush="{StaticResource hoverStroke}" BorderThickness="1,0,1,1" Opacity="0"/>
                                <Border x:Name="BackgroundPressed" Background="{StaticResource BtnPressFill}" BorderBrush="{StaticResource btnPressBorder}" BorderThickness="1" Opacity="0"/>
                                <Border x:Name="BackgoundPressed_Highlight" Background="{StaticResource btnPressFillHighlight}" Margin="1" Opacity="0"/>
                                <Border x:Name="Background_overlay" Margin="1,1,1,0" BorderThickness="1">
                                    <Border.Background>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#00FFFFFF" Offset="0"/>
                                            <GradientStop Color="#72FFFFFF" Offset="0.157"/>
                                            <GradientStop Color="#72FFFFFF" Offset="0.5"/>
                                            <GradientStop Color="#00FFFFFF" Offset="0.51"/>
                                        </LinearGradientBrush>
                                    </Border.Background>
                                </Border>

                                <ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" Margin="2,2,2,2" />
                                <Border x:Name="DisabledVisualElement" Background="#FFF1F1F1" BorderBrush="#FFB2B2B2" BorderThickness="1" CornerRadius="3" IsHitTestVisible="false" Opacity="0"/>
                            </Grid>
                            <Canvas>
                                <Thumb x:Name="PART_HeaderGripper" Style="{StaticResource GridViewColumnHeaderGripper}" HorizontalAlignment="Stretch" />
                            </Canvas>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                                </Trigger.EnterActions>
                                <Setter TargetName="PART_HeaderGripper" Property="Background" Value="Transparent" />
                            </Trigger>
                            <Trigger Property="IsPressed" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOff}" x:Name="PressedOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOn}" x:Name="PressedOn_BeginStoryboard"/>
                                </Trigger.EnterActions>
                                <Setter TargetName="PART_HeaderGripper" Property="Visibility" Value="Hidden" />
                                <Setter Property="Background" Value="SkyBlue" />
                            </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}}" />
                                <Setter Property="Opacity" TargetName="DisabledVisualElement" Value="0.4"/>
                            </Trigger>
                            <Trigger Property="Role" Value="Padding">
                                <Setter TargetName="PART_HeaderGripper" Property="Visibility" Value="Collapsed" />
                            </Trigger>
                            <Trigger Property="Role" Value="Floating">
                                <Setter TargetName="PART_HeaderGripper" Property="Visibility" Value="Collapsed" />
                                <Setter Property="Background" Value="Yellow" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="{x:Type ToggleButton}">
            <Setter Property="FocusVisualStyle" Value="{StaticResource NuclearButtonFocusVisual}" />
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="Foreground" Value="{DynamicResource OutsideFontColor}" />
            <Setter Property="HorizontalContentAlignment" Value="Center" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="Padding" Value="1" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ToggleButton}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="HoverOn">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundOver" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundOver_Highlight" Storyboard.TargetProperty="Opacity" To="0.65"/>

                            </Storyboard>
                            <Storyboard x:Key="HoverOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundOver" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundOver_Highlight" Storyboard.TargetProperty="Opacity" To="0"/>

                            </Storyboard>
                            <Storyboard x:Key="CheckedOn">
                                <Storyboard>
                                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundChecked" Storyboard.TargetProperty="Opacity" To="1"/>
                                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgoundChecked_Highlight" Storyboard.TargetProperty="Opacity" To="1"/>
                                </Storyboard>
                            </Storyboard>
                            <Storyboard x:Key="CheckedOff">
                                <Storyboard>
                                    <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundChecked" Storyboard.TargetProperty="Opacity" To="0"/>
                                    <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgoundChecked_Highlight" Storyboard.TargetProperty="Opacity" To="0"/>
                                </Storyboard>
                            </Storyboard>

                            <Storyboard x:Key="PressedOn">
                                <DoubleAnimation Duration="0" Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity" To="1"/>
                                <DoubleAnimation Duration="0" Storyboard.TargetName="BackgoundPressed_Highlight" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>
                            <Storyboard x:Key="PressedOff">
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity" To="0"/>
                                <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgoundPressed_Highlight" Storyboard.TargetProperty="Opacity" To="0"/>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOn">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="FocusedOff">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>

                        </ControlTemplate.Resources>
                        <Grid x:Name="grid1" >
                            <Border x:Name="BackgroundNorm" Background="{StaticResource grayGradient}" BorderThickness="1" BorderBrush="#FF8E8F8F" CornerRadius="3"/>
                            <Border x:Name="BackgroundNorm_highlight" Margin="1" BorderBrush="#F2FFFFFF" BorderThickness="1,0,1,1" CornerRadius="3" Opacity="0.65"/>
                            <Border x:Name="BackgroundChecked" Background="{StaticResource BtnPressFill}" BorderBrush="{StaticResource btnPressBorder}" BorderThickness="1" CornerRadius="3" Opacity="0"/>
                            <Border x:Name="BackgoundChecked_Highlight" Background="{StaticResource btnPressFillHighlight}" Margin="1" CornerRadius="2.5" Opacity="0"/>
                            <Border x:Name="BackgroundOver" Background="{StaticResource BtnOverFill}" BorderBrush="{StaticResource TextBoxPressBrush}" BorderThickness="1" CornerRadius="3" Opacity="0"/>
                            <Border x:Name="BackgroundOver_Highlight" Margin="1" Background="{StaticResource btnOverFillHighlight}" BorderBrush="{StaticResource hoverStroke}" BorderThickness="1,0,1,1" CornerRadius="3" Opacity="0"/>
                            <Border x:Name="BackgroundPressed" Background="{StaticResource BtnPressFill}" BorderBrush="{StaticResource btnPressBorder}" BorderThickness="1" CornerRadius="3" Opacity="0"/>
                            <Border x:Name="BackgoundPressed_Highlight" Background="{StaticResource btnPressFillHighlight}" Margin="1" CornerRadius="2.5" Opacity="0"/>
                            <Border x:Name="Background_overlay" Margin="1,0,1,0" BorderThickness="1" CornerRadius="3,3,0,0">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#00FFFFFF" Offset="0"/>
                                        <GradientStop Color="#72FFFFFF" Offset="0.157"/>
                                        <GradientStop Color="#72FFFFFF" Offset="0.5"/>
                                        <GradientStop Color="#00FFFFFF" Offset="0.51"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border x:Name="DisabledVisualElement" Background="#FFF1F1F1" BorderBrush="#FFB2B2B2" BorderThickness="1" CornerRadius="3" IsHitTestVisible="false" Visibility="Collapsed"/>
                            <ContentPresenter
								x:Name="contentPresenter"
								Content="{TemplateBinding Content}"
								ContentTemplate="{TemplateBinding ContentTemplate}"
								VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
								HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
								Margin="{TemplateBinding Padding}"/>
                            <TextBlock Panel.ZIndex="1"
                            	x:Name="DisabledOverlay"
                            	Text="{TemplateBinding Content}"
                            	Foreground="#FF8E96A2"
                            	HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            	VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
								Margin="{TemplateBinding Padding}"
                            	Visibility="Collapsed"/>
                            <Border x:Name="FocusVisualElement" Margin="1" BorderBrush="{StaticResource btnFocus}" BorderThickness="1" CornerRadius="2" IsHitTestVisible="false" Visibility="Collapsed"/>
                        </Grid>

                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                                </Trigger.EnterActions>

                            </Trigger>
                            <Trigger Property="IsPressed" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOff}" />
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource PressedOn}"/>
                                </Trigger.EnterActions>

                            </Trigger>
                            <Trigger Property="IsKeyboardFocused" Value="true"/>
                            <Trigger Property="IsChecked" Value="true">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource CheckedOff}" />
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource CheckedOn}"/>
                                </Trigger.EnterActions>

                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="#ADADAD" />
                                <Setter Property="Visibility" TargetName="DisabledVisualElement" Value="Visible"/>
                                <Setter Property="Visibility" TargetName="DisabledOverlay" Value="Visible"/>
                                <Setter Property="Visibility" TargetName="contentPresenter" Value="Collapsed"/>
                                <Setter Property="Opacity" TargetName="DisabledVisualElement" Value="1"/>


                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="ToolTip">
            <Setter Property="Foreground" Value="#FF525552"/>
            <Setter Property="Padding" Value="3,0,3,0"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ToolTip">
                        <Border x:Name="Root">
                            <Border BorderBrush="#FF737573" BorderThickness="1" CornerRadius="2" Padding="4">
                                <Border.Resources>
                                    <Storyboard x:Key="Visible State"/>
                                    <Storyboard x:Key="Normal State"/>
                                </Border.Resources>
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                        <GradientStop Color="#FFE7E7F7" Offset="1"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                                <ContentPresenter
	                                Content="{TemplateBinding Content}"
	                                ContentTemplate="{TemplateBinding ContentTemplate}"
	                                Cursor="{TemplateBinding Cursor}"
	                                Margin="{TemplateBinding Padding}" />
                            </Border>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    </ResourceDictionary>
