---
title: "wpf theme"
author: "EvenCode"
date: "2013-05-21T21:30:18Z"
tags: []
categories: ["编程语言"]
slug: "wpf-theme"
draft: false
lastmod: "2013-05-21T21:31:26Z"
id: 1873029
url: "https://evencode.iteye.com/blog/1873029"
---

&lt;ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

     xmlns:wb="clr-namespace:RichFramework.Core.WorkBench;assembly=Rich.Framework.Core"

     xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"

 

     xmlns:ibc="clr-namespace:Microsoft.Windows.Controls.Core.Converters;assembly=WPFToolkit.Extended"

     xmlns:bc="clr-namespace:Microsoft.Windows.Controls.Chromes;assembly=WPFToolkit.Extended"

     xmlns:local="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"

     xmlns:vc="clr-namespace:Rich.Testability.View.Core;assembly=Rich.Testability.View.Core"

     xmlns:theme2="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"&gt;

 

    &lt;Color x:Key="PrimaryColor"&gt;#FF63AADA&lt;/Color&gt;

    &lt;Color x:Key="SecondaryColor"&gt;#FFA0FCFF&lt;/Color&gt;

    &lt;SolidColorBrush x:Key="PrimaryBrush" Color="{StaticResource PrimaryColor}" /&gt;

    &lt;SolidColorBrush x:Key="SecondaryBrush" Color="{StaticResource SecondaryColor}" /&gt;

    &lt;SolidColorBrush x:Key="TextBrush" Color="#FF152937" /&gt;

    &lt;SolidColorBrush x:Key="DisabledColor" Color="#8CFFFFFF" /&gt;

    &lt;SolidColorBrush x:Key="BackgroundBrush" Color="#FFFFFFFF" /&gt;

 

    &lt;Color x:Key="TextboxOver1"&gt;#FF5296BD&lt;/Color&gt;

    &lt;Color x:Key="TextboxOver2"&gt;#FFC2E4F6&lt;/Color&gt;

    &lt;Color x:Key="TextboxPress1"&gt;#FF3B79AC&lt;/Color&gt;

    &lt;Color x:Key="TextboxPress2"&gt;#FFB2DBED&lt;/Color&gt;

 

    &lt;SolidColorBrush x:Key="OutsideFontColor" Color="#FF000000" /&gt;

    &lt;LinearGradientBrush x:Key="grayGradient" EndPoint="0.5,1" StartPoint="0.5,0"&gt;

        &lt;GradientStop Color="#FFFFFFFF" Offset="0" /&gt;

        &lt;GradientStop Color="#FFEDEDED" Offset="0.171" /&gt;

        &lt;GradientStop Color="#FFE7E7E7" Offset="0.5" /&gt;

        &lt;GradientStop Color="#FFDCDCDC" Offset="0.51" /&gt;

        &lt;GradientStop Color="#FFEAEBEC" Offset="1" /&gt;

    &lt;/LinearGradientBrush&gt;

 

    &lt;Color x:Key="ItemOver1"&gt;#FFF4FAFD&lt;/Color&gt;

    &lt;Color x:Key="ItemOver2"&gt;#FFCFEDFD&lt;/Color&gt;

    &lt;Color x:Key="ItemOverStroke"&gt;#FFD8F0FA&lt;/Color&gt;

    &lt;Color x:Key="ItemSelectStroke"&gt;#FF98DDFB&lt;/Color&gt;

    &lt;Color x:Key="Over1"&gt;#FFE2F5FF&lt;/Color&gt;

    &lt;Color x:Key="Over2"&gt;#FFC0E7FC&lt;/Color&gt;

    &lt;Color x:Key="Over3"&gt;#FF9EDDFF&lt;/Color&gt;

    &lt;LinearGradientBrush x:Key="hoverGradient" EndPoint="0.5,1" StartPoint="0.5,0"&gt;

        &lt;GradientStop Color="{StaticResource ItemOver1}" Offset="0.5" /&gt;

        &lt;GradientStop Color="{StaticResource Over1}" Offset="0.5" /&gt;

        &lt;GradientStop Color="{StaticResource ItemOver2}" Offset="1" /&gt;

    &lt;/LinearGradientBrush&gt;

    &lt;SolidColorBrush x:Key="hoverStroke" Color="{StaticResource ItemOverStroke}" /&gt;

    &lt;LinearGradientBrush x:Key="BtnOverFill" EndPoint="0.5,1" StartPoint="0.5,0"&gt;

        &lt;GradientStop Color="{StaticResource Over1}" Offset="0.5" /&gt;

        &lt;GradientStop Color="{StaticResource Over2}" Offset="0.509" /&gt;

        &lt;GradientStop Color="{StaticResource Over3}" Offset="1" /&gt;

    &lt;/LinearGradientBrush&gt;

    &lt;SolidColorBrush x:Key="selectedStroke" Color="{StaticResource ItemSelectStroke}" /&gt;

 

 

    &lt;SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" /&gt;

    &lt;SolidColorBrush x:Key="BaseColorBrush" Color="#FF4CB6F2" /&gt;

    &lt;SolidColorBrush x:Key="HoverBrush" Color="#FFFBF445" /&gt;

    &lt;SolidColorBrush x:Key="HyperlinkBrush" Color="#FF549DE6" /&gt;

    &lt;SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFFFFFFF" /&gt;

    &lt;LinearGradientBrush x:Key="TextBoxNorm" EndPoint="0.5,1" StartPoint="0.5,0"&gt;

        &lt;GradientStop Color="#FFABAEB3" Offset="0" /&gt;

        &lt;GradientStop Color="#FFE2E8EE" Offset="0.355" /&gt;

    &lt;/LinearGradientBrush&gt;

    &lt;LinearGradientBrush x:Key="NormalBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0"&gt;

        &lt;GradientStop Color="{StaticResource NormalBorderBrushGradient1}" /&gt;

        &lt;GradientStop Color="{StaticResource NormalBorderBrushGradient2}" Offset="0.38" /&gt;

        &lt;GradientStop Color="{StaticResource NormalBorderBrushGradient3}" Offset="0.384" /&gt;

        &lt;GradientStop Color="{StaticResource NormalBorderBrushGradient4}" Offset="1" /&gt;

    &lt;/LinearGradientBrush&gt;

    &lt;LinearGradientBrush x:Key="TextBoxOver" EndPoint="0.5,1" StartPoint="0.5,0"&gt;

        &lt;GradientStop Color="{StaticResource TextboxOver1}" Offset="0" /&gt;

        &lt;GradientStop Color="{StaticResource TextboxOver2}" Offset="0.355" /&gt;

    &lt;/LinearGradientBrush&gt;

    &lt;LinearGradientBrush x:Key="TextBoxFocus" EndPoint="0.5,1" StartPoint="0.5,0"&gt;

        &lt;GradientStop Color="{StaticResource TextboxPress1}" Offset="0" /&gt;

        &lt;GradientStop Color="{StaticResource TextboxPress2}" Offset="0.355" /&gt;

    &lt;/LinearGradientBrush&gt;

    &lt;LinearGradientBrush x:Key="DisabledBackgroundBrush" EndPoint="0.5,1" StartPoint="0.5,0"&gt;

        &lt;GradientStop Color="#FFFFFFFF" /&gt;

        &lt;GradientStop Color="#FF62676A" Offset="1" /&gt;

        &lt;GradientStop Color="#FFD1D4D6" Offset="0.41800001263618469" /&gt;

        &lt;GradientStop Color="#FFA9AFB5" Offset="0.425" /&gt;

    &lt;/LinearGradientBrush&gt;

    &lt;SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" /&gt;

    &lt;LinearGradientBrush x:Key="NormalBrush" EndPoint="0.5,1" StartPoint="0.5,0"&gt;

        &lt;GradientStop Color="{StaticResource NormalBrushGradient1}" Offset="0" /&gt;

        &lt;GradientStop Color="{StaticResource NormalBrushGradient2}" Offset="0.41800001263618469" /&gt;

        &lt;GradientStop Color="{StaticResource NormalBrushGradient3}" Offset="0.418" /&gt;

        &lt;GradientStop Color="{StaticResource NormalBrushGradient4}" Offset="1" /&gt;

    &lt;/LinearGradientBrush&gt;

 

    &lt;LinearGradientBrush x:Key="WrapPanelBackgroundBrush" Opacity="0.3" StartPoint="0,0" EndPoint="0.5,1"&gt;

        &lt;GradientStop Color="Transparent" Offset="0.994" /&gt;

        &lt;GradientStop Color="Transparent" Offset="0.099" /&gt;

        &lt;GradientStop Color="Snow" Offset="0.262" /&gt;

        &lt;GradientStop Color="Snow" Offset="0.75" /&gt;

        &lt;GradientStop Color="Snow" Offset="0.471" /&gt;

    &lt;/LinearGradientBrush&gt;

 

    &lt;ibc:InverseBoolConverter x:Key="InverseBoolConverter" /&gt;

    &lt;LinearGradientBrush x:Key="PopupDarkBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0"&gt;

        &lt;GradientStop Color="#FFA3AEB9" Offset="0" /&gt;

        &lt;GradientStop Color="#FF8399A9" Offset="0.375" /&gt;

        &lt;GradientStop Color="#FF718597" Offset="0.375" /&gt;

        &lt;GradientStop Color="#FF617584" Offset="1" /&gt;

    &lt;/LinearGradientBrush&gt;

    &lt;LinearGradientBrush x:Key="PopupBackgroundBrush" StartPoint="0,0" EndPoint="0,1"&gt;

        &lt;LinearGradientBrush.GradientStops&gt;

            &lt;GradientStopCollection&gt;

                &lt;GradientStop Offset="0" Color="#FFffffff" /&gt;

                &lt;GradientStop Offset="1" Color="#FFE8EBED" /&gt;

            &lt;/GradientStopCollection&gt;

        &lt;/LinearGradientBrush.GradientStops&gt;

    &lt;/LinearGradientBrush&gt;

 

    &lt;Style x:Key="LoadingAdorner" TargetType="ContentControl"&gt;

        &lt;Setter Property="Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="ContentControl"&gt;

                    &lt;Grid&gt;

                        &lt;Grid.Resources&gt;

                            &lt;Style TargetType="{x:Type Grid}"&gt;

                                &lt;Setter Property="Background"  Value="{x:Null}"&gt;&lt;/Setter&gt;

                            &lt;/Style&gt;

                        &lt;/Grid.Resources&gt;

                        &lt;Border Width="230" Height="150" CornerRadius="10"&gt;

                            &lt;Border.Background&gt;

                                &lt;RadialGradientBrush GradientOrigin="0.15,0.25" Opacity="0.4" Center="0.45,0.45" RadiusX="0.5" RadiusY="0.5"&gt;

                                    &lt;RadialGradientBrush.GradientStops&gt;

                                        &lt;GradientStop Color="Transparent" Offset="0" /&gt;

                                        &lt;GradientStop Color="LightGray" Offset="0.45" /&gt;

                                        &lt;GradientStop Color="DarkGray" Offset="1" /&gt;

                                    &lt;/RadialGradientBrush.GradientStops&gt;

                                &lt;/RadialGradientBrush&gt;

                            &lt;/Border.Background&gt;

                            &lt;Rectangle Width="150" Height="150"&gt;

                                &lt;Rectangle.Fill&gt;

                                    &lt;VisualBrush Stretch="None"&gt;

                                        &lt;VisualBrush.Visual&gt;

                                            &lt;Canvas RenderTransformOrigin="0.5,0.5"&gt;

                                                &lt;Ellipse Width="20" Height="20" Canvas.Left="71.16" Canvas.Top="3.0" Stretch="Fill" Fill="#FF000000"/&gt;

                                                &lt;Ellipse Width="20" Height="20" Canvas.Left="71.16" Canvas.Top="139.8" Stretch="Fill" Fill="#85000000"/&gt;

                                                &lt;Ellipse Width="20" Height="20" Canvas.Left="139.58" Canvas.Top="71.41" Stretch="Fill" Fill="#C2000000"/&gt;

                                                &lt;Ellipse Width="20" Height="20" Canvas.Left="2.75" Canvas.Top="71.41" Stretch="Fill" Fill="#48000000"/&gt;

                                                &lt;Ellipse Width="20" Height="20" Canvas.Left="22.78" Canvas.Top="23.03" Stretch="Fill" Fill="#29000000"/&gt;

                                                &lt;Ellipse Width="20" Height="20" Canvas.Left="119.54" Canvas.Top="119.79" Stretch="Fill" Fill="#A4000000"/&gt;

                                                &lt;Ellipse Width="20" Height="20" Canvas.Left="119.54" Canvas.Top="23.03" Stretch="Fill" Fill="#E1000000"/&gt;

                                                &lt;Ellipse Width="20" Height="20" Canvas.Left="22.78" Canvas.Top="119.79" Stretch="Fill" Fill="#67000000"/&gt;

                                                &lt;Ellipse Width="20" Height="20" Canvas.Left="44.98" Canvas.Top="8.20" Stretch="Fill" Fill="#1A000000"/&gt;

                                                &lt;Ellipse Width="20" Height="20" Canvas.Left="97.34" Canvas.Top="134.62" Stretch="Fill" Fill="#94000000"/&gt;

                                                &lt;Ellipse Width="20" Height="20" Canvas.Left="134.37" Canvas.Top="45.23" Stretch="Fill" Fill="#D2000000"/&gt;

                                                &lt;Ellipse Width="20" Height="20" Canvas.Left="7.95" Canvas.Top="97.59" Stretch="Fill" Fill="#57000000"/&gt;

                                                &lt;Ellipse Width="20" Height="20" Canvas.Left="7.95" Canvas.Top="45.23" Stretch="Fill" Fill="#39000000"/&gt;

                                                &lt;Ellipse Width="20" Height="20" Canvas.Left="134.37" Canvas.Top="97.59" Stretch="Fill" Fill="#B3000000"/&gt;

                                                &lt;Ellipse Width="20" Height="20" Canvas.Left="97.34" Canvas.Top="8.20" Stretch="Fill" Fill="#F0000000"/&gt;

                                                &lt;Ellipse Width="20" Height="20" Canvas.Left="44.98" Canvas.Top="134.62" Stretch="Fill" Fill="#76000000"/&gt;

                                                &lt;Canvas.RenderTransform&gt;

                                                    &lt;RotateTransform Angle="0"/&gt;

                                                &lt;/Canvas.RenderTransform&gt;

                                                &lt;Canvas.LayoutTransform&gt;

                                                    &lt;ScaleTransform ScaleX="0.5" ScaleY="0.5" /&gt;

                                                &lt;/Canvas.LayoutTransform&gt;

                                                &lt;Canvas.Triggers&gt;

                                                    &lt;EventTrigger RoutedEvent="ContentControl.Loaded"&gt;

                                                        &lt;BeginStoryboard&gt;

                                                            &lt;Storyboard&gt;

                                                                &lt;DoubleAnimation Storyboard.TargetProperty="(Canvas.RenderTransform).Angle" From="0" To="360" Duration="0:0:1" RepeatBehavior="Forever" /&gt;

                                                            &lt;/Storyboard&gt;

                                                        &lt;/BeginStoryboard&gt;

                                                    &lt;/EventTrigger&gt;

                                                &lt;/Canvas.Triggers&gt;

                                            &lt;/Canvas&gt;

                                        &lt;/VisualBrush.Visual&gt;

                                    &lt;/VisualBrush&gt;

 

                                &lt;/Rectangle.Fill&gt;

                            &lt;/Rectangle&gt;

                        &lt;/Border&gt;

 

                        &lt;ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" /&gt;

                    &lt;/Grid&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

 

    &lt;Style x:Key="NotifyInfoAdorner" TargetType="ContentControl"&gt;

        &lt;Setter Property="Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="ContentControl"&gt;

                    &lt;Grid&gt;

                        &lt;Grid.Resources&gt;

                            &lt;Style TargetType="{x:Type Grid}"&gt;

                                &lt;Setter Property="Background"  Value="{x:Null}"&gt;&lt;/Setter&gt;

                            &lt;/Style&gt;

                        &lt;/Grid.Resources&gt;

                        &lt;Border Width="230" Height="150" CornerRadius="10"&gt;

                            &lt;Border.Background&gt;

                                &lt;RadialGradientBrush GradientOrigin="0.15,0.25" Opacity="0.4" Center="0.45,0.45" RadiusX="0.5" RadiusY="0.5"&gt;

                                    &lt;RadialGradientBrush.GradientStops&gt;

                                        &lt;GradientStop Color="Transparent" Offset="0" /&gt;

                                        &lt;GradientStop Color="LightGray" Offset="0.45" /&gt;

                                        &lt;GradientStop Color="DarkGray" Offset="1" /&gt;

                                    &lt;/RadialGradientBrush.GradientStops&gt;

                                &lt;/RadialGradientBrush&gt;

                            &lt;/Border.Background&gt;

                        &lt;/Border&gt;

                        &lt;ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" /&gt;

                    &lt;/Grid&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

    

    &lt;Style x:Key="WrapPanelStyle" TargetType="WrapPanel"&gt;

        &lt;Setter Property="Effect" &gt;

            &lt;Setter.Value&gt;

                &lt;DropShadowEffect BlurRadius="10" Direction="345" Opacity="0.4" RenderingBias="Performance" ShadowDepth="20" /&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

        &lt;Setter Property="Background"&gt;

            &lt;Setter.Value&gt;

                &lt;LinearGradientBrush  Opacity="0.8" StartPoint="0,0" EndPoint="0.5,1"&gt;

                    &lt;GradientStop Color="Transparent" Offset="0.994" /&gt;

                    &lt;GradientStop Color="Transparent" Offset="0.099" /&gt;

                    &lt;GradientStop Color="Snow" Offset="0.262" /&gt;

                    &lt;GradientStop Color="Snow" Offset="0.75" /&gt;

                    &lt;GradientStop Color="Snow" Offset="0.471" /&gt;

                &lt;/LinearGradientBrush&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

        &lt;Style.Triggers&gt;

            &lt;Trigger Property="IsMouseOver" Value="True"&gt;

                &lt;Setter Property="Background"&gt;

                    &lt;Setter.Value&gt;

                        &lt;LinearGradientBrush  Opacity="0.7" StartPoint="0,0" EndPoint="0.5,1"&gt;

                            &lt;GradientStop Color="Transparent" Offset="0.994" /&gt;

                            &lt;GradientStop Color="Transparent" Offset="0.099" /&gt;

                            &lt;GradientStop Color="SteelBlue" Offset="0.262" /&gt;

                            &lt;GradientStop Color="SteelBlue" Offset="0.75" /&gt;

                            &lt;GradientStop Color="SteelBlue" Offset="0.471" /&gt;

                        &lt;/LinearGradientBrush&gt;

                    &lt;/Setter.Value&gt;

                &lt;/Setter&gt;

            &lt;/Trigger&gt;

        &lt;/Style.Triggers&gt;

    &lt;/Style&gt;

 

    &lt;Style x:Key="GlassButtonStyle" TargetType="{x:Type Button}"&gt;

        &lt;Setter Property="SnapsToDevicePixels" Value="True"/&gt;

        &lt;Setter Property="OverridesDefaultStyle" Value="True" /&gt;

        &lt;Setter Property="Template" &gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type Button}" &gt;

                    &lt;Grid&gt;

                        &lt;Ellipse Fill="{TemplateBinding Background}" /&gt;

                        &lt;Ellipse x:Name="RefractionLayer"&gt;

                            &lt;Ellipse.Fill&gt;

                                &lt;RadialGradientBrush GradientOrigin="0.496,1.052"&gt;

                                    &lt;RadialGradientBrush.RelativeTransform&gt;

                                        &lt;TransformGroup&gt;

                                            &lt;ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.5" ScaleY="1.5" /&gt;

                                            &lt;TranslateTransform X="0.02" Y="0.3" /&gt;

                                        &lt;/TransformGroup&gt;

                                    &lt;/RadialGradientBrush.RelativeTransform&gt;

                                    &lt;GradientStop Offset="1" Color="#33000000"/&gt;

                                    &lt;GradientStop Offset="0.4" Color="#FFFFFFFF" /&gt;

                                &lt;/RadialGradientBrush&gt;

                            &lt;/Ellipse.Fill&gt;

                        &lt;/Ellipse&gt;

 

                        &lt;Path x:Name="ReflectionLayer" VerticalAlignment="Top" Stretch="Fill"&gt;

                            &lt;Path.RenderTransform&gt;

                                &lt;ScaleTransform ScaleY="0.5" /&gt;

                            &lt;/Path.RenderTransform&gt;

                            &lt;Path.Data&gt;

                                &lt;PathGeometry&gt;

                                    &lt;PathFigure IsClosed="True" StartPoint="98.999,45.499"&gt;

                                        &lt;BezierSegment Point1="98.999,54.170" Point2="89.046,52.258" Point3="85.502,51.029"/&gt;

                                        &lt;BezierSegment IsSmoothJoin="True" Point1="75.860,47.685" Point2="69.111,45.196" Point3="50.167,45.196"/&gt;

                                        &lt;BezierSegment Point1="30.805,45.196" Point2="20.173,47.741" Point3="10.665,51.363"/&gt;

                                        &lt;BezierSegment IsSmoothJoin="True" Point1="7.469,52.580" Point2="1.000,53.252" Point3="1.000,44.999"/&gt;

                                        &lt;BezierSegment Point1="1.000,39.510" Point2="0.884,39.227" Point3="2.519,34.286" /&gt;

                                        &lt;BezierSegment IsSmoothJoin="True" Point1="9.106,14.370" Point2="27.875,0" Point3="50,0"/&gt;

                                        &lt;BezierSegment Point1="72.198,0" Point2="91.018,14.466" Point3="97.546,34.485"/&gt;

                                        &lt;BezierSegment IsSmoothJoin="True" Point1="99.139,39.369" Point2="98.999,40.084" Point3="98.999,45.499" /&gt;

                                    &lt;/PathFigure&gt;

                                &lt;/PathGeometry&gt;

                            &lt;/Path.Data&gt;

                            &lt;Path.Fill&gt;

                                &lt;RadialGradientBrush GradientOrigin="0.498,0.526"&gt;

                                    &lt;RadialGradientBrush.RelativeTransform&gt;

                                        &lt;TransformGroup&gt;

                                            &lt;ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1" ScaleY="1.997"/&gt;

                                            &lt;TranslateTransform X="0" Y="0.5" /&gt;

                                        &lt;/TransformGroup&gt;

                                    &lt;/RadialGradientBrush.RelativeTransform&gt;

                                    &lt;GradientStop Offset="1" Color="#FFFFFFFF"/&gt;

                                    &lt;GradientStop Offset="0.85" Color="#92FFFFFF" /&gt;

                                    &lt;GradientStop Offset="0" Color="#33000000" /&gt;

                                &lt;/RadialGradientBrush&gt;

                            &lt;/Path.Fill&gt;

                        &lt;/Path&gt;

                        &lt;ContentPresenter Margin="0.2,0.0" HorizontalAlignment="Center"  VerticalAlignment="Center" /&gt;

                    &lt;/Grid&gt;

 

                    &lt;ControlTemplate.Triggers&gt;

                        &lt;Trigger Property="IsMouseOver" Value="True"&gt;

                            &lt;Setter TargetName="RefractionLayer" Property="Fill"&gt;

                                &lt;Setter.Value&gt;

                                    &lt;RadialGradientBrush GradientOrigin="0.049,1.052"&gt;

                                        &lt;RadialGradientBrush.RelativeTransform&gt;

                                            &lt;TransformGroup&gt;

                                                &lt;ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.5" ScaleY="1.5" /&gt;

                                                &lt;TranslateTransform X="0.02" Y="0.3"/&gt;

                                            &lt;/TransformGroup&gt;

                                        &lt;/RadialGradientBrush.RelativeTransform&gt;

                                        &lt;GradientStop Offset="1" Color="#33000000" /&gt;

                                        &lt;GradientStop Offset="0.45" Color="#FFFFFFFF" /&gt;

                                    &lt;/RadialGradientBrush&gt;

                                &lt;/Setter.Value&gt;

                            &lt;/Setter&gt;

                            &lt;Setter TargetName="ReflectionLayer" Property="Fill"&gt;

                                &lt;Setter.Value&gt;

                                    &lt;RadialGradientBrush GradientOrigin="0.498,0.526"&gt;

                                        &lt;RadialGradientBrush.RelativeTransform&gt;

                                            &lt;TransformGroup&gt;

                                                &lt;ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.5" ScaleY="1.997" /&gt;

                                                &lt;TranslateTransform X="0" Y="0.5"/&gt;

                                            &lt;/TransformGroup&gt;

                                        &lt;/RadialGradientBrush.RelativeTransform&gt;

                                        &lt;GradientStop Offset="1" Color="#CCFFFFFF" /&gt;

                                        &lt;GradientStop Offset="0.85" Color="#66FFFFFF" /&gt;

                                        &lt;GradientStop Offset="0" Color="#33000000" /&gt;

                                    &lt;/RadialGradientBrush&gt;

                                &lt;/Setter.Value&gt;

                            &lt;/Setter&gt;

                        &lt;/Trigger&gt;

                        &lt;Trigger Property="IsPressed" Value="True"&gt;

                            &lt;Setter Property="OpacityMask"&gt;

                                &lt;Setter.Value&gt;

                                    &lt;RadialGradientBrush GradientOrigin="0.2,0.2" Center="0.2,0.2" RadiusX="0.5" RadiusY="0.5"&gt;

                                        &lt;RadialGradientBrush.GradientStops&gt;

                                            &lt;GradientStop Color="#33000000" Offset="0" /&gt;

                                            &lt;GradientStop Color="#FFFFFFFF" Offset="0.85" /&gt;

                                            &lt;GradientStop Color="#FFFFFFFF" Offset="1" /&gt;

                                        &lt;/RadialGradientBrush.GradientStops&gt;

                                    &lt;/RadialGradientBrush&gt;

                                &lt;/Setter.Value&gt;

                            &lt;/Setter&gt;

                            &lt;Setter Property="RenderTransform"&gt;

                                &lt;Setter.Value&gt;

                                    &lt;TransformGroup&gt;

                                        &lt;ScaleTransform CenterX="30" CenterY="30" ScaleX="1.1" ScaleY="1.1" /&gt;

                                        &lt;TranslateTransform X="0.5" Y="0.5"/&gt;

                                    &lt;/TransformGroup&gt;

                                &lt;/Setter.Value&gt;

                            &lt;/Setter&gt;

                        &lt;/Trigger&gt;

                    &lt;/ControlTemplate.Triggers&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

        &lt;Setter Property="Effect" &gt;

            &lt;Setter.Value&gt;

                &lt;DropShadowEffect Opacity="0.3" ShadowDepth="15" /&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

 

    &lt;Style x:Key="ListBoxStyle" TargetType="{x:Type ListBox}"&gt;

        &lt;Setter Property="ScrollViewer.CanContentScroll" Value="False"/&gt;

        &lt;Setter Property="ItemContainerStyle"&gt;

            &lt;Setter.Value&gt;

                &lt;Style TargetType="ListBoxItem"&gt;

                    &lt;Setter Property="UIElement.IsEnabled" Value="True" /&gt;

                    &lt;Setter Property="FrameworkElement.Cursor" Value="Arrow" /&gt;

                    &lt;Setter Property="Control.FontFamily" Value="Trebuchet MS" /&gt;

                    &lt;Setter Property="Control.Foreground" Value="#FF000000" /&gt;

                    &lt;Setter Property="HorizontalContentAlignment" Value="Stretch" /&gt;

                    &lt;Setter Property="Background"&gt;

                        &lt;Setter.Value&gt;

                            &lt;LinearGradientBrush Opacity="0.4" StartPoint="0,0" EndPoint="0,1"&gt;

                                &lt;GradientStop Color="Transparent" Offset="0"/&gt;

                                &lt;GradientStop Color="LightGray" Offset="1"/&gt;

                            &lt;/LinearGradientBrush&gt;

                        &lt;/Setter.Value&gt;

                    &lt;/Setter&gt;

                    &lt;Style.Triggers&gt;

                        &lt;Trigger Property="IsMouseOver" Value="True"&gt;

                            &lt;Setter Property="Background"&gt;

                                &lt;Setter.Value&gt;

                                    &lt;LinearGradientBrush Opacity="0.6" StartPoint="0,0" EndPoint="0,1"&gt;

                                        &lt;GradientStop Color="#92FFFFFF" Offset="0"/&gt;

                                        &lt;GradientStop Color="SkyBlue" Offset="1"/&gt;

                                    &lt;/LinearGradientBrush&gt;

                                &lt;/Setter.Value&gt;

                            &lt;/Setter&gt;

                        &lt;/Trigger&gt;

                    &lt;/Style.Triggers&gt;

                    &lt;Style.Resources&gt;

                        &lt;Style TargetType="Border"&gt;

                            &lt;Setter Property="CornerRadius" Value="5" /&gt;

                        &lt;/Style&gt;

                    &lt;/Style.Resources&gt;

                &lt;/Style&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

 

    &lt;Style x:Key="{x:Type Button}" TargetType="{x:Type Button}"&gt;

        &lt;Setter Property="Control.Foreground" Value="#FF1E2B33" /&gt;

        &lt;Setter Property="Control.FontFamily" Value="Trebuchet MS" /&gt;

        &lt;Setter Property="Control.FontSize" Value="10.5" /&gt;

        &lt;Setter Property="Control.Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type Button}"&gt;

                    &lt;Grid Background="Transparent"&gt;

                        &lt;VisualStateManager.VisualStateGroups&gt;

                            &lt;VisualStateGroup x:Name="CommonStates"&gt;

                                &lt;VisualStateGroup.Transitions&gt;

                                    &lt;VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" /&gt;

                                    &lt;VisualTransition GeneratedDuration="0:0:0.1" To="Pressed" /&gt;

                                &lt;/VisualStateGroup.Transitions&gt;

                                &lt;VisualState x:Name="Normal" /&gt;

                                &lt;VisualState x:Name="MouseOver"&gt;

                                    &lt;Storyboard&gt;

                                        &lt;DoubleAnimationUsingKeyFrames Storyboard.TargetName="FVElement" Storyboard.TargetProperty="(UIElement.Opacity)" BeginTime="00:00:00" Duration="00:00:00.0010000"&gt;

                                            &lt;SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" /&gt;

                                        &lt;/DoubleAnimationUsingKeyFrames&gt;

                                    &lt;/Storyboard&gt;

                                &lt;/VisualState&gt;

                                &lt;VisualState x:Name="Pressed"&gt;

                                    &lt;Storyboard&gt;

                                        &lt;DoubleAnimationUsingKeyFrames Storyboard.TargetName="FVElement" Storyboard.TargetProperty="(UIElement.Opacity)" BeginTime="00:00:00" Duration="00:00:00.0010000"&gt;

                                            &lt;SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" /&gt;

                                        &lt;/DoubleAnimationUsingKeyFrames&gt;

                                        &lt;ColorAnimationUsingKeyFrames Storyboard.TargetName="FVElement" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" BeginTime="00:00:00" Duration="00:00:00.0010000"&gt;

                                            &lt;SplineColorKeyFrame KeyTime="00:00:00" Value="#FF4486B6" /&gt;

                                        &lt;/ColorAnimationUsingKeyFrames&gt;

                                    &lt;/Storyboard&gt;

                                &lt;/VisualState&gt;

                                &lt;VisualState x:Name="Disabled"&gt;

                                    &lt;Storyboard&gt;

                                        &lt;DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DisabledOverlay" Storyboard.TargetProperty="(UIElement.Opacity)"&gt;

                                            &lt;SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" /&gt;

                                        &lt;/DoubleAnimationUsingKeyFrames&gt;

                                    &lt;/Storyboard&gt;

                                &lt;/VisualState&gt;

                            &lt;/VisualStateGroup&gt;

                            &lt;VisualStateGroup x:Name="FocusStates"&gt;

                                &lt;VisualState x:Name="Focused"&gt;

                                    &lt;Storyboard&gt;

                                        &lt;ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Visibility)"&gt;

                                            &lt;DiscreteObjectKeyFrame KeyTime="00:00:00"&gt;

                                                &lt;DiscreteObjectKeyFrame.Value&gt;

                                                    &lt;Visibility&gt;Visible&lt;/Visibility&gt;

                                                &lt;/DiscreteObjectKeyFrame.Value&gt;

                                            &lt;/DiscreteObjectKeyFrame&gt;

                                        &lt;/ObjectAnimationUsingKeyFrames&gt;

                                    &lt;/Storyboard&gt;

                                &lt;/VisualState&gt;

                                &lt;VisualState x:Name="Unfocused" /&gt;

                            &lt;/VisualStateGroup&gt;

                        &lt;/VisualStateManager.VisualStateGroups&gt;

                        &lt;Rectangle Name="FVElement" Stretch="Fill" StrokeLineJoin="Round" StrokeThickness="0.5" RadiusX="11" RadiusY="11" Opacity="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Fill="#004486B6"&gt;

                            &lt;Rectangle.Stroke&gt;

                                &lt;LinearGradientBrush EndPoint="0.5,-5" StartPoint="0.5,1"&gt;

                                    &lt;GradientStop Color="#FF6B7987" Offset="0" /&gt;

                                    &lt;GradientStop Color="#FFC1C7CE" Offset="1" /&gt;

                                &lt;/LinearGradientBrush&gt;

                            &lt;/Rectangle.Stroke&gt;

                        &lt;/Rectangle&gt;

                        &lt;Rectangle Name="Background" StrokeLineJoin="Round" StrokeThickness="0.5" RadiusX="9.5" RadiusY="9.5" Opacity="1" Margin="2"&gt;

                            &lt;Rectangle.Stroke&gt;

                                &lt;LinearGradientBrush EndPoint="0.5,-1.85" StartPoint="0.5,1.5"&gt;

                                    &lt;GradientStop Color="#FF4E5F70" Offset="0" /&gt;

                                    &lt;GradientStop Color="#FFF6F7FA" Offset="1" /&gt;

                                &lt;/LinearGradientBrush&gt;

                            &lt;/Rectangle.Stroke&gt;

                            &lt;Rectangle.Fill&gt;

                                &lt;LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"&gt;

                                    &lt;GradientStop Color="#FFFFFFFF" Offset="1" /&gt;

                                    &lt;GradientStop Color="#FF4CB6F2" Offset="0" /&gt;

                                &lt;/LinearGradientBrush&gt;

                            &lt;/Rectangle.Fill&gt;

                        &lt;/Rectangle&gt;

                        &lt;Path Name="WhiteBand" Height="4.25" Stretch="Fill" StrokeLineJoin="Round" Data="M4.2160064,2.75C4.2160064,1.6454305,5.1114369,1.7153466,6.2160064,1.7153466L22.679308,1.7153466C23.783877,1.7153466 24.679308,1.6454305 24.679308,2.75 24.679308,2.75 4.2160064,2.75 4.2160064,2.75z" Margin="7,4,7,0" HorizontalAlignment="Center" VerticalAlignment="Top"&gt;

                            &lt;Path.Fill&gt;

                                &lt;LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"&gt;

                                    &lt;GradientStop Color="#FFFFFFFF" Offset="0.5" /&gt;

                                    &lt;GradientStop Color="#FF50B8F2" Offset="1" /&gt;

                                &lt;/LinearGradientBrush&gt;

                            &lt;/Path.Fill&gt;

                        &lt;/Path&gt;

                        &lt;ContentPresenter Content="{TemplateBinding ContentControl.Content}" RecognizesAccessKey="True" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" Cursor="Hand" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" Margin="{TemplateBinding Control.Padding}" VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" /&gt;

                        &lt;Rectangle Name="FocusVisualElement" Stretch="Fill" StrokeThickness=".75" Stroke="#7F999999" StrokeDashCap="Square" StrokeDashArray="1 2" Margin="-1" Visibility="Collapsed" RadiusX="11" RadiusY="11" /&gt;

                        &lt;Rectangle Name="DisabledOverlay" StrokeLineJoin="Round" StrokeThickness="0.5" RadiusX="9.5" RadiusY="9.5" Opacity="0" Margin="2" Fill="#B2FFFFFF" Stroke="#B2FFFFFF" /&gt;

                    &lt;/Grid&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

 

    &lt;Style x:Key="{x:Type TextBox}" TargetType="{x:Type TextBox}"&gt;

        &lt;Setter Property="KeyboardNavigation.TabNavigation" Value="None" /&gt;

        &lt;Setter Property="FrameworkElement.FocusVisualStyle" Value="{x:Null}" /&gt;

        &lt;Setter Property="UIElement.AllowDrop" Value="True" /&gt;

        &lt;Setter Property="Control.Background" Value="#FFFFFFFF" /&gt;

        &lt;Setter Property="Control.HorizontalContentAlignment" Value="Stretch" /&gt;

        &lt;Setter Property="Control.VerticalContentAlignment" Value="Stretch" /&gt;

        &lt;Setter Property="Control.Padding" Value="4" /&gt;

        &lt;Setter Property="Control.BorderThickness" Value="1" /&gt;

        &lt;Setter Property="Control.Template" &gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type TextBox}"&gt;

                    &lt;ControlTemplate.Resources&gt;

                        &lt;Storyboard x:Key="HoverOn"&gt;

                            &lt;DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Over" Storyboard.TargetProperty="Opacity" To="1" /&gt;

                        &lt;/Storyboard&gt;

                        &lt;Storyboard x:Key="HoverOff"&gt;

                            &lt;DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="Over" Storyboard.TargetProperty="Opacity" To="0" /&gt;

                        &lt;/Storyboard&gt;

                        &lt;Storyboard x:Key="FocusedOn"&gt;

                            &lt;DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)"&gt;

                                &lt;SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1" /&gt;

                            &lt;/DoubleAnimationUsingKeyFrames&gt;

                        &lt;/Storyboard&gt;

                        &lt;Storyboard x:Key="FocusedOff"&gt;

                            &lt;DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)"&gt;

                                &lt;SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" /&gt;

                            &lt;/DoubleAnimationUsingKeyFrames&gt;

                        &lt;/Storyboard&gt;

                    &lt;/ControlTemplate.Resources&gt;

                    &lt;Grid&gt;

                        &lt;Border Name="BorderBase" Background="{TemplateBinding Control.Background}" BorderBrush="{StaticResource TextBoxNorm}" BorderThickness="{TemplateBinding Control.BorderThickness}" CornerRadius="3" /&gt;

                        &lt;Border Name="Over" BorderBrush="{StaticResource TextBoxOver}" BorderThickness="{TemplateBinding Control.BorderThickness}" CornerRadius="3" Opacity="0" /&gt;

                        &lt;ScrollViewer Name="PART\_ContentHost" Margin="0" Padding="{TemplateBinding Control.Padding}" /&gt;

                        &lt;Border Name="DisabledVisualElement" Background="#A5FFFFFF" BorderBrush="#59C0C0C0" BorderThickness="{TemplateBinding Control.BorderThickness}" CornerRadius="3" IsHitTestVisible="False" Visibility="Collapsed" /&gt;

                        &lt;Border Name="FocusVisualElement" BorderBrush="{StaticResource TextBoxFocus}" BorderThickness="{TemplateBinding Control.BorderThickness}" CornerRadius="3" IsHitTestVisible="False" Opacity="0" /&gt;

                    &lt;/Grid&gt;

                    &lt;ControlTemplate.Triggers&gt;

                        &lt;Trigger Property="UIElement.IsFocused" Value="True"&gt;

                            &lt;Trigger.ExitActions&gt;

                                &lt;BeginStoryboard Name="FocusedOff\_BeginStoryboard" Storyboard="{StaticResource FocusedOff}" /&gt;

                            &lt;/Trigger.ExitActions&gt;

                            &lt;Trigger.EnterActions&gt;

                                &lt;BeginStoryboard Name="FocusedOn\_BeginStoryboard" Storyboard="{StaticResource FocusedOn}" /&gt;

                            &lt;/Trigger.EnterActions&gt;

                        &lt;/Trigger&gt;

                        &lt;MultiTrigger&gt;

                            &lt;MultiTrigger.Conditions&gt;

                                &lt;Condition Property="UIElement.IsMouseOver" Value="True" /&gt;

                                &lt;Condition Property="UIElement.IsFocused" Value="False" /&gt;

                            &lt;/MultiTrigger.Conditions&gt;

                            &lt;MultiTrigger.ExitActions&gt;

                                &lt;BeginStoryboard Name="HoverOff\_BeginStoryboard" Storyboard="{StaticResource HoverOff}" /&gt;

                            &lt;/MultiTrigger.ExitActions&gt;

                            &lt;MultiTrigger.EnterActions&gt;

                                &lt;BeginStoryboard Storyboard="{StaticResource HoverOn}" /&gt;

                            &lt;/MultiTrigger.EnterActions&gt;

                        &lt;/MultiTrigger&gt;

                        &lt;Trigger Property="UIElement.IsEnabled" Value="False"&gt;

                            &lt;Setter Value="{DynamicResource DisabledForegroundBrush}" Property="Control.Foreground" /&gt;

                            &lt;Setter TargetName="DisabledVisualElement" Property="UIElement.Visibility" Value="Visible" /&gt;

                        &lt;/Trigger&gt;

                    &lt;/ControlTemplate.Triggers&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

 

    &lt;Style x:Key="{x:Type PasswordBox}" TargetType="{x:Type PasswordBox}"&gt;

        &lt;Setter Property="KeyboardNavigation.TabNavigation" Value="None" /&gt;

        &lt;Setter Property="FrameworkElement.FocusVisualStyle" Value="{x:Null}" /&gt;

        &lt;Setter Property="UIElement.AllowDrop" Value="True" /&gt;

        &lt;Setter Property="Control.Background" Value="#FFFFFFFF" /&gt;

        &lt;Setter Property="Control.HorizontalContentAlignment" Value="Stretch" /&gt;

        &lt;Setter Property="Control.VerticalContentAlignment" Value="Stretch" /&gt;

        &lt;Setter Property="Control.Padding" Value="4" /&gt;

        &lt;Setter Property="Control.BorderThickness" Value="1" /&gt;

        &lt;Setter Property="Control.Template" &gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type PasswordBox}"&gt;

                    &lt;ControlTemplate.Resources&gt;

                        &lt;Storyboard x:Key="HoverOn"&gt;

                            &lt;DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Over" Storyboard.TargetProperty="Opacity" To="1" /&gt;

                        &lt;/Storyboard&gt;

                        &lt;Storyboard x:Key="HoverOff"&gt;

                            &lt;DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="Over" Storyboard.TargetProperty="Opacity" To="0" /&gt;

                        &lt;/Storyboard&gt;

                        &lt;Storyboard x:Key="FocusedOn"&gt;

                            &lt;DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)"&gt;

                                &lt;SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1" /&gt;

                            &lt;/DoubleAnimationUsingKeyFrames&gt;

                        &lt;/Storyboard&gt;

                        &lt;Storyboard x:Key="FocusedOff"&gt;

                            &lt;DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)"&gt;

                                &lt;SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" /&gt;

                            &lt;/DoubleAnimationUsingKeyFrames&gt;

                        &lt;/Storyboard&gt;

                    &lt;/ControlTemplate.Resources&gt;

                    &lt;Grid&gt;

                        &lt;Border Name="BorderBase" Background="{TemplateBinding Control.Background}" BorderBrush="{StaticResource TextBoxNorm}" BorderThickness="{TemplateBinding Control.BorderThickness}" CornerRadius="3" /&gt;

                        &lt;Border Name="Over" BorderBrush="{StaticResource TextBoxOver}" BorderThickness="{TemplateBinding Control.BorderThickness}" CornerRadius="3" Opacity="0" /&gt;

                        &lt;ScrollViewer Name="PART\_ContentHost" Margin="0" Padding="{TemplateBinding Control.Padding}" /&gt;

                        &lt;Border Name="DisabledVisualElement" Background="#A5FFFFFF" BorderBrush="#59C0C0C0" BorderThickness="{TemplateBinding Control.BorderThickness}" CornerRadius="3" IsHitTestVisible="False" Visibility="Collapsed" /&gt;

                        &lt;Border Name="FocusVisualElement" BorderBrush="{StaticResource TextBoxFocus}" BorderThickness="{TemplateBinding Control.BorderThickness}" CornerRadius="3" IsHitTestVisible="False" Opacity="0" /&gt;

                    &lt;/Grid&gt;

                    &lt;ControlTemplate.Triggers&gt;

                        &lt;Trigger Property="UIElement.IsFocused" Value="True"&gt;

                            &lt;Trigger.ExitActions&gt;

                                &lt;BeginStoryboard Name="FocusedOff\_BeginStoryboard" Storyboard="{StaticResource FocusedOff}" /&gt;

                            &lt;/Trigger.ExitActions&gt;

                            &lt;Trigger.EnterActions&gt;

                                &lt;BeginStoryboard Name="FocusedOn\_BeginStoryboard" Storyboard="{StaticResource FocusedOn}" /&gt;

                            &lt;/Trigger.EnterActions&gt;

                        &lt;/Trigger&gt;

                        &lt;MultiTrigger&gt;

                            &lt;MultiTrigger.Conditions&gt;

                                &lt;Condition Property="UIElement.IsMouseOver" Value="True" /&gt;

                                &lt;Condition Property="UIElement.IsFocused" Value="False" /&gt;

                            &lt;/MultiTrigger.Conditions&gt;

                            &lt;MultiTrigger.ExitActions&gt;

                                &lt;BeginStoryboard Name="HoverOff\_BeginStoryboard" Storyboard="{StaticResource HoverOff}" /&gt;

                            &lt;/MultiTrigger.ExitActions&gt;

                            &lt;MultiTrigger.EnterActions&gt;

                                &lt;BeginStoryboard Storyboard="{StaticResource HoverOn}" /&gt;

                            &lt;/MultiTrigger.EnterActions&gt;

                        &lt;/MultiTrigger&gt;

                        &lt;Trigger Property="UIElement.IsEnabled" Value="False"&gt;

                            &lt;Setter Value="{DynamicResource DisabledForegroundBrush}" Property="Control.Foreground" /&gt;

                            &lt;Setter TargetName="DisabledVisualElement" Property="UIElement.Visibility" Value="Visible" /&gt;

                        &lt;/Trigger&gt;

                    &lt;/ControlTemplate.Triggers&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

 

    &lt;Style x:Key="{x:Type ProgressBar}" TargetType="{x:Type ProgressBar}"&gt;

        &lt;Setter Property="Control.Foreground" Value="{StaticResource TextBrush}" /&gt;

        &lt;Setter Property="Control.Background"&gt;

            &lt;Setter.Value&gt;

                &lt;LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"&gt;

                    &lt;GradientStop Color="#FFB4B4B4" /&gt;

                    &lt;GradientStop Color="#FFFFFFFF" Offset="1" /&gt;

                &lt;/LinearGradientBrush&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

        &lt;Setter Property="Control.BorderThickness" Value="1" /&gt;

        &lt;Setter Property="RangeBase.Maximum" Value="100" /&gt;

        &lt;Setter Property="Control.IsTabStop" Value="False" /&gt;

        &lt;Setter Property="Control.BorderBrush" Value="{StaticResource PrimaryBrush}" /&gt;

        &lt;Setter Property="Control.Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type ProgressBar}"&gt;

                    &lt;Grid Name="Root" SnapsToDevicePixels="True"&gt;

                        &lt;Grid.RowDefinitions&gt;

                            &lt;RowDefinition Height="0.5\*" /&gt;

                            &lt;RowDefinition Height="0.5\*" /&gt;

                        &lt;/Grid.RowDefinitions&gt;

                        &lt;Border Name="White" CornerRadius="4" BorderBrush="#FFFFFFFF" BorderThickness="1" Grid.RowSpan="2"&gt;

                            &lt;Border.Background&gt;

                                &lt;RadialGradientBrush&gt;

                                    &lt;RadialGradientBrush.RelativeTransform&gt;

                                        &lt;TransformGroup&gt;

                                            &lt;ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" /&gt;

                                        &lt;/TransformGroup&gt;

                                    &lt;/RadialGradientBrush.RelativeTransform&gt;

                                    &lt;GradientStop Color="#FFFFFFFF" Offset="0" /&gt;

                                    &lt;GradientStop Color="#FFFFFFFF" Offset="1" /&gt;

                                &lt;/RadialGradientBrush&gt;

                            &lt;/Border.Background&gt;

                        &lt;/Border&gt;

                        &lt;Border Name="PART\_Track" BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="1" CornerRadius="4,4,4,4" Grid.RowSpan="2" Opacity="0.65" /&gt;

                        &lt;Grid Name="ProgressBarRootGrid" Grid.RowSpan="2"&gt;

                            &lt;Rectangle Name="ProgressBarRootGradient" Panel.ZIndex="1" Stroke="#FFFFFFFF" StrokeThickness="1" RadiusX="4" RadiusY="4" Opacity="0.65"&gt;

                                &lt;Rectangle.Fill&gt;

                                    &lt;LinearGradientBrush EndPoint="0.7,1.263" StartPoint="0.699999988079071,0"&gt;

                                        &lt;GradientStop Color="{StaticResource PrimaryColor}" Offset="0.312" /&gt;

                                        &lt;GradientStop Color="{StaticResource SecondaryColor}" Offset="1" /&gt;

                                    &lt;/LinearGradientBrush&gt;

                                &lt;/Rectangle.Fill&gt;

                            &lt;/Rectangle&gt;

                            &lt;Grid Name="IndeterminateRoot" Visibility="Collapsed"&gt;

                                &lt;Rectangle Name="IndeterminateSolidFill" Margin="{TemplateBinding Control.BorderThickness}" Opacity="1" RenderTransformOrigin="0.5,0.5" Fill="{TemplateBinding Control.Foreground}" Stroke="#FF448DCA" StrokeThickness="0" RadiusX="4" RadiusY="4" /&gt;

                                &lt;Rectangle Name="IndeterminateGradientFill" Margin="{TemplateBinding Control.BorderThickness}" Opacity="0.7" StrokeThickness="1" RadiusX="4" RadiusY="4"&gt;

                                    &lt;Rectangle.Fill&gt;

                                        &lt;LinearGradientBrush MappingMode="Absolute" SpreadMethod="Repeat" EndPoint="0,1" StartPoint="20,1"&gt;

                                            &lt;LinearGradientBrush.Transform&gt;

                                                &lt;TransformGroup&gt;

                                                    &lt;TranslateTransform X="0" /&gt;

                                                    &lt;SkewTransform AngleX="-30" /&gt;

                                                &lt;/TransformGroup&gt;

                                            &lt;/LinearGradientBrush.Transform&gt;

                                            &lt;GradientStop Color="#FFFFFFFF" Offset="0" /&gt;

                                            &lt;GradientStop Color="#00FFFFFF" Offset=".25" /&gt;

                                            &lt;GradientStop Color="#FFFFFFFF" Offset="0.85" /&gt;

                                        &lt;/LinearGradientBrush&gt;

                                    &lt;/Rectangle.Fill&gt;

                                &lt;/Rectangle&gt;

                            &lt;/Grid&gt;

                            &lt;Grid Name="DeterminateRoot" Margin="1"&gt;

                                &lt;Rectangle Name="PART\_Indicator" HorizontalAlignment="Left" Margin="2" StrokeThickness="0.5" RadiusX="4" RadiusY="4" Fill="{StaticResource PrimaryBrush}" /&gt;

                            &lt;/Grid&gt;

                        &lt;/Grid&gt;

                        &lt;Border Name="InnerBorder" BorderBrush="#CCFFFFFF" BorderThickness="1" CornerRadius="3.5" Margin="2" Grid.RowSpan="2" /&gt;

                        &lt;Border Name="Shadow" CornerRadius="3.5" Margin="2" Opacity="0.2" Grid.RowSpan="2"&gt;

                            &lt;Border.OpacityMask&gt;

                                &lt;RadialGradientBrush&gt;

                                    &lt;RadialGradientBrush.RelativeTransform&gt;

                                        &lt;TransformGroup&gt;

                                            &lt;TranslateTransform X="0" Y="-0.5" /&gt;

                                        &lt;/TransformGroup&gt;

                                    &lt;/RadialGradientBrush.RelativeTransform&gt;

                                    &lt;GradientStop Color="#00FFFFFF" Offset="0.3" /&gt;

                                    &lt;GradientStop Color="#FFFFFFFF" Offset="1" /&gt;

                                &lt;/RadialGradientBrush&gt;

                            &lt;/Border.OpacityMask&gt;

                            &lt;Border.Background&gt;

                                &lt;RadialGradientBrush&gt;

                                    &lt;RadialGradientBrush.RelativeTransform&gt;

                                        &lt;TransformGroup&gt;

                                            &lt;ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" /&gt;

                                            &lt;TranslateTransform Y="0.65" /&gt;

                                        &lt;/TransformGroup&gt;

                                    &lt;/RadialGradientBrush.RelativeTransform&gt;

                                    &lt;GradientStop Color="#00000000" Offset="0.55" /&gt;

                                    &lt;GradientStop Color="#4C000000" Offset="1" /&gt;

                                &lt;/RadialGradientBrush&gt;

                            &lt;/Border.Background&gt;

                        &lt;/Border&gt;

                        &lt;Border Name="Highlight" Margin="1" CornerRadius="4,4,4,10" Opacity="0.8" RenderTransformOrigin="0.5,1"&gt;

                            &lt;Border.Background&gt;

                                &lt;RadialGradientBrush&gt;

                                    &lt;RadialGradientBrush.RelativeTransform&gt;

                                        &lt;TransformGroup&gt;

                                            &lt;ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" /&gt;

                                            &lt;TranslateTransform Y="-0.6" /&gt;

                                        &lt;/TransformGroup&gt;

                                    &lt;/RadialGradientBrush.RelativeTransform&gt;

                                    &lt;GradientStop Color="#BFFFFFFF" Offset="0" /&gt;

                                    &lt;GradientStop Color="#4CFFFFFF" Offset="1" /&gt;

                                &lt;/RadialGradientBrush&gt;

                            &lt;/Border.Background&gt;

                        &lt;/Border&gt;

                    &lt;/Grid&gt;

                    &lt;ControlTemplate.Triggers&gt;

                        &lt;Trigger Property="ProgressBar.IsIndeterminate" Value="True"&gt;

                            &lt;Trigger.EnterActions&gt;

                                &lt;BeginStoryboard&gt;

                                    &lt;Storyboard RepeatBehavior="Forever"&gt;

                                        &lt;DoubleAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateGradientFill" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)\[0].X"&gt;

                                            &lt;SplineDoubleKeyFrame KeyTime="0" Value="0" /&gt;

                                            &lt;SplineDoubleKeyFrame KeyTime="00:00:.5" Value="20" /&gt;

                                        &lt;/DoubleAnimationUsingKeyFrames&gt;

                                    &lt;/Storyboard&gt;

                                &lt;/BeginStoryboard&gt;

                            &lt;/Trigger.EnterActions&gt;

                            &lt;Setter TargetName="IndeterminateRoot" Property="UIElement.Visibility" Value="Visible" /&gt;

                            &lt;Setter TargetName="DeterminateRoot" Property="UIElement.Visibility" Value="Collapsed" /&gt;

                        &lt;/Trigger&gt;

                    &lt;/ControlTemplate.Triggers&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

 

    &lt;!--&lt;Style x:Key="{x:Type ListBox}" TargetType="{x:Type ListBox}"&gt;

        &lt;Setter Property="Control.Padding" Value="0" /&gt;

        &lt;Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" /&gt;

        &lt;Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" /&gt;

        &lt;Setter Property="ScrollViewer.CanContentScroll" Value="True" /&gt;

        &lt;Setter Property="Control.Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type ListBox}"&gt;

                    &lt;Grid&gt;

                        &lt;Border Name="BackgroundBorder" CornerRadius="5" BorderThickness="1" Background="#FFFFFFFF"&gt;

                            &lt;Border.BorderBrush&gt;

                                &lt;LinearGradientBrush EndPoint="0.5,-1.85" StartPoint="0.5,1.5"&gt;

                                    &lt;GradientStop Color="#FF4E5F70" Offset="0" /&gt;

                                    &lt;GradientStop Color="#FFF6F7FA" Offset="1" /&gt;

                                &lt;/LinearGradientBrush&gt;

                            &lt;/Border.BorderBrush&gt;

                        &lt;/Border&gt;

                        &lt;ScrollViewer Name="ScrollViewerElement" Margin="3" Padding="{TemplateBinding Control.Padding}"&gt;

                            &lt;ItemsPresenter /&gt;

                        &lt;/ScrollViewer&gt;

                    &lt;/Grid&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

    &lt;Style x:Key="{x:Type TreeView}" TargetType="{x:Type TreeView}"&gt;

        &lt;Setter Property="Control.Padding" Value="0" /&gt;

        &lt;Setter Property="Control.Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type TreeView}"&gt;

                    &lt;Grid&gt;

                        &lt;Border Name="BackgroundBorder" CornerRadius="5" BorderThickness="1" Background="#FFFFFFFF"&gt;

                            &lt;Border.BorderBrush&gt;

                                &lt;LinearGradientBrush EndPoint="0.5,-1.85" StartPoint="0.5,1.5"&gt;

                                    &lt;GradientStop Color="#FF4E5F70" Offset="0" /&gt;

                                    &lt;GradientStop Color="#FFF6F7FA" Offset="1" /&gt;

                                &lt;/LinearGradientBrush&gt;

                            &lt;/Border.BorderBrush&gt;

                        &lt;/Border&gt;

                        &lt;ScrollViewer Name="ScrollViewerElement" Margin="3" Padding="{TemplateBinding Control.Padding}"&gt;

                            &lt;ItemsPresenter /&gt;

                        &lt;/ScrollViewer&gt;

                    &lt;/Grid&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

    &lt;Style x:Key="{x:Type ListBoxItem}" TargetType="{x:Type ListBoxItem}"&gt;

        &lt;Setter Property="UIElement.IsEnabled" Value="True" /&gt;

        &lt;Setter Property="FrameworkElement.Cursor" Value="Arrow" /&gt;

        &lt;Setter Property="Control.Foreground" Value="#FF1E2B33" /&gt;

        &lt;Setter Property="Control.FontFamily" Value="Trebuchet MS" /&gt;

        &lt;Setter Property="Control.FontSize" Value="10.5" /&gt;

        &lt;Setter Property="Control.FontWeight" Value="Normal" /&gt;

        &lt;Setter Property="Control.Foreground" Value="#FF000000" /&gt;

        &lt;Setter Property="Control.Padding" Value="4,4.5,4,4.5" /&gt;

        &lt;Setter Property="Control.Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type ListBoxItem}"&gt;

                    &lt;Grid&gt;

                        &lt;VisualStateManager.VisualStateGroups&gt;

                            &lt;VisualStateGroup x:Name="CommonStates"&gt;

                                &lt;VisualState x:Name="Normal" /&gt;

                                &lt;VisualState x:Name="MouseOver"&gt;

                                    &lt;Storyboard&gt;

                                        &lt;ColorAnimation Storyboard.TargetName="fillColor" Storyboard.TargetProperty="Color" Duration="0" To="#7FB0E3FF" /&gt;

                                        &lt;ColorAnimation Storyboard.TargetName="fillColor1" Storyboard.TargetProperty="Color" Duration="0" To="#FFFFFFFF" /&gt;

                                    &lt;/Storyboard&gt;

                                &lt;/VisualState&gt;

                            &lt;/VisualStateGroup&gt;

                            &lt;VisualStateGroup x:Name="SelectionStates"&gt;

                                &lt;VisualState x:Name="Unselected" /&gt;

                                &lt;VisualState x:Name="Selected"&gt;

                                    &lt;Storyboard&gt;

                                        &lt;ColorAnimation Storyboard.TargetName="fillColor2" Storyboard.TargetProperty="Color" Duration="0" To="#7FFBF724" /&gt;

                                    &lt;/Storyboard&gt;

                                &lt;/VisualState&gt;

                            &lt;/VisualStateGroup&gt;

                            &lt;VisualStateGroup x:Name="FocusStates"&gt;

                                &lt;VisualState x:Name="Focused"&gt;

                                    &lt;Storyboard&gt;

                                        &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Visibility" Duration="0"&gt;

                                            &lt;DiscreteObjectKeyFrame KeyTime="0"&gt;

                                                &lt;DiscreteObjectKeyFrame.Value&gt;

                                                    &lt;Visibility&gt;Visible&lt;/Visibility&gt;

                                                &lt;/DiscreteObjectKeyFrame.Value&gt;

                                            &lt;/DiscreteObjectKeyFrame&gt;

                                        &lt;/ObjectAnimationUsingKeyFrames&gt;

                                    &lt;/Storyboard&gt;

                                &lt;/VisualState&gt;

                                &lt;VisualState x:Name="Unfocused" /&gt;

                            &lt;/VisualStateGroup&gt;

                        &lt;/VisualStateManager.VisualStateGroups&gt;

                        &lt;Grid.RowDefinitions&gt;

                            &lt;RowDefinition Height="\*" /&gt;

                            &lt;RowDefinition Height="Auto" /&gt;

                        &lt;/Grid.RowDefinitions&gt;

                        &lt;Rectangle&gt;

                            &lt;Rectangle.Fill&gt;

                                &lt;SolidColorBrush x:Name="fillColor2" Color="#00FFFFFF" /&gt;

                            &lt;/Rectangle.Fill&gt;

                        &lt;/Rectangle&gt;

                        &lt;Rectangle&gt;

                            &lt;Rectangle.Fill&gt;

                                &lt;SolidColorBrush x:Name="fillColor1" Color="#00FFFFFF" /&gt;

                            &lt;/Rectangle.Fill&gt;

                        &lt;/Rectangle&gt;

                        &lt;Rectangle&gt;

                            &lt;Rectangle.Fill&gt;

                                &lt;SolidColorBrush x:Name="fillColor" Color="#00FFFFFF" /&gt;

                            &lt;/Rectangle.Fill&gt;

                        &lt;/Rectangle&gt;

                        &lt;Rectangle Name="FocusVisualElement" Stroke="#FF999999" StrokeThickness=".75" StrokeDashArray="1,2" Visibility="Collapsed" /&gt;

                        &lt;ContentPresenter HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" Margin="{TemplateBinding Control.Padding}" /&gt;

                    &lt;/Grid&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

    &lt;Style x:Key="{x:Type ComboBoxItem}" TargetType="{x:Type ComboBoxItem}"&gt;

        &lt;Setter Property="UIElement.IsEnabled" Value="True" /&gt;

        &lt;Setter Property="FrameworkElement.Cursor" Value="Arrow" /&gt;

        &lt;Setter Property="Control.Foreground" Value="#FF1E2B33" /&gt;

        &lt;Setter Property="Control.FontFamily" Value="Trebuchet MS" /&gt;

        &lt;Setter Property="Control.FontSize" Value="10.5" /&gt;

        &lt;Setter Property="Control.FontWeight" Value="Normal" /&gt;

        &lt;Setter Property="Control.Foreground" Value="#FF000000" /&gt;

        &lt;Setter Property="Control.Padding" Value="4,4.5,4,4.5" /&gt;

        &lt;Setter Property="Control.Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type ComboBoxItem}"&gt;

                    &lt;Grid&gt;

                        &lt;VisualStateManager.VisualStateGroups&gt;

                            &lt;VisualStateGroup x:Name="CommonStates"&gt;

                                &lt;VisualState x:Name="Normal" /&gt;

                                &lt;VisualState x:Name="MouseOver"&gt;

                                    &lt;Storyboard&gt;

                                        &lt;ColorAnimation Storyboard.TargetName="fillColor" Storyboard.TargetProperty="Color" Duration="0" To="#7FB0E3FF" /&gt;

                                        &lt;ColorAnimation Storyboard.TargetName="fillColor1" Storyboard.TargetProperty="Color" Duration="0" To="#FFFFFFFF" /&gt;

                                    &lt;/Storyboard&gt;

                                &lt;/VisualState&gt;

                            &lt;/VisualStateGroup&gt;

                            &lt;VisualStateGroup x:Name="SelectionStates"&gt;

                                &lt;VisualState x:Name="Unselected" /&gt;

                                &lt;VisualState x:Name="Selected"&gt;

                                    &lt;Storyboard&gt;

                                        &lt;ColorAnimation Storyboard.TargetName="fillColor2" Storyboard.TargetProperty="Color" Duration="0" To="#7FFBF724" /&gt;

                                    &lt;/Storyboard&gt;

                                &lt;/VisualState&gt;

                            &lt;/VisualStateGroup&gt;

                            &lt;VisualStateGroup x:Name="FocusStates"&gt;

                                &lt;VisualState x:Name="Focused"&gt;

                                    &lt;Storyboard&gt;

                                        &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Visibility" Duration="0"&gt;

                                            &lt;DiscreteObjectKeyFrame KeyTime="0"&gt;

                                                &lt;DiscreteObjectKeyFrame.Value&gt;

                                                    &lt;Visibility&gt;Visible&lt;/Visibility&gt;

                                                &lt;/DiscreteObjectKeyFrame.Value&gt;

                                            &lt;/DiscreteObjectKeyFrame&gt;

                                        &lt;/ObjectAnimationUsingKeyFrames&gt;

                                    &lt;/Storyboard&gt;

                                &lt;/VisualState&gt;

                                &lt;VisualState x:Name="Unfocused" /&gt;

                            &lt;/VisualStateGroup&gt;

                        &lt;/VisualStateManager.VisualStateGroups&gt;

                        &lt;Grid.RowDefinitions&gt;

                            &lt;RowDefinition Height="\*" /&gt;

                            &lt;RowDefinition Height="Auto" /&gt;

                        &lt;/Grid.RowDefinitions&gt;

                        &lt;Rectangle&gt;

                            &lt;Rectangle.Fill&gt;

                                &lt;SolidColorBrush x:Name="fillColor2" Color="#00FFFFFF" /&gt;

                            &lt;/Rectangle.Fill&gt;

                        &lt;/Rectangle&gt;

                        &lt;Rectangle&gt;

                            &lt;Rectangle.Fill&gt;

                                &lt;SolidColorBrush x:Name="fillColor1" Color="#00FFFFFF" /&gt;

                            &lt;/Rectangle.Fill&gt;

                        &lt;/Rectangle&gt;

                        &lt;Rectangle&gt;

                            &lt;Rectangle.Fill&gt;

                                &lt;SolidColorBrush x:Name="fillColor" Color="#00FFFFFF" /&gt;

                            &lt;/Rectangle.Fill&gt;

                        &lt;/Rectangle&gt;

                        &lt;Rectangle Name="FocusVisualElement" Stroke="#FF999999" StrokeThickness=".75" StrokeDashArray="1,2" Visibility="Collapsed" /&gt;

                        &lt;ContentPresenter HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" Margin="{TemplateBinding Control.Padding}" /&gt;

                    &lt;/Grid&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;--&gt;

 

    &lt;Style x:Key="{x:Type GroupBox}" TargetType="{x:Type GroupBox}"&gt;

        &lt;Setter Property="Control.BorderBrush" Value="#FFD5DFE5" /&gt;

        &lt;Setter Property="Control.BorderThickness" Value="1" /&gt;

        &lt;Setter Property="Control.Foreground" Value="{StaticResource OutsideFontColor}" /&gt;

        &lt;Setter Property="Control.Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type GroupBox}"&gt;

                    &lt;Grid SnapsToDevicePixels="True" Background="{x:Null}"&gt;

                        &lt;Grid.ColumnDefinitions&gt;

                            &lt;ColumnDefinition Width="6" /&gt;

                            &lt;ColumnDefinition Width="Auto" /&gt;

                            &lt;ColumnDefinition Width="\*" /&gt;

                            &lt;ColumnDefinition Width="6" /&gt;

                        &lt;/Grid.ColumnDefinitions&gt;

                        &lt;Grid.RowDefinitions&gt;

                            &lt;RowDefinition Height="Auto" /&gt;

                            &lt;RowDefinition Height="Auto" /&gt;

                            &lt;RowDefinition Height="\*" /&gt;

                            &lt;RowDefinition Height="6" /&gt;

                        &lt;/Grid.RowDefinitions&gt;

                        &lt;Border Grid.ColumnSpan="4" Grid.Row="1" Grid.RowSpan="3" BorderThickness="1,1,1,1" CornerRadius="4"&gt;

                            &lt;Border.OpacityMask&gt;

                                &lt;MultiBinding ConverterParameter="7"&gt;

                                    &lt;MultiBinding.Converter&gt;

                                        &lt;BorderGapMaskConverter /&gt;

                                    &lt;/MultiBinding.Converter&gt;

                                    &lt;Binding Path="ActualWidth" ElementName="Header" /&gt;

                                    &lt;Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" /&gt;

                                    &lt;Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" /&gt;

                                &lt;/MultiBinding&gt;

                            &lt;/Border.OpacityMask&gt;

                        &lt;/Border&gt;

                        &lt;Border Name="ContentBorder" Grid.Column="0" Grid.ColumnSpan="4" Grid.Row="1" Grid.RowSpan="3"  BorderBrush="{StaticResource TextBoxNorm}" BorderThickness="{TemplateBinding Control.BorderThickness}" CornerRadius="3" /&gt;

                        &lt;Border Name="BackgroundNorm" Background="{StaticResource grayGradient}" BorderThickness="1" BorderBrush="#FF8E8F8F" CornerRadius="3,3,0,0" Grid.ColumnSpan="4" Grid.RowSpan="2" /&gt;

                        &lt;Border Name="Header" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" Padding="3,1,3,0"&gt;

                            &lt;ContentPresenter SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" ContentSource="Header" RecognizesAccessKey="True" Margin="0,4,0,4" /&gt;

                        &lt;/Border&gt;

                        &lt;ContentPresenter SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" Margin="{TemplateBinding Control.Padding}" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="2" /&gt;

                    &lt;/Grid&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

        &lt;Setter Property="Control.Foreground" Value="{DynamicResource OutsideFontColor}" /&gt;

    &lt;/Style&gt;

 

    &lt;Style x:Key="{x:Type Menu}" TargetType="{x:Type Menu}"&gt;

        &lt;Setter Property="UIElement.SnapsToDevicePixels" Value="True" /&gt;

        &lt;Setter Property="Control.Foreground" Value="{StaticResource OutsideFontColor}" /&gt;

        &lt;Setter Property="Control.Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type Menu}"&gt;

                    &lt;Grid&gt;

                        &lt;!--&lt;Border Name="Border" Background="{StaticResource grayGradient}" /&gt;--&gt;

                        &lt;StackPanel IsItemsHost="True" ClipToBounds="True" Orientation="Horizontal" /&gt;

                    &lt;/Grid&gt;

                    &lt;!--&lt;ControlTemplate.Triggers&gt;

                        &lt;Trigger Property="UIElement.IsEnabled" Value="False"&gt;

                            &lt;Setter TargetName="Border" Property="Border.Background" Value="#A5FFFFFF" /&gt;

                            &lt;Setter TargetName="Border" Property="Border.BorderBrush" Value="#59C0C0C0" /&gt;

                        &lt;/Trigger&gt;

                    &lt;/ControlTemplate.Triggers&gt;--&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

    &lt;DropShadowBitmapEffect x:Key="PopupDropShadow" ShadowDepth="1.5" Softness="0.15" /&gt;

 

    &lt;Style x:Key="{x:Type MenuItem}" TargetType="{x:Type MenuItem}"&gt;

        &lt;Setter Property="Control.HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" /&gt;

        &lt;Setter Property="Control.VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" /&gt;

        &lt;Setter Property="Control.Background" Value="#00FFFFFF" /&gt;

        &lt;Setter Property="Control.Foreground" Value="{StaticResource OutsideFontColor}" /&gt;

        &lt;Setter Property="FontSize" Value="13"&gt;&lt;/Setter&gt;

        &lt;Setter Property="Control.Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type MenuItem}"&gt;

                    &lt;ControlTemplate.Resources&gt;

                        &lt;Storyboard x:Key="HighlightOn"&gt;

                            &lt;DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundGradientSelected" Storyboard.TargetProperty="Opacity" To="0.84" /&gt;

                        &lt;/Storyboard&gt;

                        &lt;Storyboard x:Key="HighlightOff"&gt;

                            &lt;DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundGradientSelected" Storyboard.TargetProperty="Opacity" To="0" /&gt;

                        &lt;/Storyboard&gt;

                    &lt;/ControlTemplate.Resources&gt;

                    &lt;Border Name="Border" Background="{TemplateBinding Control.Background}" BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="{TemplateBinding Control.BorderThickness}"&gt;

                        &lt;Grid Margin="0,0,0,0" Background="Transparent"&gt;

                            &lt;Grid.ColumnDefinitions&gt;

                                &lt;ColumnDefinition MinWidth="18" Width="Auto" SharedSizeGroup="MenuItemIconColumnGroup" /&gt;

                                &lt;ColumnDefinition Width="\*" /&gt;

                                &lt;ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup" /&gt;

                                &lt;ColumnDefinition Width="10" /&gt;

                            &lt;/Grid.ColumnDefinitions&gt;

                            &lt;Rectangle Name="BackgroundGradientOver" Fill="{StaticResource hoverGradient}" Stroke="{StaticResource hoverStroke}" RadiusX="2" RadiusY="2" Opacity="0" Grid.ColumnSpan="4" /&gt;

                            &lt;Rectangle Name="BackgroundGradientSelected" Fill="{StaticResource BtnOverFill}" Stroke="{StaticResource selectedStroke}" RadiusX="2" RadiusY="2" Opacity="0" Grid.ColumnSpan="4" /&gt;

                            &lt;Rectangle Name="BackgroundHighlight" Margin="1" Stroke="#A0FFFFFF" RadiusX="1" RadiusY="1" Grid.ColumnSpan="4" Opacity="0" /&gt;

                            &lt;ContentPresenter Name="Icon" Margin="0,5,2,5" VerticalAlignment="Center" ContentSource="Icon" /&gt;

                            &lt;Grid  Background="Transparent" Name="GlyphPanel" Visibility="Hidden" Margin="0,3,0,3" VerticalAlignment="Center"&gt;

                                &lt;Path Name="GlyphPanelpath" VerticalAlignment="Center" Fill="{TemplateBinding Control.Foreground}" Data="M0,2L0,4.8 2.5,7.4 7.1,2.8 7.1,0 2.5,4.6z" FlowDirection="LeftToRight" /&gt;

                            &lt;/Grid&gt;

                            &lt;ContentPresenter Name="HeaderHost" Grid.Column="1" Margin="0,5,0,5" RecognizesAccessKey="True" ContentSource="Header" /&gt;

                            &lt;Grid Background="Transparent" Name="ArrowPanel" Grid.Column="3" Margin="2,5,0,5" VerticalAlignment="Center"&gt;

                                &lt;Path Name="ArrowPanelPath" VerticalAlignment="Center" Fill="{TemplateBinding Control.Foreground}" Data="M0,0L0,8 4,4z" /&gt;

                            &lt;/Grid&gt;

                            &lt;Popup Name="SubMenuPopup" Placement="Right" Focusable="False" AllowsTransparency="True" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" VerticalOffset="-3" IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"&gt;

                                &lt;Grid  Background="Transparent" Name="SubMenu"&gt;

                                    &lt;Border Name="SubMenuBorder" Background="#FFFFFFFF" BorderBrush="{StaticResource TextBoxNorm}" BorderThickness="1" /&gt;

                                    &lt;StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" /&gt;

                                &lt;/Grid&gt;

                            &lt;/Popup&gt;

                        &lt;/Grid&gt;

                    &lt;/Border&gt;

                    &lt;ControlTemplate.Triggers&gt;

                        &lt;Trigger Property="Role" Value="TopLevelHeader"&gt;

                            &lt;Setter Property="FrameworkElement.Margin" Value="0,1,0,1" /&gt;

                            &lt;Setter Property="Control.Padding" Value="6,3,6,3" /&gt;

                            &lt;Setter Property="Grid.IsSharedSizeScope" Value="True" /&gt;

                            &lt;Setter TargetName="SubMenuPopup" Property="Popup.Placement" Value="Bottom" /&gt;

                            &lt;Setter TargetName="ArrowPanel" Property="UIElement.Visibility" Value="Collapsed" /&gt;

                        &lt;/Trigger&gt;

                        &lt;Trigger Property="MenuItem.Role" Value="TopLevelItem"&gt;

                            &lt;Setter Property="FrameworkElement.Margin" Value="0,1,0,1" /&gt;

                            &lt;Setter Property="Control.Padding" Value="6,3,6,3" /&gt;

                            &lt;Setter TargetName="ArrowPanel" Property="UIElement.Visibility" Value="Collapsed" /&gt;

                        &lt;/Trigger&gt;

                        &lt;Trigger Property="MenuItem.Role" Value="SubmenuHeader"&gt;

                            &lt;Setter Property="DockPanel.Dock" Value="Top" /&gt;

                            &lt;Setter Property="Control.Padding" Value="0,2,0,2" /&gt;

                            &lt;Setter Property="Grid.IsSharedSizeScope" Value="True" /&gt;

                        &lt;/Trigger&gt;

                        &lt;Trigger Property="MenuItem.Role" Value="SubmenuItem"&gt;

                            &lt;Setter Property="DockPanel.Dock" Value="Top" /&gt;

                            &lt;Setter Property="Control.Padding" Value="0,2,0,2" /&gt;

                            &lt;Setter TargetName="ArrowPanel" Property="UIElement.Visibility" Value="Collapsed" /&gt;

                        &lt;/Trigger&gt;

                        &lt;Trigger Property="MenuItem.IsSuspendingPopupAnimation" Value="True"&gt;

                            &lt;Setter TargetName="SubMenuPopup" Property="Popup.PopupAnimation" Value="None" /&gt;

                        &lt;/Trigger&gt;

                        &lt;Trigger Value="{x:Null}" Property="MenuItem.Icon"&gt;

                            &lt;Setter TargetName="Icon" Property="UIElement.Visibility" Value="Collapsed" /&gt;

                        &lt;/Trigger&gt;

                        &lt;Trigger Property="MenuItem.IsChecked" Value="True"&gt;

                            &lt;Setter TargetName="GlyphPanel" Property="UIElement.Visibility" Value="Visible" /&gt;

                            &lt;Setter TargetName="Icon" Property="UIElement.Visibility" Value="Collapsed" /&gt;

                        &lt;/Trigger&gt;

 

                        &lt;Trigger Property="MenuItem.IsHighlighted" Value="True"&gt;

                            &lt;Trigger.ExitActions&gt;

                                &lt;BeginStoryboard Storyboard="{StaticResource HighlightOff}" /&gt;

                            &lt;/Trigger.ExitActions&gt;

                            &lt;Trigger.EnterActions&gt;

                                &lt;BeginStoryboard Storyboard="{StaticResource HighlightOn}" /&gt;

                            &lt;/Trigger.EnterActions&gt;

                        &lt;/Trigger&gt;

                        &lt;Trigger Property="UIElement.IsEnabled" Value="False"&gt;

                            &lt;Setter Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" Property="Control.Foreground" /&gt;

                        &lt;/Trigger&gt;

                    &lt;/ControlTemplate.Triggers&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

 

    &lt;Style x:Key="{x:Type Separator}" TargetType="{x:Type Separator}"&gt;

        &lt;Setter Property="FrameworkElement.Height" Value="1" /&gt;

        &lt;Setter Property="FrameworkElement.Margin" Value="0,2,0,2" /&gt;

        &lt;Setter Property="UIElement.Focusable" Value="False" /&gt;

        &lt;Setter Property="Control.Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type Separator}"&gt;

                    &lt;Border BorderBrush="#FF888888" BorderThickness="1" /&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

 

    &lt;Style x:Key="{x:Type ToolBar}"

           TargetType="{x:Type ToolBar}"&gt;

        &lt;Style.Triggers&gt;

            &lt;DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="true"&gt;

                &lt;Setter Property="Background" 

                        Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" /&gt;

            &lt;/DataTrigger&gt;

        &lt;/Style.Triggers&gt;

        &lt;Setter Property="MinHeight" Value="30"&gt;&lt;/Setter&gt;

        &lt;Setter Property="HorizontalAlignment" Value="Stretch"&gt;&lt;/Setter&gt;

        &lt;!--&lt;Setter Property="Background" Value="{StaticResource ToolBarHorizontalBackground}"/&gt;--&gt;

        &lt;Setter Property="Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type ToolBar}"&gt;

                    &lt;Grid Name="Grid" Background="Transparent" 

                      Margin="1,1,1,1"

                      SnapsToDevicePixels="true"&gt;

                        &lt;Border x:Name="MainPanelBorder" CornerRadius="5"  Background="White"

                            BorderBrush="{TemplateBinding BorderBrush}"

                            BorderThickness="{TemplateBinding BorderThickness}"

                            Padding="{TemplateBinding Padding}"&gt;

 

                            &lt;DockPanel KeyboardNavigation.TabIndex="1"

                                   KeyboardNavigation.TabNavigation="Local"&gt;

                                &lt;ContentPresenter x:Name="ToolBarHeader"

                                              ContentSource="Header"

                                              HorizontalAlignment="Center"

                                              VerticalAlignment="Center"

                                              Margin="8,0,4,0" 

                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/&gt;

                                &lt;ToolBarPanel x:Name="PART\_ToolBarPanel"

                                          IsItemsHost="true"

                                          Margin="0,1,2,2" 

                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/&gt;

                                &lt;DockPanel.Background&gt;

                                    &lt;LinearGradientBrush  EndPoint="0.5,1" StartPoint="0.5,0" Opacity="0.4"&gt;

                                        &lt;GradientStop Color="{StaticResource Over1}" Offset="0.2" /&gt;

                                        &lt;GradientStop Color="{StaticResource Over2}" Offset="0.509" /&gt;

                                        &lt;GradientStop Color="{StaticResource Over3}" Offset="1" /&gt;

                                    &lt;/LinearGradientBrush&gt;

                                &lt;/DockPanel.Background&gt;

                            &lt;/DockPanel&gt;

                        &lt;/Border&gt;

                    &lt;/Grid&gt;

                    &lt;ControlTemplate.Triggers&gt;

                        &lt;Trigger Property="Header"

                             Value="{x:Null}"&gt;

                            &lt;Setter TargetName="ToolBarHeader"

                                Property="Visibility"

                                Value="Collapsed"/&gt;

                        &lt;/Trigger&gt;

                        &lt;Trigger Property="Orientation"

                             Value="Vertical"&gt;

                            &lt;Setter TargetName="Grid"

                                Property="Margin"

                                Value="1,3,1,1"/&gt;

                            &lt;Setter TargetName="ToolBarHeader"

                                Property="Margin"

                                Value="0,0,0,4"/&gt;

                            &lt;Setter TargetName="PART\_ToolBarPanel"

                                Property="Margin"

                                Value="1,0,2,2"/&gt;

                            &lt;Setter TargetName="ToolBarHeader"

                                Property="DockPanel.Dock"

                                Value="Top"/&gt;

                            &lt;Setter TargetName="MainPanelBorder"

                                Property="Margin"

                                Value="0,0,0,11"/&gt;

                            &lt;Setter Property="Background"

                                Value="{StaticResource ToolBarVerticalBackground}"/&gt;

                        &lt;/Trigger&gt;

                        &lt;Trigger Property="IsEnabled"

                             Value="false"&gt;

                            &lt;Setter Property="Foreground"

                                Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/&gt;

                        &lt;/Trigger&gt;

                    &lt;/ControlTemplate.Triggers&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

 

    &lt;Style x:Key="{x:Type wb:ToolBarEx}"

           TargetType="{x:Type wb:ToolBarEx}"&gt;

        &lt;Style.Triggers&gt;

            &lt;DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="true"&gt;

                &lt;Setter Property="Background" 

                        Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" /&gt;

            &lt;/DataTrigger&gt;

        &lt;/Style.Triggers&gt;

        &lt;Setter Property="HorizontalAlignment" Value="Stretch"&gt;&lt;/Setter&gt;

        &lt;!--&lt;Setter Property="Background" Value="{StaticResource ToolBarHorizontalBackground}"/&gt;--&gt;

        &lt;Setter Property="Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type  wb:ToolBarEx}"&gt;

                    &lt;Grid Name="Grid" Background="Transparent"

                      Margin="3,1,1,1"

                      SnapsToDevicePixels="true"&gt;

                        &lt;Border x:Name="MainPanelBorder"

                            Background="Transparent"

                            BorderBrush="{TemplateBinding BorderBrush}"

                            BorderThickness="{TemplateBinding BorderThickness}"

                            Padding="{TemplateBinding Padding}"&gt;

                            &lt;DockPanel KeyboardNavigation.TabIndex="1"

                                   KeyboardNavigation.TabNavigation="Local"&gt;

                                &lt;ContentPresenter x:Name="ToolBarHeader"

                                              ContentSource="Header"

                                              HorizontalAlignment="Center"

                                              VerticalAlignment="Center"

                                              Margin="2,0,2,0"

                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/&gt;

                                &lt;ToolBarPanel x:Name="PART\_ToolBarPanel"

                                          IsItemsHost="true"

                                          Margin="0,1,2,2"

                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/&gt;

                            &lt;/DockPanel&gt;

                        &lt;/Border&gt;

                    &lt;/Grid&gt;

                    &lt;ControlTemplate.Triggers&gt;

                        &lt;Trigger Property="Header"

                             Value="{x:Null}"&gt;

                            &lt;Setter TargetName="ToolBarHeader"

                                Property="Visibility"

                                Value="Collapsed"/&gt;

                        &lt;/Trigger&gt;

                        &lt;Trigger Property="Orientation"

                             Value="Vertical"&gt;

                            &lt;Setter TargetName="Grid"

                                Property="Margin"

                                Value="1,3,1,1"/&gt;

                            &lt;Setter TargetName="ToolBarHeader"

                                Property="Margin"

                                Value="0,0,0,4"/&gt;

                            &lt;Setter TargetName="PART\_ToolBarPanel"

                                Property="Margin"

                                Value="1,0,2,2"/&gt;

                            &lt;Setter TargetName="ToolBarHeader"

                                Property="DockPanel.Dock"

                                Value="Top"/&gt;

                            &lt;Setter TargetName="MainPanelBorder"

                                Property="Margin"

                                Value="0,0,0,11"/&gt;

                            &lt;Setter Property="Background"

                                Value="{StaticResource ToolBarVerticalBackground}"/&gt;

                        &lt;/Trigger&gt;

                        &lt;Trigger Property="IsEnabled"

                             Value="false"&gt;

                            &lt;Setter Property="Foreground"

                                Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/&gt;

                        &lt;/Trigger&gt;

                    &lt;/ControlTemplate.Triggers&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

 

 

    &lt;SolidColorBrush x:Key="ToolBarLightFill"

                     Color="#D4D5D8"/&gt;

    &lt;SolidColorBrush x:Key="ToolBarMediumFill"

                     Color="#B6BDD2"/&gt;

    &lt;SolidColorBrush x:Key="ToolBarDarkFill"

                     Color="#8592B5"/&gt;

    &lt;SolidColorBrush x:Key="ToolBarDisabledFill"

                     Color="#D4D0C8"/&gt;

    &lt;SolidColorBrush x:Key="ToolBarDisabledBorder"

                     Color="#8D8D8D"/&gt;

    &lt;SolidColorBrush x:Key="ToolBarSeparatorFill"

                     Color="#A6A6A6"/&gt;

    &lt;SolidColorBrush x:Key="ToolBarButtonHover"

                     Color="#B6BDD2"/&gt;

    &lt;SolidColorBrush x:Key="ToolBarButtonHoverBorder"

                     Color="#0A246A"/&gt;

    &lt;SolidColorBrush x:Key="ToolBarButtonChecked"

                     Color="#D4D5D8"/&gt;

    &lt;SolidColorBrush x:Key="ToolBarButtonPressed"

                     Color="#8592B5"/&gt;

    &lt;SolidColorBrush x:Key="ToolBarButtonPressedBorder"

                     Color="#0A246A"/&gt;

    &lt;SolidColorBrush x:Key="ToolBarMenuBorder"

                     Color="#666666"/&gt;

    &lt;SolidColorBrush x:Key="ToolBarSubMenuBackground"

                     Color="#F9F8F7"/&gt;

    &lt;SolidColorBrush x:Key="ToolBarMenuCheckFill"

                     Color="#D4D5D8"/&gt;

    &lt;LinearGradientBrush x:Key="ToolBarOpenHeaderBackground"

                         StartPoint="0,0"

                         EndPoint="0,1"&gt;

        &lt;LinearGradientBrush.GradientStops&gt;

            &lt;GradientStop Color="#F9F7F6"

                          Offset="0"/&gt;

            &lt;GradientStop Color="#EDEBE8"

                          Offset="1"/&gt;

        &lt;/LinearGradientBrush.GradientStops&gt;

    &lt;/LinearGradientBrush&gt;

    &lt;LinearGradientBrush x:Key="ToolBarTrayBackground"

                         StartPoint="0,0"

                         EndPoint="688,0"

                         MappingMode="Absolute"&gt;

        &lt;LinearGradientBrush.GradientStops&gt;

            &lt;GradientStop Color="#D4D0C8"

                          Offset="0"/&gt;

            &lt;GradientStop Color="#F5F5F4"

                          Offset="1"/&gt;

        &lt;/LinearGradientBrush.GradientStops&gt;

    &lt;/LinearGradientBrush&gt;

    &lt;LinearGradientBrush x:Key="ToolBarHorizontalBackground"

                         StartPoint="0,0"

                         EndPoint="0,1"&gt;

        &lt;LinearGradientBrush.GradientStops&gt;

            &lt;GradientStop Color="#E2E0DB"

                          Offset="0"/&gt;

            &lt;GradientStop Color="#EAE8E4"

                          Offset="0.5"/&gt;

            &lt;GradientStop Color="#D5D2CA"

                          Offset="0.9"/&gt;

            &lt;GradientStop Color="#DBD8D1"

                          Offset="1"/&gt;

        &lt;/LinearGradientBrush.GradientStops&gt;

    &lt;/LinearGradientBrush&gt;

    &lt;LinearGradientBrush x:Key="ToolBarVerticalBackground"

                         StartPoint="0,0"

                         EndPoint="1,0"&gt;

        &lt;LinearGradientBrush.GradientStops&gt;

            &lt;GradientStop Color="#E2E0DB"

                          Offset="0"/&gt;

            &lt;GradientStop Color="#EAE8E4"

                          Offset="0.5"/&gt;

            &lt;GradientStop Color="#D5D2CA"

                          Offset="0.9"/&gt;

            &lt;GradientStop Color="#DBD8D1"

                          Offset="1"/&gt;

        &lt;/LinearGradientBrush.GradientStops&gt;

    &lt;/LinearGradientBrush&gt;

    &lt;SolidColorBrush x:Key="ToolBarGripper"

                     Color="#A0A0A0"/&gt;

    &lt;LinearGradientBrush x:Key="ToolBarToggleButtonHorizontalBackground"

                         StartPoint="0,0"

                         EndPoint="0,1"&gt;

        &lt;LinearGradientBrush.GradientStops&gt;

            &lt;GradientStop Color="#E6E6E6"

                          Offset="0"/&gt;

            &lt;GradientStop Color="#D2D2D2"

                          Offset="0.5"/&gt;

            &lt;GradientStop Color="#808080"

                          Offset="1"/&gt;

        &lt;/LinearGradientBrush.GradientStops&gt;

    &lt;/LinearGradientBrush&gt;

    &lt;LinearGradientBrush x:Key="ToolBarToggleButtonVerticalBackground"

                         StartPoint="0,0"

                         EndPoint="1,0"&gt;

        &lt;LinearGradientBrush.GradientStops&gt;

            &lt;GradientStop Color="#E6E6E6"

                          Offset="0"/&gt;

            &lt;GradientStop Color="#D2D2D2"

                          Offset="0.5"/&gt;

            &lt;GradientStop Color="#808080"

                          Offset="1"/&gt;

        &lt;/LinearGradientBrush.GradientStops&gt;

    &lt;/LinearGradientBrush&gt;

    &lt;Geometry x:Key="ToolBarCheckmark"&gt;M 0,2.5 L 2.5,5 L 7,0.5&lt;/Geometry&gt;

 

    &lt;Style x:Key="{x:Static ToolBar.ButtonStyleKey}" TargetType="{x:Type Button}" BasedOn="{x:Null}"&gt;

        &lt;Setter Property="Control.Foreground" Value="Black" /&gt;

        &lt;Setter Property="FrameworkElement.MinHeight" Value="18" /&gt;

        &lt;Setter Property="FrameworkElement.MinWidth" Value="35" /&gt;

        &lt;Setter Property="Control.Padding" Value="1" /&gt;

        &lt;Setter Property="FontSize" Value="12"&gt;&lt;/Setter&gt;

        &lt;!--&lt;Setter Property="FrameworkElement.FocusVisualStyle" Value="{DynamicResource NuclearButtonFocusVisual}" /&gt;

        &lt;Setter Property="Control.Template" Value="{DynamicResource ButtonTemplate}" /&gt;--&gt;

        &lt;Setter Property="Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type Button}"&gt;

                    &lt;Border Name="Bd"

                            Background="{TemplateBinding Background}"

                            BorderBrush="{TemplateBinding BorderBrush}"

                            BorderThickness="{TemplateBinding BorderThickness}"

                            Padding="{TemplateBinding Padding}"

                            SnapsToDevicePixels="true"&gt;

                        &lt;StackPanel Background="Transparent" Orientation="Horizontal"&gt;

                            &lt;vc:ButtonContentPresenter ButtonContent="{TemplateBinding Content}" Tag="{TemplateBinding Tag}"&gt;&lt;/vc:ButtonContentPresenter&gt;

                            &lt;ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"

                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"

                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/&gt;

                            &lt;Rectangle Width="3"&gt;&lt;/Rectangle&gt;

                        &lt;/StackPanel&gt;

                    &lt;/Border&gt;

                    &lt;ControlTemplate.Triggers&gt;

                        &lt;Trigger Property="IsMouseOver"

                                 Value="true"&gt;

                            &lt;Setter TargetName="Bd"

                                    Property="BorderBrush"

                                    Value="{StaticResource ToolBarButtonHoverBorder}"/&gt;

                            &lt;Setter TargetName="Bd"

                                    Property="Background"

                                    Value="{StaticResource ToolBarButtonHover}"/&gt;

                        &lt;/Trigger&gt;

                        &lt;Trigger Property="IsKeyboardFocused"

                                 Value="true"&gt;

                            &lt;Setter TargetName="Bd"

                                    Property="BorderBrush"

                                    Value="{StaticResource ToolBarButtonHoverBorder}"/&gt;

                            &lt;Setter TargetName="Bd"

                                    Property="Background"

                                    Value="{StaticResource ToolBarButtonHover}"/&gt;

                        &lt;/Trigger&gt;

                        &lt;Trigger Property="IsPressed"

                                 Value="true"&gt;

                            &lt;Setter TargetName="Bd"

                                    Property="BorderBrush"

                                    Value="{StaticResource ToolBarButtonPressedBorder}"/&gt;

                            &lt;Setter TargetName="Bd"

                                    Property="Background"

                                    Value="{StaticResource ToolBarButtonPressed}"/&gt;

                        &lt;/Trigger&gt;

                        &lt;Trigger Property="IsEnabled"

                                 Value="false"&gt;

                            &lt;Setter Property="Foreground"

                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/&gt;

                        &lt;/Trigger&gt;

                    &lt;/ControlTemplate.Triggers&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

    

    &lt;!--SplitButton--&gt;

    &lt;LinearGradientBrush x:Key="ColorPickerDarkBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0"&gt;

        &lt;GradientStop Color="#FFA3AEB9" Offset="0" /&gt;

        &lt;GradientStop Color="#FF8399A9" Offset="0.375" /&gt;

        &lt;GradientStop Color="#FF718597" Offset="0.375" /&gt;

        &lt;GradientStop Color="#FF617584" Offset="1" /&gt;

    &lt;/LinearGradientBrush&gt;

    &lt;Style x:Key="{x:Type local:SplitButton}" TargetType="{x:Type local:SplitButton}"&gt;

        &lt;Setter Property="Control.BorderThickness" Value="1" /&gt;

        &lt;Setter Property="Control.IsTabStop" Value="False" /&gt;

        &lt;Setter Property="Control.HorizontalContentAlignment" Value="Center" /&gt;

        &lt;Setter Property="Control.VerticalContentAlignment" Value="Center" /&gt;

        &lt;Setter Property="Control.Padding" Value="3" /&gt;

        &lt;Setter Property="Control.Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type local:SplitButton}"&gt;

                    &lt;Grid Name="MainGrid" SnapsToDevicePixels="True" Background="Red"&gt;

                        &lt;bc:ButtonChrome x:Name="ControlChrome" RenderEnabled="{TemplateBinding UIElement.IsEnabled}"&gt;

                            &lt;Grid Background="{x:Null}"&gt;

                                &lt;Grid.ColumnDefinitions&gt;

                                    &lt;ColumnDefinition Width="\*" /&gt;

                                    &lt;ColumnDefinition Width="Auto" /&gt;

                                &lt;/Grid.ColumnDefinitions&gt;

                                &lt;Button Name="PART\_ActionButton" Margin="0" HorizontalContentAlignment="{TemplateBinding Control.HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding Control.VerticalContentAlignment}" Padding="{TemplateBinding Control.Padding}"&gt;

                                    &lt;Button.Template&gt;

                                        &lt;ControlTemplate TargetType="{x:Type Button}"&gt;

                                            &lt;ContentPresenter /&gt;

                                        &lt;/ControlTemplate&gt;

                                    &lt;/Button.Template&gt;

                                    &lt;Grid Background="{x:Null}"&gt;

                                        &lt;bc:ButtonChrome x:Name="ActionButtonChrome" CornerRadius="2.75, 0, 0, 2.75" RenderNormal="False" RenderEnabled="{TemplateBinding UIElement.IsEnabled}" RenderMouseOver="{Binding IsMouseOver, ElementName=PART\_ActionButton}" RenderPressed="{Binding IsPressed, ElementName=PART\_ActionButton}"&gt;

                                            &lt;ContentPresenter Name="ActionButtonContent" Margin="{TemplateBinding Control.Padding}" Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" RecognizesAccessKey="True" /&gt;

                                        &lt;/bc:ButtonChrome&gt;

                                    &lt;/Grid&gt;

                                &lt;/Button&gt;

                                &lt;ToggleButton Name="PART\_ToggleButton" Grid.Column="1" IsTabStop="False" IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" IsHitTestVisible="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}"&gt;

                                    &lt;ToggleButton.Template&gt;

                                        &lt;ControlTemplate TargetType="{x:Type ToggleButton}"&gt;

                                            &lt;ContentPresenter /&gt;

                                        &lt;/ControlTemplate&gt;

                                    &lt;/ToggleButton.Template&gt;

                                    &lt;Grid Background="{x:Null}"&gt;

                                        &lt;bc:ButtonChrome x:Name="ToggleButtonChrome" CornerRadius="0, 2.75, 2.75, 0" RenderNormal="False" RenderChecked="{TemplateBinding local:DropDownButton.IsOpen}" RenderEnabled="{TemplateBinding UIElement.IsEnabled}" RenderMouseOver="{Binding IsMouseOver, ElementName=PART\_ToggleButton}" RenderPressed="{Binding IsPressed, ElementName=PART\_ToggleButton}"&gt;

                                            &lt;Grid Name="arrowGlyph" IsHitTestVisible="False" Margin="4,3,4,3"&gt;

                                                &lt;Path Width="7" Height="4" Data="M0,1C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1z" Fill="#FF000000" /&gt;

                                            &lt;/Grid&gt;

                                        &lt;/bc:ButtonChrome&gt;

                                    &lt;/Grid&gt;

                                &lt;/ToggleButton&gt;

                            &lt;/Grid&gt;

                        &lt;/bc:ButtonChrome&gt;

                        &lt;Popup Name="PART\_Popup" HorizontalOffset="1" VerticalOffset="1" AllowsTransparency="True" StaysOpen="False" Placement="Bottom" Focusable="False" IsOpen="{Binding IsChecked, ElementName=PART\_ToggleButton}"&gt;

                            &lt;Border BorderThickness="1" Background="{StaticResource PopupBackgroundBrush}" BorderBrush="{StaticResource ColorPickerDarkBorderBrush}"&gt;

                                &lt;ContentPresenter Content="{TemplateBinding local:DropDownButton.DropDownContent}" /&gt;

                            &lt;/Border&gt;

                        &lt;/Popup&gt;

                    &lt;/Grid&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

 

    &lt;Style TargetType="{x:Type DataGrid}"&gt;

        &lt;!--网格线颜色--&gt;

        &lt;!--&lt;Setter Property="Background" Value="#E6DBBB" /&gt;--&gt;

        &lt;Setter Property="Background" Value="Transparent"&gt;&lt;/Setter&gt;

        &lt;Setter Property="BorderBrush" Value="#d6c79b" /&gt;

        &lt;Setter Property="HorizontalGridLinesBrush"&gt;

            &lt;Setter.Value&gt;

                &lt;SolidColorBrush Color="#FF7EC7F5"/&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

        &lt;Setter Property="VerticalGridLinesBrush"&gt;

            &lt;Setter.Value&gt;

                &lt;SolidColorBrush  Color="#FF7EC7F5"/&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

        &lt;Setter Property="AlternatingRowBackground" Value="#f2f2f2"&gt;&lt;/Setter&gt;

        &lt;Setter Property="Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type DataGrid}"&gt;

                    &lt;Grid Background="{x:Null}"&gt;

                        &lt;Grid.RowDefinitions&gt;

                            &lt;RowDefinition Height="\*"&gt;&lt;/RowDefinition&gt;

                            &lt;RowDefinition Height="Auto"&gt;&lt;/RowDefinition&gt;

                        &lt;/Grid.RowDefinitions&gt;

                            &lt;Border Background="{TemplateBinding Background}"

                      BorderBrush="{TemplateBinding BorderBrush}"

                      BorderThickness="{TemplateBinding BorderThickness}"

                      SnapsToDevicePixels="True"

                      Padding="{TemplateBinding Padding}"&gt;

                        &lt;ScrollViewer   Focusable="false"

                                Name="DG\_ScrollViewer"&gt;

                            &lt;ScrollViewer.Template&gt;

                                &lt;ControlTemplate TargetType="{x:Type ScrollViewer}"&gt;

                                    &lt;Grid&gt;

                                        &lt;Grid.RowDefinitions&gt;

                                            &lt;RowDefinition Height="Auto"/&gt;

                                            &lt;RowDefinition Height="\*"/&gt;

                                            &lt;RowDefinition Height="Auto"/&gt;

                                        &lt;/Grid.RowDefinitions&gt;

 

                                        &lt;Grid.ColumnDefinitions&gt;

                                            &lt;ColumnDefinition Width="Auto"/&gt;

                                            &lt;ColumnDefinition Width="\*"/&gt;

                                            &lt;ColumnDefinition Width="Auto"/&gt;

                                        &lt;/Grid.ColumnDefinitions&gt;

 

                                        &lt;Button Command="{x:Static DataGrid.SelectAllCommand}"

                                                Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}, Path=CellsPanelHorizontalOffset}"

                                                Style="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type DataGrid}, ResourceId=DataGridSelectAllButtonStyle}}"

                                                Focusable="false"

                                                Visibility="{Binding RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}, Path=HeadersVisibility, Converter={x:Static DataGrid.HeadersVisibilityConverter}, ConverterParameter={x:Static DataGridHeadersVisibility.All}}" /&gt;

                                        &lt;DataGridColumnHeadersPresenter Grid.Column="1" 

                                                           Name="PART\_ColumnHeadersPresenter"

                                                           Visibility="{Binding RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}, Path=HeadersVisibility, Converter={x:Static DataGrid.HeadersVisibilityConverter}, ConverterParameter={x:Static DataGridHeadersVisibility.Column}}"/&gt;

 

                                        &lt;ScrollContentPresenter x:Name="PART\_ScrollContentPresenter" Grid.Row="1" Grid.ColumnSpan="2" CanContentScroll="{TemplateBinding CanContentScroll}" /&gt;

 

                                        &lt;ScrollBar Grid.Row="1" Grid.Column="2" Name="PART\_VerticalScrollBar"

                                                 Orientation="Vertical"

                                                 Maximum="{TemplateBinding ScrollableHeight}"

                                                 ViewportSize="{TemplateBinding ViewportHeight}"

                                                 Value="{Binding Path=VerticalOffset, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"

                                                 Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/&gt;

 

                                        &lt;Grid Grid.Row="2" Grid.Column="1"&gt;

                                            &lt;Grid.ColumnDefinitions&gt;

                                                &lt;ColumnDefinition Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}, Path=NonFrozenColumnsViewportHorizontalOffset}"/&gt;

                                                &lt;ColumnDefinition Width="\*"/&gt;

                                            &lt;/Grid.ColumnDefinitions&gt;

                                            &lt;ScrollBar Grid.Column="1"

                                                       Name="PART\_HorizontalScrollBar"

                                                       Orientation="Horizontal"

                                                       Maximum="{TemplateBinding ScrollableWidth}"

                                                       ViewportSize="{TemplateBinding ViewportWidth}"

                                                       Value="{Binding Path=HorizontalOffset, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"

                                                       Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/&gt;

 

                                        &lt;/Grid&gt;

                                    &lt;/Grid&gt;

                                &lt;/ControlTemplate&gt;

                            &lt;/ScrollViewer.Template&gt;

                            &lt;ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /&gt;

                        &lt;/ScrollViewer&gt;

                    &lt;/Border&gt;

                        &lt;vc:DataGridRowCountPersenter Grid.Row="1" Height="20"  DataContext="{TemplateBinding ItemsSource}"&gt;&lt;/vc:DataGridRowCountPersenter&gt;

                    &lt;/Grid&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

 

    &lt;Style x:Key="ColumnHeaderGripperStyle" TargetType="{x:Type Thumb}"&gt;

        &lt;Setter Property="Width" Value="8"/&gt;

        &lt;Setter Property="Background" Value="Transparent"/&gt;

        &lt;Setter Property="Cursor" Value="SizeWE"/&gt;

        &lt;Setter Property="Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type Thumb}"&gt;

                    &lt;Border Padding="{TemplateBinding Padding}"

                        Background="{TemplateBinding Background}"/&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

 

    &lt;Style x:Key="{x:Type DataGridColumnHeader}" TargetType="{x:Type DataGridColumnHeader}"&gt;

        &lt;Setter Property="SnapsToDevicePixels" Value="True" /&gt;

        &lt;Setter Property="MinWidth" Value="0" /&gt;

        &lt;Setter Property="MinHeight" Value="20" /&gt;

        &lt;Setter Property="Foreground" Value="#323433" /&gt;

        &lt;Setter Property="Background" Value="#FFE8E8E2"&gt;&lt;/Setter&gt;

        &lt;Setter Property="BorderBrush" Value="#FF7EC7F5"&gt;&lt;/Setter&gt;

        &lt;Setter Property="SeparatorBrush" Value="#FF7EC7F5"&gt;&lt;/Setter&gt;

        &lt;Setter Property="SeparatorVisibility" Value="Visible"&gt;&lt;/Setter&gt;

        &lt;Setter Property="BorderThickness" Value="0,1,1,1"&gt;&lt;/Setter&gt;

        &lt;Setter Property="VerticalContentAlignment" Value="Center" /&gt;

        &lt;Setter Property="Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type DataGridColumnHeader}"&gt;

                    &lt;Grid&gt;

                        &lt;theme:DataGridHeaderBorder SortDirection="{TemplateBinding SortDirection}"

                                         IsHovered="{TemplateBinding IsMouseOver}"

                                         IsPressed="{TemplateBinding IsPressed}"

                                         IsClickable="{TemplateBinding CanUserSort}"

                                         Background="{x:Null}"

                                         BorderBrush="{x:Null}"

                                         BorderThickness="0"

                                         Padding ="{TemplateBinding Padding}"

                                         SeparatorVisibility="{TemplateBinding SeparatorVisibility}"

                                         SeparatorBrush="{TemplateBinding SeparatorBrush}"&gt;

                            &lt;ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"

                                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"

                                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" /&gt;

                        &lt;/theme:DataGridHeaderBorder&gt;

 

                        &lt;Thumb x:Name="PART\_LeftHeaderGripper"

                               HorizontalAlignment="Left"

                               Style="{StaticResource ColumnHeaderGripperStyle}"/&gt;

                        &lt;Thumb x:Name="PART\_RightHeaderGripper"

                               HorizontalAlignment="Right"

                               Style="{StaticResource ColumnHeaderGripperStyle}"/&gt;

                    &lt;/Grid&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

 

 

    &lt;Style TargetType="{x:Type DataGridRowHeader}"&gt;

        &lt;Setter Property="Background" Value="#FFE8E8E2"&gt;&lt;/Setter&gt;

        &lt;Setter Property="MinWidth" Value="3"&gt;&lt;/Setter&gt;

    &lt;/Style&gt;

 

    &lt;!--行样式触发--&gt;

    &lt;!--背景色改变必须先设置cellStyle 因为cellStyle会覆盖rowStyle样式--&gt;

    &lt;Style  TargetType="{x:Type DataGridRow}"&gt;

        &lt;!--&lt;Setter Property="Background" Value="#F2F2F2" /&gt;--&gt;

        &lt;Setter Property="MinHeight" Value="23"/&gt;

        &lt;Setter Property="Foreground" Value="Black" /&gt;

        &lt;Style.Triggers&gt;

            &lt;Trigger Property="IsMouseOver" Value="True"&gt;

                &lt;Setter Property="Background" Value="LightGray"/&gt;

                &lt;!--&lt;Setter Property="Foreground" Value="White"/&gt;--&gt;

            &lt;/Trigger&gt;

 

            &lt;Trigger Property="IsSelected" Value="True"&gt;

                &lt;Setter Property="Foreground" Value="Black"/&gt;

            &lt;/Trigger&gt;

        &lt;/Style.Triggers&gt;

    &lt;/Style&gt;

 

    &lt;!--单元格样式触发--&gt;

    &lt;Style TargetType="{x:Type DataGridCell}"&gt;

        &lt;!--&lt;Setter Property="Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="DataGridCell"&gt;

                    &lt;TextBlock TextAlignment="Center" VerticalAlignment="Center"  &gt;

                           &lt;ContentPresenter /&gt;

                    &lt;/TextBlock&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;--&gt;

        &lt;Style.Triggers&gt;

            &lt;Trigger Property="IsSelected" Value="True"&gt;

                &lt;!--&lt;Setter Property="Background" Value="White"/&gt;

                &lt;Setter Property="BorderThickness" Value="0"/&gt;--&gt;

                &lt;Setter Property="Foreground" Value="White"/&gt;

            &lt;/Trigger&gt;

        &lt;/Style.Triggers&gt;

    &lt;/Style&gt;

 

 

 

    &lt;Style x:Key="{x:Type local:DropDownButton}" TargetType="{x:Type local:DropDownButton}"&gt;

        &lt;Setter Property="Control.BorderThickness" Value="1" /&gt;

        &lt;Setter Property="Control.IsTabStop" Value="False" /&gt;

        &lt;Setter Property="Control.HorizontalContentAlignment" Value="Center" /&gt;

        &lt;Setter Property="Control.VerticalContentAlignment" Value="Center" /&gt;

        &lt;Setter Property="Control.Padding" Value="3" /&gt;

        &lt;Setter Property="Control.Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type local:DropDownButton}"&gt;

                    &lt;Grid Name="MainGrid" SnapsToDevicePixels="True" Background="Transparent"&gt;

                        &lt;ToggleButton Name="PART\_DropDownButton" Grid.Column="1" IsTabStop="False" IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" IsHitTestVisible="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseBoolConverter}}"&gt;

                            &lt;ToggleButton.Template&gt;

                                &lt;ControlTemplate TargetType="{x:Type ToggleButton}"&gt;

                                    &lt;ContentPresenter /&gt;

                                &lt;/ControlTemplate&gt;

                            &lt;/ToggleButton.Template&gt;

                            &lt;Grid Background="Transparent"&gt;

                                &lt;bc:ButtonChrome x:Name="ToggleButtonChrome" RenderChecked="{TemplateBinding local:DropDownButton.IsOpen}" RenderEnabled="{TemplateBinding UIElement.IsEnabled}" RenderMouseOver="{Binding IsMouseOver, ElementName=PART\_DropDownButton}" RenderPressed="{Binding IsPressed, ElementName=PART\_DropDownButton}"&gt;

                                    &lt;Grid Background="Transparent"&gt;

                                        &lt;Grid.ColumnDefinitions&gt;

                                            &lt;ColumnDefinition Width="\*" /&gt;

                                            &lt;ColumnDefinition Width="Auto" /&gt;

                                        &lt;/Grid.ColumnDefinitions&gt;

                                        &lt;ContentPresenter Margin="{TemplateBinding Control.Padding}" Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" RecognizesAccessKey="True" /&gt;

                                        &lt;Grid Name="arrowGlyph" IsHitTestVisible="False" Margin="4,3,4,3" Grid.Column="1" Background="Transparent"&gt;

                                            &lt;Path Width="7" Height="4" Data="M0,1C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1z" Fill="#FF000000" /&gt;

                                        &lt;/Grid&gt;

                                    &lt;/Grid&gt;

                                &lt;/bc:ButtonChrome&gt;

                            &lt;/Grid&gt;

                        &lt;/ToggleButton&gt;

                        &lt;Popup Name="PART\_Popup" HorizontalOffset="1" VerticalOffset="1" AllowsTransparency="True" StaysOpen="False" Placement="Bottom" Focusable="False" IsOpen="{Binding IsChecked, ElementName=PART\_DropDownButton}"&gt;

                            &lt;Border BorderThickness="1" Background="{StaticResource PopupBackgroundBrush}" BorderBrush="{StaticResource PopupDarkBorderBrush}"&gt;

                                &lt;ContentPresenter Content="{TemplateBinding local:DropDownButton.DropDownContent}" /&gt;

                            &lt;/Border&gt;

                        &lt;/Popup&gt;

                    &lt;/Grid&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

 

    &lt;Style x:Key="{x:Type local:CheckListBox}" TargetType="{x:Type local:CheckListBox}"&gt;

        &lt;Setter Property="Control.BorderBrush" Value="#FF707070" /&gt;

        &lt;Setter Property="Control.BorderThickness" Value="1" /&gt;

        &lt;Setter Property="KeyboardNavigation.TabNavigation" Value="Once" /&gt;

        &lt;Setter Property="Control.Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type local:CheckListBox}"&gt;

                    &lt;Border Background="{TemplateBinding Control.Background}" BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="{TemplateBinding Control.BorderThickness}"&gt;

                        &lt;ScrollViewer Padding="{TemplateBinding Control.Padding}" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto"&gt;

                            &lt;ItemsPresenter SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" /&gt;

                        &lt;/ScrollViewer&gt;

                    &lt;/Border&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

    &lt;Style x:Key="{x:Type local:CheckListBoxItem}" TargetType="{x:Type local:CheckListBoxItem}"&gt;

        &lt;Setter Property="Foreground" Value="Black"&gt;&lt;/Setter&gt;

        &lt;Setter Property="Control.Template"&gt;

            &lt;Setter.Value&gt;

                &lt;ControlTemplate TargetType="{x:Type local:CheckListBoxItem}"&gt;

                    &lt;Border Name="\_background" Background="{TemplateBinding Control.Background}" BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="{TemplateBinding Control.BorderThickness}"&gt;

                        &lt;Grid Background="Transparent"&gt;

                            &lt;Grid.ColumnDefinitions&gt;

                                &lt;ColumnDefinition Width="Auto" /&gt;

                                &lt;ColumnDefinition Width="\*" /&gt;

                            &lt;/Grid.ColumnDefinitions&gt;

                            &lt;CheckBox Name="PART\_CheckBox" VerticalAlignment="Center" Focusable="False" Margin="3,1,5,1" IsChecked="{Binding IsChecked, RelativeSource={RelativeSource TemplatedParent}}" /&gt;

                            &lt;Border Grid.Column="1"&gt;

                                &lt;ContentPresenter Margin="2"  ContentSource="Content" /&gt;

                            &lt;/Border&gt;

                        &lt;/Grid&gt;

                    &lt;/Border&gt;

                    &lt;ControlTemplate.Triggers&gt;

                        &lt;Trigger Property="UIElement.IsMouseOver" Value="True"&gt;

                            &lt;Setter TargetName="\_background" Property="Border.Background" Value="#FF316AC5" /&gt;

                            &lt;Setter Property="Control.Foreground" Value="#FFFFFFFF" /&gt;

                        &lt;/Trigger&gt;

                    &lt;/ControlTemplate.Triggers&gt;

                &lt;/ControlTemplate&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

 

    &lt;Style x:Key="{x:Type Grid}"&gt;

        &lt;Setter Property="Control.Background"&gt;

            &lt;Setter.Value&gt;

                &lt;LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5"&gt;

                    &lt;GradientStop Color="White" Offset="0" /&gt;

                    &lt;GradientStop Color="#FFE8E8E2" Offset="1" /&gt;

                &lt;/LinearGradientBrush&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

 

    &lt;Style x:Key="{x:Type TabControl}"&gt;

        &lt;Setter Property="Control.Background"&gt;

            &lt;Setter.Value&gt;

                &lt;LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5"&gt;

                    &lt;GradientStop Color="White" Offset="0" /&gt;

                    &lt;GradientStop Color="#FFE8E8E2" Offset="1" /&gt;

                &lt;/LinearGradientBrush&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

 

    &lt;Style x:Key="{x:Type wb:ToolBarTrayEx}"&gt;

        &lt;Setter Property="Control.Background"&gt;

            &lt;Setter.Value&gt;

                &lt;LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5"&gt;

                    &lt;GradientStop Color="White" Offset="0" /&gt;

                    &lt;GradientStop Color="#FFE8E8E2" Offset="1" /&gt;

                &lt;/LinearGradientBrush&gt;

            &lt;/Setter.Value&gt;

        &lt;/Setter&gt;

    &lt;/Style&gt;

 

    &lt;DataTemplate x:Key="{x:Static vc:ButtonContentPresenter.NewButtonContentResourceKey}" &gt;

        &lt;StackPanel    Orientation="Horizontal"&gt;

            &lt;Image Source="/Rich.Testability.View;component/Images/新增.png" Width="16" Height="16"&gt;&lt;/Image&gt;

            &lt;Rectangle Width="4"&gt;&lt;/Rectangle&gt;

        &lt;/StackPanel&gt;

    &lt;/DataTemplate&gt;

    &lt;DataTemplate x:Key="{x:Static vc:ButtonContentPresenter.EditButtonContentResourceKey}" &gt;

        &lt;StackPanel  Orientation="Horizontal"&gt;

            &lt;Image Source="/Rich.Testability.View;component/Images/编辑.png" Width="16" Height="16"&gt;&lt;/Image&gt;

            &lt;Rectangle Width="4"&gt;&lt;/Rectangle&gt;

        &lt;/StackPanel&gt;

    &lt;/DataTemplate&gt;

    &lt;DataTemplate  x:Key="{x:Static vc:ButtonContentPresenter.DeleteButtonContentResourceKey}"&gt;

        &lt;StackPanel  Orientation="Horizontal"&gt;

            &lt;Image Source="/Rich.Testability.View;component/Images/删除.png" Width="16" Height="16"&gt;&lt;/Image&gt;

            &lt;Rectangle Width="4"&gt;&lt;/Rectangle&gt;

        &lt;/StackPanel&gt;

    &lt;/DataTemplate&gt;

    &lt;DataTemplate x:Key="{x:Static vc:ButtonContentPresenter.SaveButtonContentResourceKey}" &gt;

        &lt;StackPanel   Orientation="Horizontal"&gt;

            &lt;Image Source="/Rich.Testability.View;component/Images/保存.png" Width="16" Height="16"&gt;&lt;/Image&gt;

            &lt;Rectangle Width="4"&gt;&lt;/Rectangle&gt;

        &lt;/StackPanel&gt;

    &lt;/DataTemplate&gt;

 

    &lt;Style x:Key="{x:Type Window}" TargetType="Window"&gt;

        &lt;Setter Property="OverridesDefaultStyle" Value="False"&gt;&lt;/Setter&gt;

        &lt;Setter Property="ShowInTaskbar" Value="False"&gt;&lt;/Setter&gt;

        &lt;Setter Property="Icon" Value="{x:Null}"&gt;&lt;/Setter&gt;

    &lt;/Style&gt;

 

    &lt;!--WPF Toolkit Control Style--&gt;

    &lt;Style x:Key="{x:Type local:WatermarkTextBox}" TargetType="{x:Type local:WatermarkTextBox}"&gt;

        &lt;Setter Property="Control.Padding" Value="1" /&gt;

    &lt;/Style&gt;

 

&lt;/ResourceDictionary&gt;

 

 

 

 

 

 

 

 

 

 

 

 

 

&lt;Application x:Class="Rich.Testability.App"

             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt;

    &lt;Application.Resources&gt;

        &lt;ResourceDictionary&gt;

            &lt;ResourceDictionary.MergedDictionaries&gt;

                &lt;ResourceDictionary  Source="/Rich.Testability.App;component/WorkspaceResource.xaml"/&gt;

                &lt;ResourceDictionary  Source="/Rich.Testability.View.Core;component/TreeListView/Themes/Generic.xaml"/&gt;

                &lt;!--&lt;ResourceDictionary  Source="/Rich.Testability.App;component/Chart.xaml"/&gt;--&gt;

                &lt;ResourceDictionary  Source="/Rich.Testability.App;component/theme.xaml"/&gt;

            &lt;/ResourceDictionary.MergedDictionaries&gt;

 

            &lt;Style TargetType="{x:Type TextBlock}"  x:Key="columnErrorTemplate"&gt;

                &lt;Setter Property="TextWrapping" Value="Wrap"&gt;&lt;/Setter&gt;

                &lt;Setter Property="FontSize" Value="14"&gt;&lt;/Setter&gt;

                &lt;Style.Triggers&gt;

                    &lt;Trigger Property="Validation.HasError" Value="true"&gt;

                        &lt;Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource  Mode=Self},Path=(Validation.Errors)\[0].ErrorContent}"&gt;&lt;/Setter&gt;

                    &lt;/Trigger&gt;

                &lt;/Style.Triggers&gt;

            &lt;/Style&gt;

 

            &lt;Style TargetType="{x:Type TextBox}"  x:Key="TextBoxErrorTemplate"&gt;

                &lt;Style.Triggers&gt;

                    &lt;Trigger Property="Validation.HasError" Value="true"&gt;

                        &lt;Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource  Mode=Self},Path=(Validation.Errors)\[0].ErrorContent}"&gt;&lt;/Setter&gt;

                    &lt;/Trigger&gt;

                &lt;/Style.Triggers&gt;

            &lt;/Style&gt;

 

            &lt;Style TargetType="{x:Type TextBox}" &gt;

                &lt;Style.Triggers&gt;

                    &lt;Trigger Property="Validation.HasError" Value="true"&gt;

                        &lt;Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource  Mode=Self},Path=(Validation.Errors)\[0].ErrorContent}"&gt;&lt;/Setter&gt;

                    &lt;/Trigger&gt;

                &lt;/Style.Triggers&gt;

            &lt;/Style&gt;

 

            &lt;!--&lt;Style TargetType="{x:Type DataGrid}"&gt;

                &lt;Setter Property="Background" Value="White"&gt;&lt;/Setter&gt;

                &lt;Setter Property="HorizontalGridLinesBrush" Value="Gray"&gt;&lt;/Setter&gt;

                &lt;Setter Property="VerticalGridLinesBrush" Value="Gray"&gt;&lt;/Setter&gt;

                &lt;Setter Property="MinRowHeight" Value="20"&gt;&lt;/Setter&gt;

            &lt;/Style&gt;--&gt;

            &lt;Style TargetType="{x:Type TextBlock}"&gt;

                &lt;Setter Property="FontSize" Value="13"&gt;&lt;/Setter&gt;

            &lt;/Style&gt;

 

            &lt;Style x:Key="CheckListBoxStyle" TargetType="{x:Type ListBox}"

                   BasedOn="{StaticResource ResourceKey={x:Type ListBox}}"&gt;

                &lt;Setter Property="ItemContainerStyle"&gt;

                    &lt;Setter.Value&gt;

                        &lt;Style TargetType="{x:Type ListBoxItem}"&gt;

                            &lt;Setter Property="Focusable" Value="False" /&gt;

                            &lt;Setter Property="Template"&gt;

                                &lt;Setter.Value&gt;

                                    &lt;ControlTemplate TargetType="{x:Type ListBoxItem}"&gt;

                                        &lt;CheckBox Content="{TemplateBinding Content}"

                                      ContentTemplate="{TemplateBinding ContentTemplate}"

                                      ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"

                                      IsChecked="{Binding IsSelected,RelativeSource={RelativeSource TemplatedParent}}"/&gt;

                                    &lt;/ControlTemplate&gt;

                                &lt;/Setter.Value&gt;

                            &lt;/Setter&gt;

                            &lt;Setter Property="IsSelected" Value="{Binding IsEnabled}"/&gt;

                            &lt;Setter Property="Margin" Value="2,2,0,0" /&gt;

                        &lt;/Style&gt;

                    &lt;/Setter.Value&gt;

                &lt;/Setter&gt;

                &lt;Setter Property="SelectionMode" Value="Multiple" /&gt;

            &lt;/Style&gt;

            

        &lt;/ResourceDictionary&gt;

    &lt;/Application.Resources&gt;

&lt;/Application&gt;