Xceed DataGrid for WPF v7.2 Documentation
Elemental.Resources.xaml
Welcome to Xceed DataGrid, Editors, and 3D Views for WPF v7.2 > Xceed DataGrid for WPF > DataGrid Fundamentals > Views and Themes > Themes > Multi-surface Themes > Custom Multi-surface Themes > ElementalPinkTheme Class > Resources > Elemental.Resources.xaml

The following XAML represents the resource dictionary that provides the templates and styles required by the CardflowView3D.Elemental.Pink resource dictionary.

XAML
Copy Code
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

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

                   xmlns:local="clr-namespace:Xceed.Wpf.DataGrid.Views"

                   xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid">

  <SolidColorBrush x:Key="gridLineBrush"

                   Color="Gray" />

  <SolidColorBrush x:Key="errorBackgroundBrush"

                   Color="Red" />

  <SolidColorBrush x:Key="errorForegroundBrush"

                   Color="White" />

  <!-- Pen that is used to draw the drop mark when a ColumnHeader is dragged over another one. -->

  <!-- We do not use a DynamicResource since this instance of a Pen could be reused via multiple threads. See case: 113402. -->

  <Pen x:Key="dropMarkPen"

       Brush="{x:Static SystemColors.HighlightBrush}"

       Thickness="7" />

  <Thickness x:Key="cellPadding"

             Left="2"

             Top="2"

             Right="2"

             Bottom="2" />

  <!--**************************

   * TEMPLATE: ScrollTip

   ************************** -->

 <ControlTemplate x:Key="scrollTipTemplate"

                  TargetType="{x:Type xcdg:ScrollTip}">

   <Grid VerticalAlignment="{TemplateBinding VerticalAlignment}"

         HorizontalAlignment="{TemplateBinding HorizontalAlignment}">

     <Border BorderThickness="1,1,1,1"

             BorderBrush="{TemplateBinding BorderBrush}"

             Background="{TemplateBinding Background}">

       <ContentPresenter VerticalAlignment="Center"

                         HorizontalAlignment="Right"

                         Margin="5"

                         TextElement.Foreground="{TemplateBinding TextElement.Foreground}"

                         Content="{TemplateBinding Content}"

                         ContentTemplate="{Binding RelativeSource={RelativeSource TemplatedParent},Path=(xcdg:DataGridControl.DataGridContext).ScrollTipContentTemplate}"

                         ContentTemplateSelector="{Binding RelativeSource={RelativeSource TemplatedParent},Path=(xcdg:DataGridControl.DataGridContext).ScrollTipContentTemplateSelector}"/>

     </Border>

   </Grid>

 </ControlTemplate>

   

   <!--**************************

   * TEMPLATE: CardViewScrollViewer

   ************************** -->

   <Style TargetType="{x:Type xcdg:CardViewScrollViewer}"

          x:Key="3dViewScrollViewer">

       <Setter Property="HorizontalScrollBarVisibility"

               Value="Visible" />

       <Setter Property="VerticalScrollBarVisibility"

               Value="Auto" />

       <Setter Property="CanContentScroll"

               Value="True" />

       <Setter Property="Template">

           <Setter.Value>

               <ControlTemplate TargetType="{x:Type xcdg:CardViewScrollViewer}">

                   <!-- Root Grid that layout the "content" and the Scrollbars -->

                   <Grid>

                       <Grid.Resources>

                           <Storyboard x:Key="mouseOver">

                               <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"

                                                              Storyboard.TargetName="overBorder"

                                                              Storyboard.TargetProperty="(UIElement.Opacity)">

                                   <SplineDoubleKeyFrame KeyTime="00:00:00.400"

                                                         Value="0.3" />

                               </DoubleAnimationUsingKeyFrames>

                               <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"

                                                              Storyboard.TargetName="ContentPresenter"

                                                              Storyboard.TargetProperty="(UIElement.Opacity)">

                                   <SplineDoubleKeyFrame KeyTime="00:00:00.400"

                                                         Value="1" />

                               </DoubleAnimationUsingKeyFrames>

                           </Storyboard>

                           <Storyboard x:Key="mouseOver_Leave">

                               <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"

                                                              Storyboard.TargetName="overBorder"

                                                              Storyboard.TargetProperty="(UIElement.Opacity)">

                                   <SplineDoubleKeyFrame KeyTime="00:00:00.400"

                                                         Value="0" />

                               </DoubleAnimationUsingKeyFrames>

                               <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"

                                                              Storyboard.TargetName="ContentPresenter"

                                                              Storyboard.TargetProperty="(UIElement.Opacity)">

                                   <SplineDoubleKeyFrame KeyTime="00:00:00.400"

                                                         Value="0.5" />

                               </DoubleAnimationUsingKeyFrames>

                           </Storyboard>

                           <LinearGradientBrush x:Key="ActiveColor"

                                                StartPoint="1,0.5"

                                                EndPoint="0,0.5">

                               <GradientStop Offset="1"

                                             Color="#FF7A7A7A" />

                               <GradientStop Offset="0.5"

                                             Color="#FF787878" />

                               <GradientStop Offset="0.5"

                                             Color="#FF6C6C6C" />

                               <GradientStop Offset="0"

                                             Color="#FF919191" />

                           </LinearGradientBrush>

                           <Style x:Key="clearFocusVisual">

                               <Setter Property="Control.Template">

                                   <Setter.Value>

                                       <ControlTemplate>

                                           <Border>

                                               <Rectangle Margin="2"

                                                          Stroke="#FC484848"

                                                          StrokeDashArray="1 2"

                                                          StrokeThickness="1" />

                                           </Border>

                                       </ControlTemplate>

                                   </Setter.Value>

                               </Setter>

                           </Style>

                           <LinearGradientBrush x:Key="backgroundActiveColor"

                                                StartPoint="0,0.5"

                                                EndPoint="1,0.5">

                               <GradientStop Offset="0"

                                             Color="Transparent" />

                               <GradientStop Offset="1"

                                             Color="Transparent" />

                           </LinearGradientBrush>

                           <LinearGradientBrush x:Key="whiteInnerBorder"

                                                StartPoint="0,0.5"

                                                EndPoint="1,0.5">

                               <GradientStop Offset="0"

                                             Color="#99FFFFFF" />

                               <GradientStop Offset="1"

                                             Color="#4CFFFFFF" />

                           </LinearGradientBrush>

                           <RadialGradientBrush x:Key="blackBorderBackground"

                                                GradientOrigin="0.5,0.73">

                               <RadialGradientBrush.RelativeTransform>

                                   <TransformGroup>

                                       <ScaleTransform CenterX="0.5"

                                                       CenterY="0.5"

                                                       ScaleX="1.5"

                                                       ScaleY="1.5" />

                                       <SkewTransform AngleX="0"

                                                      AngleY="0"

                                                      CenterX="0.5"

                                                      CenterY="0.5" />

                                       <RotateTransform Angle="0"

                                                        CenterX="0.5"

                                                        CenterY="0.5" />

                                       <TranslateTransform X="0"

                                                           Y="0.5" />

                                   </TransformGroup>

                               </RadialGradientBrush.RelativeTransform>

                               <GradientStop Offset="0"

                                             Color="#7FFFFFFF" />

                               <GradientStop Offset="1"

                                             Color="#00FFFFFF" />

                           </RadialGradientBrush>

                           <RadialGradientBrush x:Key="pressedBorder">

                               <GradientStop Offset="1"

                                             Color="#65000000" />

                               <GradientStop Offset="0.5"

                                             Color="#20000000" />

                           </RadialGradientBrush>

                           <LinearGradientBrush x:Key="blackBorderBrush"

                                                StartPoint="0,0.5"

                                                EndPoint="1,0.5">

                               <GradientStop Offset="0.65"

                                             Color="#FF000000" />

                               <GradientStop Offset="1"

                                             Color="#19000000" />

                           </LinearGradientBrush>

                           <Style x:Key="3Dscroll"

                                  TargetType="{x:Type ScrollBar}">

                               <Setter Property="Stylus.IsFlicksEnabled"

                                       Value="false" />

                               <Setter Property="Focusable"

                                       Value="False" />

                               <Setter Property="Foreground"

                                       Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />

                               <Setter Property="Template">

                                   <Setter.Value>

                                       <ControlTemplate TargetType="{x:Type ScrollBar}"ControlTerm>

                                           <Grid x:Name="GridRoot"

                                                 Width="24">

                                               <Grid.RowDefinitions>

                                                   <RowDefinition MaxHeight="24" />

                                                   <RowDefinition Height="0.00001*" />

                                                   <RowDefinition MaxHeight="24" />

                                               </Grid.RowDefinitions>

                                               <Border Grid.RowSpan="3"

                                                       Background="#7F6F6F6F"

                                                       CornerRadius="12,12,12,12" />

                                               <RepeatButton x:Name="DecreaseRepeat"

                                                             Focusable="False"

                                                             Style="{DynamicResource 3DdecreaseRepeatButton}"

                                                             Command="ScrollBar.LineUpCommand">

                                                   <Grid>

                                                       <Path x:Name="DecreaseArrow"

                                                             Data="M -0.455,5.739 C-0.455,5.739 3.809,-0.739 3.809,-0.739 3.809,-0.739 8.455,5.739 8.455,5.739 8.455,5.739 -0.455,5.739 -0.455,5.739 z"

                                                             Fill="#FFFFFFFF" />

                                                   </Grid>

                                               </RepeatButton>

                                               <!-- Track is a special layout container which sizes the thumb and the repeat button which do jump scrolling either side of it -->

                                               <!-- ViewPortSize set to NAN to disable the thumb autosizing-->

                                               <Track x:Name="PART_Track"

                                                      Grid.Row="1"

                                                      Orientation="Vertical"

                                                      ViewportSize="NaN"

                                                      IsDirectionReversed="true">

                                                   <Track.Thumb>

                                                       <Thumb Style="{DynamicResource 3Dthumb}"

                                                              MinHeight="24"/>

                                                   </Track.Thumb>

                                                   <Track.IncreaseRepeatButton>

                                                       <RepeatButton x:Name="PageUp"

                                                                     Focusable="False"

                                                                     Style="{DynamicResource 3DincreaseScrollRepeatButton}"

                                                                     Command="ScrollBar.PageDownCommand" />

                                                   </Track.IncreaseRepeatButton>

                                                   <Track.DecreaseRepeatButton>

                                                       <RepeatButton x:Name="PageDown"

                                                                     Focusable="False"

                                                                     Style="{DynamicResource 3DdecreaseScollRepeatButton}"

                                                                     Command="ScrollBar.PageUpCommand" />

                                                   </Track.DecreaseRepeatButton>

                                               </Track>

                                               <RepeatButton x:Name="IncreaseRepeat"

                                                             Grid.Row="2"

                                                             Focusable="False"

                                                             Style="{DynamicResource 3DincreaseRepeatButton}"

                                                             Command="ScrollBar.LineDownCommand">

                                                   <Grid>

                                                       <Path x:Name="IncreaseArrow"

                                                             Data="M 8.455,-0.739 C8.455,-0.739 4.190,5.739 4.190,5.739 4.190,5.739 -0.455,-0.739 -0.455,-0.739 -0.455,-0.739 8.455,-0.739 8.455,-0.739 z"

                                                             Fill="#FFFFFFFF" />

                                                   </Grid>

                                               </RepeatButton>

                                           </Grid>

                                           <ControlTemplate.Triggers>

                                               <Trigger Property="Orientation"

                                                        Value="Horizontal">

                                                   <Setter Property="LayoutTransform"

                                                           TargetName="GridRoot">

                                                       <Setter.Value>

                                                           <RotateTransform Angle="-90" />

                                                       </Setter.Value>

                                                   </Setter>

                                                   <Setter TargetName="PART_Track"

                                                           Property="Orientation"

                                                           Value="Vertical" />

                                                   <Setter Property="Command"

                                                           Value="ScrollBar.LineLeftCommand"

                                                           TargetName="DecreaseRepeat" />

                                                   <Setter Property="Command"

                                                           Value="ScrollBar.LineRightCommand"

                                                           TargetName="IncreaseRepeat" />

                                                   <Setter Property="Command"

                                                           Value="ScrollBar.PageLeftCommand"

                                                           TargetName="PageDown" />

                                                   <Setter Property="Command"

                                                           Value="ScrollBar.PageRightCommand"

                                                           TargetName="PageUp" />

                                               </Trigger>

                                           </ControlTemplate.Triggers>

                                       </ControlTemplate>

                                   </Setter.Value>

                               </Setter>

                           </Style>

                           <Style x:Key="3DdecreaseRepeatButton"

                                  TargetType="{x:Type RepeatButton}">

                               <Setter Property="Focusable"

                                       Value="False" />

                               <Setter Property="Template">

                                   <Setter.Value>

                                       <ControlTemplate TargetType="{x:Type RepeatButton}">

                                           <Grid>

                                               <Grid.RowDefinitions>

                                                   <RowDefinition Height="0.457*" />

                                                   <RowDefinition Height="0.543*" />

                                               </Grid.RowDefinitions>

                                               <Grid.ColumnDefinitions>

                                                   <ColumnDefinition Width="0.5*" />

                                                   <ColumnDefinition Width="0.5*" />

                                               </Grid.ColumnDefinitions>

                                               <Border x:Name="backgroundActiveColor"

                                                       Grid.ColumnSpan="2"

                                                       Grid.RowSpan="2"

                                                       Margin="1,1,1,1"

                                                       Background="{DynamicResource ActiveColor}"

                                                       CornerRadius="12,12,8,8" />

                                               <Border x:Name="overBorder"

                                                       Grid.ColumnSpan="2"

                                                       Grid.RowSpan="2"

                                                       Background="#FFFFFFFF"

                                                       CornerRadius="12,12,8,8"

                                                       Opacity="0" />

                                               <Border x:Name="pressedBorder"

                                                       Grid.ColumnSpan="2"

                                                       Grid.RowSpan="2"

                                                       Background="{StaticResource pressedBorder}"

                                                       CornerRadius="12,12,8,8"

                                                       Opacity="0" />

                                               <Border x:Name="blackBorder"

                                                       Grid.ColumnSpan="2"

                                                       Grid.RowSpan="2"

                                                       Background="{DynamicResource blackBorderBackground}"

                                                       BorderBrush="{DynamicResource blackBorderBrush}"

                                                       BorderThickness="1,1,1,1"

                                                       CornerRadius="12,12,8,8" />

                                               <Border x:Name="whiteInnerBorder"

                                                       Grid.ColumnSpan="2"

                                                       Grid.RowSpan="2"

                                                       Margin="1,1,1,1"

                                                       BorderBrush="{DynamicResource whiteInnerBorder}"

                                                       BorderThickness="2,1,1,1"

                                                       CornerRadius="12,12,8,8" />

                                               <ContentPresenter x:Name="ContentPresenter"

                                                                 Grid.ColumnSpan="2"

                                                                 Grid.RowSpan="2"

                                                                 HorizontalAlignment="Center"

                                                                 VerticalAlignment="Center"

                                                                 Content="{TemplateBinding Content}"

                                                                 ContentTemplate="{TemplateBinding ContentTemplate}"

                                                                 ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"

                                                                 Opacity="0.5" />

                                           </Grid>

                                           <ControlTemplate.Triggers>

                                               <Trigger Property="IsKeyboardFocused"

                                                        Value="true" />

                                               <Trigger Property="IsMouseOver"

                                                        Value="true">

                                                   <Trigger.ExitActions>

                                                       <BeginStoryboard x:Name="mouseOver_Leave_BeginStoryboard"

                                                                        Storyboard="{StaticResource mouseOver_Leave}" />

                                                   </Trigger.ExitActions>

                                                   <Trigger.EnterActions>

                                                       <BeginStoryboard Storyboard="{StaticResource mouseOver}" />

                                                   </Trigger.EnterActions>

                                               </Trigger>

                                               <Trigger Property="IsPressed"

                                                        Value="true">

                                                   <Setter TargetName="pressedBorder"

                                                           Property="Opacity"

                                                           Value="0.75" />

                                               </Trigger>

                                               <Trigger Property="IsEnabled"

                                                        Value="false" />

                                           </ControlTemplate.Triggers>

                                       </ControlTemplate>

                                   </Setter.Value>

                               </Setter>

                           </Style>

                           <Style x:Key="3DincreaseRepeatButton"

                                  TargetType="{x:Type RepeatButton}">

                               <Setter Property="Focusable"

                                       Value="False" />

                               <Setter Property="Template">

                                   <Setter.Value>

                                       <ControlTemplate TargetType="{x:Type RepeatButton}">

                                           <Grid>

                                               <Grid.RowDefinitions>

                                                   <RowDefinition Height="0.457*" />

                                                   <RowDefinition Height="0.543*" />

                                               </Grid.RowDefinitions>

                                               <Grid.ColumnDefinitions>

                                                   <ColumnDefinition Width="0.5*" />

                                                   <ColumnDefinition Width="0.5*" />

                                               </Grid.ColumnDefinitions>

                                               <Border x:Name="backgroundActiveColor"

                                                       Grid.ColumnSpan="2"

                                                       Grid.RowSpan="2"

                                                       Margin="1,1,1,1"

                                                       Background="{DynamicResource ActiveColor}"

                                                       CornerRadius="8,8,12,12" />

                                               <Border x:Name="overBorder"

                                                       Grid.ColumnSpan="2"

                                                       Grid.RowSpan="2"

                                                       Background="#FFFFFFFF"

                                                       CornerRadius="8,8,12,12"

                                                       Opacity="0" />

                                               <Border x:Name="pressedBorder"

                                                       Grid.ColumnSpan="2"

                                                       Grid.RowSpan="2"

                                                       Background="{StaticResource pressedBorder}"

                                                       CornerRadius="8,8,12,12"

                                                       Opacity="0" />

                                               <Border x:Name="blackBorder"

                                                       Grid.ColumnSpan="2"

                                                       Grid.RowSpan="2"

                                                       Background="{DynamicResource blackBorderBackground}"

                                                       BorderBrush="{DynamicResource blackBorderBrush}"

                                                       BorderThickness="1,1,1,1"

                                                       CornerRadius="8,8,12,12" />

                                               <Border x:Name="whiteInnerBorder"

                                                       Grid.ColumnSpan="2"

                                                       Grid.RowSpan="2"

                                                       Margin="1,1,1,1"

                                                       BorderBrush="{DynamicResource whiteInnerBorder}"

                                                       BorderThickness="2,1,1,1"

                                                       CornerRadius="8,8,12,12" />

                                               <ContentPresenter x:Name="ContentPresenter"

                                                                 Grid.ColumnSpan="2"

                                                                 Grid.RowSpan="2"

                                                                 HorizontalAlignment="Center"

                                                                 VerticalAlignment="Center"

                                                                 Content="{TemplateBinding Content}"

                                                                 ContentTemplate="{TemplateBinding ContentTemplate}"

                                                                 ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"

                                                                 Opacity="0.5" />

                                           </Grid>

                                           <ControlTemplate.Triggers>

                                               <Trigger Property="IsKeyboardFocused"

                                                        Value="true" />

                                               <Trigger Property="IsMouseOver"

                                                        Value="true">

                                                   <Trigger.ExitActions>

                                                       <BeginStoryboard x:Name="mouseOver_Leave_BeginStoryboard"

                                                                        Storyboard="{StaticResource mouseOver_Leave}" />

                                                   </Trigger.ExitActions>

                                                   <Trigger.EnterActions>

                                                       <BeginStoryboard Storyboard="{StaticResource mouseOver}" />

                                                   </Trigger.EnterActions>

                                               </Trigger>

                                               <Trigger Property="IsPressed"

                                                        Value="true">

                                                   <Setter TargetName="pressedBorder"

                                                           Property="Opacity"

                                                           Value="0.75" />

                                               </Trigger>

                                               <Trigger Property="IsEnabled"

                                                        Value="false" />

                                           </ControlTemplate.Triggers>

                                       </ControlTemplate>

                                   </Setter.Value>

                               </Setter>

                           </Style>

                           <Style x:Key="3DdecreaseScollRepeatButton"

                                  TargetType="{x:Type RepeatButton}">

                               <Setter Property="IsTabStop"

                                       Value="False" />

                               <Setter Property="Focusable"

                                       Value="False" />

                               <Setter Property="Template">

                                   <Setter.Value>

                                       <ControlTemplate TargetType="{x:Type RepeatButton}">

                                           <Grid>

                                               <Rectangle Fill="#00000000"

                                                          StrokeThickness="{TemplateBinding BorderThickness}" />

                                           </Grid>

                                       </ControlTemplate>

                                   </Setter.Value>

                               </Setter>

                           </Style>

                           <Style x:Key="3DincreaseScrollRepeatButton"

                                  TargetType="{x:Type RepeatButton}">

                               <Setter Property="IsTabStop"

                                       Value="false" />

                               <Setter Property="Focusable"

                                       Value="false" />

                               <Setter Property="Template">

                                   <Setter.Value>

                                       <ControlTemplate TargetType="{x:Type RepeatButton}">

                                           <Grid>

                                               <Rectangle Fill="#00000000"

                                                          StrokeThickness="{TemplateBinding BorderThickness}" />

                                           </Grid>

                                       </ControlTemplate>

                                   </Setter.Value>

                               </Setter>

                           </Style>

                           <Style x:Key="3Dthumb"

                                  TargetType="{x:Type Thumb}">

                               <Setter Property="Template">

                                   <Setter.Value>

                                       <ControlTemplate TargetType="{x:Type Thumb}">

                                           <Grid x:Name="Grid">

                                               <Grid.ColumnDefinitions>

                                                   <ColumnDefinition Width="0.5*" />

                                                   <ColumnDefinition Width="0.5*" />

                                               </Grid.ColumnDefinitions>

                                               <Border x:Name="backgroundActiveColor"

                                                       Grid.ColumnSpan="2"

                                                       Margin="1,1,1,1"

                                                       Background="{DynamicResource ActiveColor}"

                                                       CornerRadius="8,8,8,8" />

                                               <Border x:Name="overBorder"

                                                       Grid.ColumnSpan="2"

                                                       Background="#FFFFFFFF"

                                                       CornerRadius="8,8,8,8"

                                                       Opacity="0" />

                                               <Border x:Name="pressedBorder"

                                                       Grid.ColumnSpan="2"

                                                       Background="{StaticResource pressedBorder}"

                                                       CornerRadius="8,8,8,8"

                                                       Opacity="0" />

                                               <Border x:Name="blackBorder"

                                                       Grid.ColumnSpan="2"

                                                       BorderBrush="{DynamicResource blackBorderBrush}"

                                                       BorderThickness="1,1,1,1"

                                                       CornerRadius="8,8,8,8" />

                                               <Border x:Name="whiteInnerBorder"

                                                       Grid.ColumnSpan="2"

                                                       Margin="1,1,1,1"

                                                       BorderBrush="{DynamicResource whiteInnerBorder}"

                                                       BorderThickness="2,1,1,1"

                                                       CornerRadius="8,8,8,8" />

                                               <Border x:Name="ContentPresenter"

                                                       Grid.ColumnSpan="2"

                                                       CornerRadius="8,8,8,8"

                                                       Opacity="0.5" />

                                           </Grid>

                                           <ControlTemplate.Triggers>

                                               <Trigger Property="IsFocused"

                                                        Value="True" />

                                               <Trigger Property="IsMouseOver"

                                                        Value="true">

                                                   <Trigger.ExitActions>

                                                       <BeginStoryboard x:Name="mouseOver_Leave_BeginStoryboard"

                                                                        Storyboard="{StaticResource mouseOver_Leave}" />

                                                   </Trigger.ExitActions>

                                                   <Trigger.EnterActions>

                                                       <BeginStoryboard Storyboard="{StaticResource mouseOver}" />

                                                   </Trigger.EnterActions>

                                               </Trigger>

                                               <Trigger Property="IsEnabled"

                                                        Value="False" />

                                               <Trigger Property="IsDragging"

                                                        Value="True" />

                                           </ControlTemplate.Triggers>

                                       </ControlTemplate>

                                   </Setter.Value>

                               </Setter>

                           </Style>

                           <Style x:Key="buttonFlip"

                                  TargetType="{x:Type Button}"

                                  BasedOn="{x:Null}">

                               <Setter Property="Template">

                                   <Setter.Value>

                                       <ControlTemplate TargetType="{x:Type Button}">

                                           <Grid x:Name="Grid">

                                               <Border x:Name="backgroundActiveColor"

                                                       CornerRadius="20,20,20,20"

                                                       Margin="1,1,1,1"

                                                       Opacity="1">

                                                   <Border.Background>

                                                       <LinearGradientBrush EndPoint="0.5,0.939"

                                                                            StartPoint="0.5,0.03">

                                                           <GradientStop Color="#FF7A7A7A"

                                                                         Offset="1" />

                                                           <GradientStop Color="#FF787878"

                                                                         Offset="0.5" />

                                                           <GradientStop Color="#FF6C6C6C"

                                                                         Offset="0.5" />

                                                           <GradientStop Color="#FF919191"

                                                                         Offset="0" />

                                                       </LinearGradientBrush>

                                                   </Border.Background>

                                               </Border>

                                               <Border x:Name="overBorder"

                                                       CornerRadius="20,20,20,20"

                                                       Opacity="0"

                                                       Background="#FFFFFFFF"

                                                       Visibility="Visible" />

                                               <Border x:Name="pressedBorder"

                                                       CornerRadius="20,20,20,20"

                                                       Opacity="0"

                                                       Background="{StaticResource pressedBorder}" />

                                               <Border x:Name="blackBorder"

                                                       BorderThickness="1,1,1,1"

                                                       CornerRadius="20,20,20,20">

                                                   <Border.Background>

                                                       <RadialGradientBrush GradientOrigin="0.5,0.114">

                                                           <RadialGradientBrush.RelativeTransform>

                                                               <TransformGroup>

                                                                   <ScaleTransform CenterX="0.5"

                                                                                   CenterY="0.5"

                                                                                   ScaleX="1"

                                                                                   ScaleY="1.172" />

                                                                   <SkewTransform AngleX="0"

                                                                                  AngleY="0"

                                                                                  CenterX="0.5"

                                                                                  CenterY="0.5" />

                                                                   <RotateTransform Angle="0"

                                                                                    CenterX="0.5"

                                                                                    CenterY="0.5" />

                                                                   <TranslateTransform X="0"

                                                                                       Y="-0.086" />

                                                               </TransformGroup>

                                                           </RadialGradientBrush.RelativeTransform>

                                                           <GradientStop Color="#7FFFFFFF"

                                                                         Offset="0" />

                                                           <GradientStop Color="#00FFFFFF"

                                                                         Offset="1" />

                                                       </RadialGradientBrush>

                                                   </Border.Background>

                                                   <Border.BorderBrush>

                                                       <LinearGradientBrush EndPoint="0.5,0"

                                                                            StartPoint="0.5,1">

                                                           <GradientStop Color="#FF000000"

                                                                         Offset="0.65" />

                                                           <GradientStop Color="#19000000"

                                                                         Offset="1" />

                                                       </LinearGradientBrush>

                                                   </Border.BorderBrush>

                                               </Border>

                                               <Border x:Name="whiteInnerBorder"

                                                       BorderThickness="1,1,1,2"

                                                       CornerRadius="20,20,20,20"

                                                       Margin="1,1,1,1"

                                                       BorderBrush="{DynamicResource whiteInnerBorder}" />

                                               <ContentPresenter x:Name="ContentPresenter"

                                                                 HorizontalAlignment="Center"

                                                                 VerticalAlignment="Center"

                                                                 Content="{TemplateBinding Content}"

                                                                 ContentTemplate="{TemplateBinding ContentTemplate}"

                                                                 ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"

                                                                 Opacity="0.5" />

                                           </Grid>

                                           <ControlTemplate.Triggers>

                                               <Trigger Property="IsMouseOver"

                                                        Value="true">

                                                   <Trigger.ExitActions>

                                                       <BeginStoryboard Storyboard="{StaticResource mouseOver_Leave}"

                                                                        x:Name="mouseOver_Leave_BeginStoryboard" />

                                                   </Trigger.ExitActions>

                                                   <Trigger.EnterActions>

                                                       <BeginStoryboard Storyboard="{StaticResource mouseOver}" />

                                                   </Trigger.EnterActions>

                                               </Trigger>

                                               <Trigger Property="IsPressed"

                                                        Value="true">

                                                   <Setter Property="Opacity"

                                                           TargetName="pressedBorder"

                                                           Value="0.75" />

                                               </Trigger>

                                               <Trigger Property="IsEnabled"

                                                        Value="true" />

                                               <Trigger Property="IsEnabled"

                                                        Value="false">

                                               </Trigger>

                                           </ControlTemplate.Triggers>

                                       </ControlTemplate>

                                   </Setter.Value>

                               </Setter>

                           </Style>

                           <Style x:Key="3DscrollViewer"

                                  TargetType="{x:Type ScrollViewer}"

                                  BasedOn="{x:Null}">

                               <Setter Property="Template">

                                   <Setter.Value>

                                       <ControlTemplate TargetType="{x:Type ScrollViewer}">

                                           <Grid Background="{TemplateBinding Background}">

                                               <Grid.ColumnDefinitions>

                                                   <ColumnDefinition Width="*" />

                                                   <ColumnDefinition Width="Auto" />

                                               </Grid.ColumnDefinitions>

                                               <Grid.RowDefinitions>

                                                   <RowDefinition Height="*" />

                                                   <RowDefinition Height="Auto" />

                                               </Grid.RowDefinitions>

                                               <ScrollContentPresenter Grid.Column="0"

                                                                       Grid.Row="0"

                                                                       Margin="{TemplateBinding Padding}"

                                                                       Content="{TemplateBinding Content}"

                                                                       ContentTemplate="{TemplateBinding ContentTemplate}"

                                                                       CanContentScroll="{TemplateBinding CanContentScroll}" />

                                               <!-- The visibility of the ScrollBars is controlled by the implementation fo the control -->

                                               <ScrollBar Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"

                                                          Grid.Column="0"

                                                          Grid.Row="1"

                                                          x:Name="PART_HorizontalScrollBar"

                                                          Style="{DynamicResource 3Dscroll}"

                                                          Orientation="Horizontal"

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

                                                          ViewportSize="{TemplateBinding ViewportWidth}"

                                                          Minimum="0"

                                                          Maximum="{TemplateBinding ScrollableWidth}"

                                                          AutomationProperties.AutomationId="HorizontalScrollBar" />

                                               <ScrollBar Grid.Column="1"

                                                          Grid.Row="0"

                                                          x:Name="PART_VerticalScrollBar"

                                                          Style="{DynamicResource 3Dscroll}"

                                                          Orientation="Vertical"

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

                                                          ViewportSize="{TemplateBinding ViewportHeight}"

                                                          Minimum="0"

                                                          Maximum="{TemplateBinding ScrollableHeight}"

                                                          AutomationProperties.AutomationId="VerticalScrollBar" />

                                           </Grid>

                                       </ControlTemplate>

                                   </Setter.Value>

                               </Setter>

                           </Style>

                       </Grid.Resources>

                       <Grid.ColumnDefinitions>

                           <ColumnDefinition Width="0.75*" />

                           <!--Horizontal Scrollbar-->

                           <ColumnDefinition Width="8.5*" />

                           <ColumnDefinition Width="0.75*" />

                       </Grid.ColumnDefinitions>

                       <Grid.RowDefinitions>

                           <RowDefinition Height="9*" />

                           <!--Margin for the Scrollbar-->

                           <RowDefinition Height="1*" />

                       </Grid.RowDefinitions>

                       <!-- Content -->

                       <Grid Margin="{TemplateBinding Padding}"

                             Grid.Row="0"

                             Grid.RowSpan="2"

                             Grid.Column="0"

                             Grid.ColumnSpan="3">

                           <Grid.RowDefinitions>

                               <!-- Fixed Headers -->

                               <RowDefinition Height="Auto" />

                               <!-- ScrollContentPresenter -->

                               <RowDefinition />

                               <!-- Fixed Footers -->

                               <RowDefinition Height="Auto" />

                           </Grid.RowDefinitions>

                           <!-- Fixed Headers -->

                           <StackPanel Grid.Row="0"

                                       xcdg:DataGridControl.IsFixedHeadersHost="True"

                                       Orientation="Vertical" />

                           <!-- Fixed Footers -->

                           <StackPanel Grid.Row="2"

                                       xcdg:DataGridControl.IsFixedFootersHost="True"

                                       Orientation="Vertical" />

                           <!-- ScrollContentPresenter (data rows) -->

                           <ScrollContentPresenter Grid.Row="1"

                                                   CanContentScroll="{TemplateBinding CanContentScroll}" />

                       </Grid>

                       <!-- ScrollBars -->

                       <ScrollBar x:Name="PART_HorizontalScrollBar"

                                  Grid.Column="1"

                                  Height="24"

                                  Grid.ColumnSpan="1"

                                  Grid.Row="1"

                                  VerticalAlignment="Center"

                                  Orientation="Horizontal"

                                  Style="{StaticResource 3Dscroll}"

                                  Maximum="{TemplateBinding ScrollViewer.ScrollableWidth}"

                                  Value="{TemplateBinding ScrollViewer.HorizontalOffset}"

                                  ViewportSize="{TemplateBinding ScrollViewer.ViewportWidth}"

                                  Visibility="{TemplateBinding ScrollViewer.ComputedHorizontalScrollBarVisibility}"/>

                       <!-- ScrollTip only displayed when scrolling -->

                       <xcdg:ScrollTip Visibility="Hidden"

                                       Content="{x:Null}"

                                       ContentTemplate="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:DataGridControl.DataGridContext).ScrollTipContentTemplate}"

                                       ContentTemplateSelector="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:DataGridControl.DataGridContext).ScrollTipContentTemplateSelector}" />



                   </Grid>

               </ControlTemplate>

           </Setter.Value>

       </Setter>

   </Style>

  <!--**************************

   * Style: FlipButton

   ************************** -->

   <Style x:Key="flipButton"

          BasedOn="{x:Null}"

          TargetType="{x:Type Button}">

       

       <Style.Resources>

           <Storyboard x:Key="mouseOver">

               <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"

                                              Storyboard.TargetName="overBorder"

                                              Storyboard.TargetProperty="(UIElement.Opacity)">

                   <SplineDoubleKeyFrame KeyTime="00:00:00.400"

                                         Value="0.3" />

               </DoubleAnimationUsingKeyFrames>

               <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"

                                              Storyboard.TargetName="ContentPresenter"

                                              Storyboard.TargetProperty="(UIElement.Opacity)">

                   <SplineDoubleKeyFrame KeyTime="00:00:00.400"

                                         Value="1" />

               </DoubleAnimationUsingKeyFrames>

           </Storyboard>

           <Storyboard x:Key="mouseOver_Leave">

               <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"

                                              Storyboard.TargetName="overBorder"

                                              Storyboard.TargetProperty="(UIElement.Opacity)">

                   <SplineDoubleKeyFrame KeyTime="00:00:00.400"

                                         Value="0" />

               </DoubleAnimationUsingKeyFrames>

               <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"

                                              Storyboard.TargetName="ContentPresenter"

                                              Storyboard.TargetProperty="(UIElement.Opacity)">

                   <SplineDoubleKeyFrame KeyTime="00:00:00.400"

                                         Value="0.5" />

               </DoubleAnimationUsingKeyFrames>

           </Storyboard>

       </Style.Resources>

       <Setter Property="Template">            

               <Setter.Value>

                   <ControlTemplate TargetType="{x:Type Button}">

                       <Grid Width="24"

                             Height="24">

                           <Border x:Name="backgroundActiveColor"

                                   CornerRadius="2,2,2,2"

                                   Margin="1,1,1,1"

                                   Opacity="1">

                               <Border.Background>

                                   <LinearGradientBrush EndPoint="0.5,1"

                                                        StartPoint="0.5,0">

                                       <GradientStop Color="#FF7A7A7A"

                                                     Offset="1" />

                                       <GradientStop Color="#FF787878"

                                                     Offset="0.5" />

                                       <GradientStop Color="#FF6C6C6C"

                                                     Offset="0.5" />

                                       <GradientStop Color="#FF919191"

                                                     Offset="0" />

                                   </LinearGradientBrush>

                               </Border.Background>

                           </Border>

                           <Border x:Name="overBorder"

                                   CornerRadius="2,2,2,2"

                                   Opacity="0"

                                   Background="#FFFFFFFF" />

                           <Border x:Name="pressedBorder"

                                   CornerRadius="2,2,2,2"

                                   Opacity="0">

                               <Border.Background>

                                   <RadialGradientBrush>

                                       <GradientStop Offset="1"

                                                     Color="#65000000" />

                                       <GradientStop Offset="0.5"

                                                     Color="#20000000" />

                                   </RadialGradientBrush>

                               </Border.Background>

                           </Border>

                           <Border x:Name="blackBorder"

                                   BorderThickness="1,1,1,1"

                                   CornerRadius="2,2,2,2">

                               <Border.BorderBrush>

                                   <LinearGradientBrush EndPoint="0.5,0"

                                                        StartPoint="0.5,1">

                                       <GradientStop Color="#FF000000"

                                                     Offset="0.65" />

                                       <GradientStop Color="#19000000"

                                                     Offset="1" />

                                   </LinearGradientBrush>

                               </Border.BorderBrush>

                               <Border.Background>

                                   <RadialGradientBrush GradientOrigin="0.5,0">

                                       <RadialGradientBrush.RelativeTransform>

                                           <TransformGroup>

                                               <ScaleTransform CenterX="0.5"

                                                               CenterY="0.5"

                                                               ScaleX="1"

                                                               ScaleY="1.172" />

                                               <SkewTransform AngleX="0"

                                                              AngleY="0"

                                                              CenterX="0.5"

                                                              CenterY="0.5" />

                                               <RotateTransform Angle="0"

                                                                CenterX="0.5"

                                                                CenterY="0.5" />

                                               <TranslateTransform X="0"

                                                                   Y="-0.086" />

                                           </TransformGroup>

                                       </RadialGradientBrush.RelativeTransform>

                                       <GradientStop Color="#7FFFFFFF"

                                                     Offset="0" />

                                       <GradientStop Color="#00FFFFFF"

                                                     Offset="1" />

                                   </RadialGradientBrush>

                               </Border.Background>

                           </Border>

                           <Border x:Name="whiteInnerBorder"

                                   BorderThickness="1,1,1,2"

                                   CornerRadius="2,2,2,2"

                                   Margin="1,1,1,1">

                               <Border.BorderBrush>

                                   <LinearGradientBrush StartPoint="0,0.5"

                                                        EndPoint="1,0.5">

                                       <GradientStop Offset="0"

                                                     Color="#99FFFFFF" />

                                       <GradientStop Offset="1"

                                                     Color="#4CFFFFFF" />

                                   </LinearGradientBrush>

                               </Border.BorderBrush>

                           </Border>

                           <ContentPresenter x:Name="ContentPresenter"

                                             HorizontalAlignment="Stretch"

                                             VerticalAlignment="Stretch"

                                             ContentTemplate="{TemplateBinding ContentTemplate}"

                                             ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"

                                             Opacity="0.5" />

                           <Grid Width="42"

                                 Margin="-8.75,4.549,-9.25,4.284">

                               <Path Margin="0.416,-0.297,0,0"

                                     HorizontalAlignment="Left"

                                     VerticalAlignment="Top"

                                     Height="15.448"

                                     Width="42.164"

                                     Stretch="Fill"

                                     Opacity="1"

                                     Data="M33.916248,5.5419566 C33.916248,5.5419566 31.499423,9.2918234 21.35576,9.3949428 10.415512,9.3949428 3.2491787,5.2006449 7.2708353,2.625 7.9802786,2.1769357 8.3328888,2.2918856 9.4271942,1.7193402 9.6668506,1.5939509 9.5967223,0.64891378 9.6458343,0.25 6.6500152,0.049102783 4.4987094,0.75491987 2.8821322,1.7200383 -3.5004525,5.6255447 2.4160443,15.291886 21.644373,15.127249 30.749436,15.541474 37.749648,9.8751151 37.749648,9.8751151 37.749648,9.8751151 40.082996,12.541652&#xa;40.082996,12.541652 40.082996,12.541652 42.582934,-0.29846676 42.582934,-0.29846676 42.582934,-0.29846676 32.208375,3.7499924 32.208375,3.7499924 32.208375,3.7499924 33.916248,5.5419566 33.916248,5.5419566 z"

                                     Fill="#000000" />

                               <Path Margin="1.299,0.849,0,0"

                                     HorizontalAlignment="Left"

                                     VerticalAlignment="Top"

                                     Height="13.475"

                                     Width="40.117"

                                     Stretch="Fill"

                                     Opacity="1"

                                     Data="M35.401665,5.4433012 C35.401665,5.4433012 32.666835,10.208665 21.345612,10.305517 8.1677185,10.418252 2.764801,5.0616455 6.5949097,2.2254333 7.2904358,1.7103882 8.2709656,1.2586365 9.4459839,0.8765564 6.8409424,0.70187378 4.8756714,1.3862 3.4699707,2.2254333 -2.7467346,5.9369202 4.7501178,14.334216 21.335669,14.334216 32.416831,14.334216 37.856682,8.5233183 37.856682,8.5233183 37.856682,8.5233183 39.60418,10.895816 39.60418,10.895816 39.60418,10.895816 41.417004,1.0345776&#xa;41.417004,1.0345776 41.417004,1.0345776 33.91668,4.0833158 33.91668,4.0833158 33.91668,4.0833158 35.401665,5.4433012 35.401665,5.4433012 z"

                                     Fill="#ffffff" />

                           </Grid>

                       </Grid>

                       <ControlTemplate.Triggers>

                           <Trigger Property="IsMouseOver"

                                    Value="true">

                               <Trigger.ExitActions>

                                   <BeginStoryboard Storyboard="{StaticResource mouseOver_Leave}"

                                                    x:Name="mouseOver_Leave_BeginStoryboard" />

                               </Trigger.ExitActions>

                               <Trigger.EnterActions>

                                   <BeginStoryboard Storyboard="{StaticResource mouseOver}" />

                               </Trigger.EnterActions>

                           </Trigger>

                           <Trigger Property="IsPressed"

                                    Value="true">

                               <Setter Property="Opacity"

                                       TargetName="pressedBorder"

                                       Value="0.75" />

                           </Trigger>

                       </ControlTemplate.Triggers>

                   </ControlTemplate>

               </Setter.Value>

           </Setter>        

   </Style>

</ResourceDictionary>