<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
    xmlns:vw="clr-namespace:FingersDance.Views;assembly=FingersDance.Views"
    xmlns:popup="clr-namespace:FingersDance.Control.Close;assembly=FingersDance.Control.Close"
	xmlns:Custom="http://schemas.microsoft.com/surface/2008" xmlns:Microsoft_Surface_Presentation_Generic="clr-namespace:Microsoft.Surface.Presentation.Generic;assembly=Microsoft.Surface.Presentation.Generic"
	x:Class="FingersDance.Control.TimeLine.UserControlTimeLine"
	x:Name="UserControl"
	d:DesignWidth="383" Background="{x:Null}" d:DesignHeight="33">

    <UserControl.Resources>
        <Style x:Key="FingersDance.Control.Slider" TargetType="{x:Type Custom:SurfaceSlider}">
            <Setter Property="Background" Value="#191B2022"/>
            <Setter Property="BorderBrush" Value="#3F040404"/>
            <Setter Property="Foreground" Value="Black"/>
            <Setter Property="Width" Value="NaN"/>
            <Setter Property="MinWidth" Value="30"/>
            <Setter Property="Height" Value="NaN"/>
            <Setter Property="MinHeight" Value="30"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Custom:SurfaceSlider}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="Touch">
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height" To="19"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
                            </Storyboard>
                            <Storyboard x:Key="Release">
                                <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height"/>
                                <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
                                <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Grid x:Name="GridRoot" VerticalAlignment="Stretch" Height="Auto" SnapsToDevicePixels="True" Background="Transparent">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Canvas ClipToBounds="False">
                                <Label x:Name="PART_SurfaceToolTip">
                                    <Label.Style>
                                        <Style TargetType="{x:Type Label}">
                                            <Setter Property="Template">
                                                <Setter.Value>
                                                    <ControlTemplate TargetType="{x:Type Label}">
                                                        <Grid>
                                                            <Border HorizontalAlignment="Stretch" Margin="0" Width="Auto" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="2">
                                                                <TextBlock Margin="{TemplateBinding Padding}" Background="{x:Null}" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
															</Border>
                                                        </Grid>
                                                    </ControlTemplate>
                                                </Setter.Value>
                                            </Setter>
                                            <Setter Property="Visibility" Value="Collapsed"/>
                                            <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.InfoBrushKey}}"/>
                                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}"/>
                                            <Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}"/>
                                            <Setter Property="Padding" Value="2"/>
                                        </Style>
                                    </Label.Style>
                                </Label>
                            </Canvas>
                            <TickBar x:Name="TopTick" Margin="0,0,0,1" Height="4" Opacity="1" SnapsToDevicePixels="True" Visibility="Collapsed" Grid.Row="0" Fill="{TemplateBinding BorderBrush}" IsDirectionReversed="False" Placement="Top" ReservedSpace="30"/>
                            <TickBar x:Name="BottomTick" Margin="0,1,0,0" Height="4" Opacity="1" SnapsToDevicePixels="True" Visibility="Collapsed" Grid.Row="2" Fill="{TemplateBinding BorderBrush}" Placement="Bottom" ReservedSpace="30"/>
                            <Rectangle x:Name="TrackBkgd" RadiusX="3" RadiusY="3" HorizontalAlignment="Stretch" VerticalAlignment="Center" Width="Auto" Height="3" Opacity="1" SnapsToDevicePixels="True" Grid.Row="1" Fill="#FFF8EDED" Stroke="{x:Null}"/>
                            <Ellipse Fill="White" Stroke="{x:Null}" HorizontalAlignment="Left" Margin="0,10.116,0,10.128" Width="12.078" Grid.Row="1" x:Name="ellipseDebut"/>
                            <Ellipse Fill="White" Stroke="{x:Null}" HorizontalAlignment="Left" Margin="0,10.116,0,10.128" Width="12.078" Grid.Row="1" x:Name="ellipseFin" RenderTransformOrigin="0.5,0.5">
                                <Ellipse.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                                        <SkewTransform AngleX="0" AngleY="0"/>
                                        <RotateTransform Angle="0"/>
                                        <TranslateTransform X="{Binding Path=ActualWidth, ElementName=TrackBkgd, Mode=Default}" Y="0"/>
                                    </TransformGroup>
                                </Ellipse.RenderTransform>
                            </Ellipse>
                            <Border x:Name="Track" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="Auto" Opacity="1" SnapsToDevicePixels="True" Background="Transparent" Grid.Row="1">
                                <Custom:SurfaceTrack x:Name="PART_Track" Grid.Row="1">
                                    <Custom:SurfaceTrack.Thumb>
                                        <Custom:SurfaceThumb x:Name="Thumb" MinHeight="30" MinWidth="30" Width="30" Height="30" Foreground="Black" SnapsToDevicePixels="True" Background="{DynamicResource SliderPlay_xaml}" Margin="-5.072,0,5.048,0" BorderBrush="{x:Null}">
                                            <Custom:SurfaceThumb.Style>
                                                <Style TargetType="{x:Type Custom:SurfaceThumb}">
                                                    <Setter Property="Background" Value="Transparent"/>
                                                    <Setter Property="Custom:ContactVisualizer.Adapter">
                                                        <Setter.Value>
                                                            <Custom:ContactVisualizerRectangleAdapter RadiusX="15" RadiusY="15"/>
                                                        </Setter.Value>
                                                    </Setter>
                                                    <Setter Property="Template">
                                                        <Setter.Value>
                                                            <ControlTemplate TargetType="{x:Type Custom:SurfaceThumb}">
                                                                <ControlTemplate.Resources>
                                                                    <Storyboard x:Key="Press">
                                                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                                                        </DoubleAnimationUsingKeyFrames>
                                                                        <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                            <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                        </ThicknessAnimationUsingKeyFrames>
                                                                        <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                            <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                        </ThicknessAnimationUsingKeyFrames>
                                                                        <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                            <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                        </ThicknessAnimationUsingKeyFrames>
                                                                        <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                            <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                        </ThicknessAnimationUsingKeyFrames>
                                                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                        </DoubleAnimationUsingKeyFrames>
                                                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                        </DoubleAnimationUsingKeyFrames>
                                                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                        </DoubleAnimationUsingKeyFrames>
                                                                    </Storyboard>
                                                                    <Storyboard x:Key="Release">
                                                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                                            <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="0"/>
                                                                        </DoubleAnimationUsingKeyFrames>
                                                                        <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                            <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                            <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="2"/>
                                                                        </ThicknessAnimationUsingKeyFrames>
                                                                        <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                            <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                            <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
                                                                        </ThicknessAnimationUsingKeyFrames>
                                                                        <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                            <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                            <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
                                                                        </ThicknessAnimationUsingKeyFrames>
                                                                        <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                            <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                            <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="6"/>
                                                                        </ThicknessAnimationUsingKeyFrames>
                                                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
                                                                        </DoubleAnimationUsingKeyFrames>
                                                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
                                                                        </DoubleAnimationUsingKeyFrames>
                                                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
                                                                        </DoubleAnimationUsingKeyFrames>
                                                                    </Storyboard>
                                                                </ControlTemplate.Resources>
                                                                <Grid x:Name="Grid" Margin="1" SnapsToDevicePixels="True" Background="Transparent">
                                                                    <Rectangle x:Name="Base" Fill="{TemplateBinding Background}" Stroke="{x:Null}" StrokeThickness="0" RadiusX="15" RadiusY="15" HorizontalAlignment="Stretch" Margin="5" VerticalAlignment="Stretch" Width="Auto" Height="Auto" SnapsToDevicePixels="True"/>
                                                                    <Rectangle x:Name="Button" Fill="{x:Null}" RadiusX="15" RadiusY="15" HorizontalAlignment="Stretch" Margin="5" VerticalAlignment="Stretch" Width="Auto" Height="Auto" SnapsToDevicePixels="True" Stroke="{x:Null}"/>
                                                                    <Rectangle x:Name="RenderOverlay" StrokeThickness="1" RadiusX="15" RadiusY="15" HorizontalAlignment="Stretch" Margin="6" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Opacity="1" SnapsToDevicePixels="True" Fill="{x:Null}" Stroke="{x:Null}"/>
                                                                    <Microsoft_Surface_Presentation_Generic:SurfaceShadowChrome x:Name="GlowBorder" HorizontalAlignment="Stretch" Margin="2" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Opacity="0" Color="White" CornerRadius="{Binding ActualHeight, ElementName=GlowBorder}"/>
                                                                    <Rectangle x:Name="Contact" Fill="Transparent" Stroke="{x:Null}"/>
                                                                </Grid>
                                                                <ControlTemplate.Triggers>
                                                                    <Trigger Property="IsFocused" Value="True"/>
                                                                    <Trigger Property="IsEnabled" Value="False">
                                                                        <Setter Property="Fill" TargetName="Button" Value="#00000000"/>
                                                                        <Setter Property="Fill" TargetName="RenderOverlay" Value="#00000000"/>
                                                                        <Setter Property="Stroke" TargetName="Button" Value="#33000000"/>
                                                                        <Setter Property="Opacity" TargetName="RenderOverlay" Value="0.5"/>
                                                                    </Trigger>
                                                                    <Trigger Property="IsDragging" Value="True">
                                                                        <Trigger.EnterActions>
                                                                            <BeginStoryboard>
                                                                                <Storyboard>
                                                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                        <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                                                                    </DoubleAnimationUsingKeyFrames>
                                                                                    <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                        <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                    </ThicknessAnimationUsingKeyFrames>
                                                                                    <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                        <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                    </ThicknessAnimationUsingKeyFrames>
                                                                                    <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                        <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                    </ThicknessAnimationUsingKeyFrames>
                                                                                    <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                        <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                    </ThicknessAnimationUsingKeyFrames>
                                                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                        <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                    </DoubleAnimationUsingKeyFrames>
                                                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                        <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                    </DoubleAnimationUsingKeyFrames>
                                                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                        <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                    </DoubleAnimationUsingKeyFrames>
                                                                                </Storyboard>
                                                                            </BeginStoryboard>
                                                                        </Trigger.EnterActions>
                                                                        <Trigger.ExitActions>
                                                                            <BeginStoryboard>
                                                                                <Storyboard>
                                                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                        <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                                                        <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="0"/>
                                                                                    </DoubleAnimationUsingKeyFrames>
                                                                                    <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                        <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                        <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="2"/>
                                                                                    </ThicknessAnimationUsingKeyFrames>
                                                                                    <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                        <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                        <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
                                                                                    </ThicknessAnimationUsingKeyFrames>
                                                                                    <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                        <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                        <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
                                                                                    </ThicknessAnimationUsingKeyFrames>
                                                                                    <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                        <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                        <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="6"/>
                                                                                    </ThicknessAnimationUsingKeyFrames>
                                                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                        <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                        <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
                                                                                    </DoubleAnimationUsingKeyFrames>
                                                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                        <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                        <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
                                                                                    </DoubleAnimationUsingKeyFrames>
                                                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                        <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                        <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
                                                                                    </DoubleAnimationUsingKeyFrames>
                                                                                </Storyboard>
                                                                            </BeginStoryboard>
                                                                        </Trigger.ExitActions>
                                                                    </Trigger>
                                                                </ControlTemplate.Triggers>
                                                            </ControlTemplate>
                                                        </Setter.Value>
                                                    </Setter>
                                                </Style>
                                            </Custom:SurfaceThumb.Style>
                                        </Custom:SurfaceThumb>
                                    </Custom:SurfaceTrack.Thumb>
                                    <Custom:SurfaceTrack.IncreaseRepeatButton>
                                        <Custom:SurfaceRepeatButton x:Name="SliderIncrease" Command="Slider.IncreaseLarge">
                                            <Custom:SurfaceRepeatButton.Style>
                                                <Style TargetType="{x:Type Custom:SurfaceRepeatButton}">
                                                    <Setter Property="Background" Value="Transparent"/>
                                                    <Setter Property="BorderBrush" Value="Transparent"/>
                                                    <Setter Property="IsTabStop" Value="False"/>
                                                    <Setter Property="Focusable" Value="False"/>
                                                    <Setter Property="Template">
                                                        <Setter.Value>
                                                            <ControlTemplate TargetType="{x:Type Custom:SurfaceRepeatButton}">
                                                                <Grid>
                                                                    <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}"/>
                                                                </Grid>
                                                            </ControlTemplate>
                                                        </Setter.Value>
                                                    </Setter>
                                                </Style>
                                            </Custom:SurfaceRepeatButton.Style>
                                        </Custom:SurfaceRepeatButton>
                                    </Custom:SurfaceTrack.IncreaseRepeatButton>
                                    <Custom:SurfaceTrack.DecreaseRepeatButton>
                                        <Custom:SurfaceRepeatButton x:Name="SliderDecrease" Command="Slider.DecreaseLarge">
                                            <Custom:SurfaceRepeatButton.Style>
                                                <Style TargetType="{x:Type Custom:SurfaceRepeatButton}">
                                                    <Setter Property="Background" Value="Transparent"/>
                                                    <Setter Property="BorderBrush" Value="Transparent"/>
                                                    <Setter Property="IsTabStop" Value="False"/>
                                                    <Setter Property="Focusable" Value="False"/>
                                                    <Setter Property="Template">
                                                        <Setter.Value>
                                                            <ControlTemplate TargetType="{x:Type Custom:SurfaceRepeatButton}">
                                                                <Grid>
                                                                    <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}"/>
                                                                </Grid>
                                                            </ControlTemplate>
                                                        </Setter.Value>
                                                    </Setter>
                                                </Style>
                                            </Custom:SurfaceRepeatButton.Style>
                                        </Custom:SurfaceRepeatButton>
                                    </Custom:SurfaceTrack.DecreaseRepeatButton>
                                </Custom:SurfaceTrack>
                            </Border>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="TickPlacement" Value="TopLeft">
                                <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
                            </Trigger>
                            <Trigger Property="TickPlacement" Value="BottomRight">
                                <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
                            </Trigger>
                            <Trigger Property="TickPlacement" Value="Both">
                                <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
                                <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
                            </Trigger>
                            <Trigger Property="IsMoveToPointEnabled" Value="True">
                                <Setter Property="Visibility" TargetName="SliderIncrease" Value="Collapsed"/>
                                <Setter Property="Visibility" TargetName="SliderDecrease" Value="Collapsed"/>
                            </Trigger>
                            <Trigger Property="Custom:Contacts.IsAnyContactOrMouseCapturedWithin" SourceName="SliderIncrease" Value="True">
                                <Trigger.EnterActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height" To="19"/>
                                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
                                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </Trigger.EnterActions>
                                <Trigger.ExitActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height"/>
                                            <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
                                            <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </Trigger.ExitActions>
                                <Setter Property="Fill" TargetName="TrackBkgd" Value="#661B2022"/>
                            </Trigger>
                            <Trigger Property="Custom:Contacts.IsAnyContactOrMouseCapturedWithin" SourceName="SliderDecrease" Value="True">
                                <Trigger.EnterActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height" To="19"/>
                                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
                                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </Trigger.EnterActions>
                                <Trigger.ExitActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height"/>
                                            <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
                                            <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </Trigger.ExitActions>
                                <Setter Property="Fill" TargetName="TrackBkgd" Value="#661B2022"/>
                            </Trigger>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsMoveToPointEnabled" Value="True"/>
                                    <Condition Property="IsAnyContactCaptured" Value="True"/>
                                    <Condition Property="Custom:Contacts.IsAnyContactOrMouseCapturedWithin" SourceName="Thumb" Value="True"/>
                                </MultiTrigger.Conditions>
                                <MultiTrigger.ExitActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height"/>
                                            <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
                                            <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </MultiTrigger.ExitActions>
                                <MultiTrigger.EnterActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height" To="19"/>
                                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
                                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </MultiTrigger.EnterActions>
                            </MultiTrigger>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter Property="Foreground" TargetName="Thumb" Value="#A5333333"/>
                                <Setter Property="Fill" TargetName="TrackBkgd" Value="#00000000"/>
                                <Setter Property="Opacity" TargetName="TrackBkgd" Value="0.35"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <Trigger Property="Orientation" Value="Vertical">
                    <Setter Property="Width" Value="NaN"/>
                    <Setter Property="MinWidth" Value="30"/>
                    <Setter Property="Height" Value="NaN"/>
                    <Setter Property="MinHeight" Value="30"/>
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type Custom:SurfaceSlider}">
                                <ControlTemplate.Resources>
                                    <Storyboard x:Key="Touch">
                                        <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width" To="19"/>
                                        <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
                                        <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
                                    </Storyboard>
                                    <Storyboard x:Key="Release">
                                        <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width"/>
                                        <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
                                        <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
                                    </Storyboard>
                                </ControlTemplate.Resources>
                                <Grid x:Name="GridRoot" HorizontalAlignment="Stretch" Width="Auto" SnapsToDevicePixels="True" Background="Transparent">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition MinWidth="{TemplateBinding MinWidth}" Width="Auto"/>
                                        <ColumnDefinition Width="Auto"/>
                                    </Grid.ColumnDefinitions>
                                    <Canvas ClipToBounds="False">
                                        <Label x:Name="PART_SurfaceToolTip">
                                            <Label.Style>
                                                <Style TargetType="{x:Type Label}">
                                                    <Setter Property="Template">
                                                        <Setter.Value>
                                                            <ControlTemplate TargetType="{x:Type Label}">
                                                                <Grid>
                                                                    <Border HorizontalAlignment="Stretch" Margin="0" Width="Auto" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="2">
                                                                        <TextBlock Margin="{TemplateBinding Padding}" Background="{x:Null}" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
																	</Border>
                                                                </Grid>
                                                            </ControlTemplate>
                                                        </Setter.Value>
                                                    </Setter>
                                                    <Setter Property="Visibility" Value="Collapsed"/>
                                                    <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.InfoBrushKey}}"/>
                                                    <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}"/>
                                                    <Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}"/>
                                                    <Setter Property="Padding" Value="2"/>
                                                </Style>
                                            </Label.Style>
                                        </Label>
                                    </Canvas>
                                    <TickBar x:Name="TopTick" Margin="0,0,1,0" Width="4" SnapsToDevicePixels="True" Visibility="Collapsed" Grid.Column="0" Fill="{TemplateBinding BorderBrush}" IsDirectionReversed="True" Placement="Left" ReservedSpace="30"/>
                                    <TickBar x:Name="BottomTick" Margin="1,0,0,0" Width="4" SnapsToDevicePixels="True" Visibility="Collapsed" Grid.Column="2" Fill="{TemplateBinding BorderBrush}" IsDirectionReversed="True" Placement="Right" ReservedSpace="30"/>
                                    <Rectangle x:Name="TrackBkgd" Fill="{TemplateBinding Background}" RadiusX="3" RadiusY="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="6" Height="Auto" SnapsToDevicePixels="True" Grid.Column="1">
                                        <Rectangle.Stroke>
                                            <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                <GradientStop Color="#66000000" Offset="0"/>
                                                <GradientStop Color="#4CFFFFFF" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Stroke>
                                    </Rectangle>
                                    <Border x:Name="Track" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Opacity="1" SnapsToDevicePixels="True" Background="Transparent" Grid.Column="1">
                                        <Custom:SurfaceTrack x:Name="PART_Track" HorizontalAlignment="Stretch" Grid.Column="1">
                                            <Custom:SurfaceTrack.DecreaseRepeatButton>
                                                <Custom:SurfaceRepeatButton x:Name="SliderDecrease" Command="Slider.DecreaseLarge">
                                                    <Custom:SurfaceRepeatButton.Style>
                                                        <Style TargetType="{x:Type Custom:SurfaceRepeatButton}">
                                                            <Setter Property="Background" Value="Transparent"/>
                                                            <Setter Property="BorderBrush" Value="Transparent"/>
                                                            <Setter Property="IsTabStop" Value="False"/>
                                                            <Setter Property="Focusable" Value="False"/>
                                                            <Setter Property="Template">
                                                                <Setter.Value>
                                                                    <ControlTemplate TargetType="{x:Type Custom:SurfaceRepeatButton}">
                                                                        <Grid>
                                                                            <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}"/>
                                                                        </Grid>
                                                                    </ControlTemplate>
                                                                </Setter.Value>
                                                            </Setter>
                                                        </Style>
                                                    </Custom:SurfaceRepeatButton.Style>
                                                </Custom:SurfaceRepeatButton>
                                            </Custom:SurfaceTrack.DecreaseRepeatButton>
                                            <Custom:SurfaceTrack.IncreaseRepeatButton>
                                                <Custom:SurfaceRepeatButton x:Name="SliderIncrease" Command="Slider.IncreaseLarge">
                                                    <Custom:SurfaceRepeatButton.Style>
                                                        <Style TargetType="{x:Type Custom:SurfaceRepeatButton}">
                                                            <Setter Property="Background" Value="Transparent"/>
                                                            <Setter Property="BorderBrush" Value="Transparent"/>
                                                            <Setter Property="IsTabStop" Value="False"/>
                                                            <Setter Property="Focusable" Value="False"/>
                                                            <Setter Property="Template">
                                                                <Setter.Value>
                                                                    <ControlTemplate TargetType="{x:Type Custom:SurfaceRepeatButton}">
                                                                        <Grid>
                                                                            <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}"/>
                                                                        </Grid>
                                                                    </ControlTemplate>
                                                                </Setter.Value>
                                                            </Setter>
                                                        </Style>
                                                    </Custom:SurfaceRepeatButton.Style>
                                                </Custom:SurfaceRepeatButton>
                                            </Custom:SurfaceTrack.IncreaseRepeatButton>
                                            <Custom:SurfaceTrack.Thumb>
                                                <Custom:SurfaceThumb x:Name="Thumb" HorizontalAlignment="Center" Margin="0,0,1,0" MinHeight="30" MinWidth="30" Width="30" Height="30" Foreground="Black" SnapsToDevicePixels="True">
                                                    <Custom:SurfaceThumb.Style>
                                                        <Style TargetType="{x:Type Custom:SurfaceThumb}">
                                                            <Setter Property="Background" Value="Transparent"/>
                                                            <Setter Property="Custom:ContactVisualizer.Adapter">
                                                                <Setter.Value>
                                                                    <Custom:ContactVisualizerRectangleAdapter RadiusX="15" RadiusY="15"/>
                                                                </Setter.Value>
                                                            </Setter>
                                                            <Setter Property="Template">
                                                                <Setter.Value>
                                                                    <ControlTemplate TargetType="{x:Type Custom:SurfaceThumb}">
                                                                        <ControlTemplate.Resources>
                                                                            <Storyboard x:Key="Press">
                                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                                                                </DoubleAnimationUsingKeyFrames>
                                                                                <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                    <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                </ThicknessAnimationUsingKeyFrames>
                                                                                <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                    <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                </ThicknessAnimationUsingKeyFrames>
                                                                                <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                    <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                </ThicknessAnimationUsingKeyFrames>
                                                                                <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                    <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                </ThicknessAnimationUsingKeyFrames>
                                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                </DoubleAnimationUsingKeyFrames>
                                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                </DoubleAnimationUsingKeyFrames>
                                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                </DoubleAnimationUsingKeyFrames>
                                                                            </Storyboard>
                                                                            <Storyboard x:Key="Release">
                                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                                                    <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="0"/>
                                                                                </DoubleAnimationUsingKeyFrames>
                                                                                <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                    <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                    <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="2"/>
                                                                                </ThicknessAnimationUsingKeyFrames>
                                                                                <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                    <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                    <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
                                                                                </ThicknessAnimationUsingKeyFrames>
                                                                                <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                    <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                    <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
                                                                                </ThicknessAnimationUsingKeyFrames>
                                                                                <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                    <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                    <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="6"/>
                                                                                </ThicknessAnimationUsingKeyFrames>
                                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                    <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
                                                                                </DoubleAnimationUsingKeyFrames>
                                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                    <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
                                                                                </DoubleAnimationUsingKeyFrames>
                                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                    <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
                                                                                </DoubleAnimationUsingKeyFrames>
                                                                            </Storyboard>
                                                                        </ControlTemplate.Resources>
                                                                        <Grid x:Name="Grid" Margin="1" SnapsToDevicePixels="True" Background="Transparent">
                                                                            <Rectangle x:Name="Base" Fill="{TemplateBinding Background}" Stroke="{x:Null}" StrokeThickness="0" RadiusX="15" RadiusY="15" HorizontalAlignment="Stretch" Margin="5" VerticalAlignment="Stretch" Width="Auto" Height="Auto" SnapsToDevicePixels="True"/>
                                                                            <Rectangle x:Name="Button" Fill="#33A4B4BD" RadiusX="15" RadiusY="15" HorizontalAlignment="Stretch" Margin="5" VerticalAlignment="Stretch" Width="Auto" Height="Auto" SnapsToDevicePixels="True">
                                                                                <Rectangle.Stroke>
                                                                                    <LinearGradientBrush EndPoint="0,0" StartPoint="0,1">
                                                                                        <GradientStop Color="#66000000" Offset="0"/>
                                                                                        <GradientStop Color="#33000000" Offset="1"/>
                                                                                    </LinearGradientBrush>
                                                                                </Rectangle.Stroke>
                                                                            </Rectangle>
                                                                            <Rectangle x:Name="RenderOverlay" StrokeThickness="1" RadiusX="15" RadiusY="15" HorizontalAlignment="Stretch" Margin="6" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Opacity="1" SnapsToDevicePixels="True">
                                                                                <Rectangle.Stroke>
                                                                                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                                                                        <GradientStop Color="#7FFFFFFF" Offset="0"/>
                                                                                        <GradientStop Color="#0CFFFFFF" Offset="1"/>
                                                                                    </LinearGradientBrush>
                                                                                </Rectangle.Stroke>
                                                                                <Rectangle.Fill>
                                                                                    <LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1">
                                                                                        <GradientStop Color="#26000000" Offset="0"/>
                                                                                        <GradientStop Color="#4CFFFFFF" Offset="1"/>
                                                                                    </LinearGradientBrush>
                                                                                </Rectangle.Fill>
                                                                            </Rectangle>
                                                                            <Microsoft_Surface_Presentation_Generic:SurfaceShadowChrome x:Name="GlowBorder" HorizontalAlignment="Stretch" Margin="2" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Opacity="0" Color="White" CornerRadius="{Binding ActualHeight, ElementName=GlowBorder}"/>
                                                                            <Rectangle x:Name="Contact" Fill="Transparent" Stroke="{x:Null}"/>
                                                                        </Grid>
                                                                        <ControlTemplate.Triggers>
                                                                            <Trigger Property="IsFocused" Value="True"/>
                                                                            <Trigger Property="IsEnabled" Value="False">
                                                                                <Setter Property="Fill" TargetName="Button" Value="#00000000"/>
                                                                                <Setter Property="Fill" TargetName="RenderOverlay" Value="#00000000"/>
                                                                                <Setter Property="Stroke" TargetName="Button" Value="#33000000"/>
                                                                                <Setter Property="Opacity" TargetName="RenderOverlay" Value="0.5"/>
                                                                            </Trigger>
                                                                            <Trigger Property="IsDragging" Value="True">
                                                                                <Trigger.EnterActions>
                                                                                    <BeginStoryboard>
                                                                                        <Storyboard>
                                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                                                                                            </DoubleAnimationUsingKeyFrames>
                                                                                            <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                                <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                            </ThicknessAnimationUsingKeyFrames>
                                                                                            <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                                <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                            </ThicknessAnimationUsingKeyFrames>
                                                                                            <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                                <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                            </ThicknessAnimationUsingKeyFrames>
                                                                                            <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                                <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                            </ThicknessAnimationUsingKeyFrames>
                                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                            </DoubleAnimationUsingKeyFrames>
                                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                            </DoubleAnimationUsingKeyFrames>
                                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                                                                            </DoubleAnimationUsingKeyFrames>
                                                                                        </Storyboard>
                                                                                    </BeginStoryboard>
                                                                                </Trigger.EnterActions>
                                                                                <Trigger.ExitActions>
                                                                                    <BeginStoryboard>
                                                                                        <Storyboard>
                                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                                                                <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="0"/>
                                                                                            </DoubleAnimationUsingKeyFrames>
                                                                                            <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                                <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                                <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="2"/>
                                                                                            </ThicknessAnimationUsingKeyFrames>
                                                                                            <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                                <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                                <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
                                                                                            </ThicknessAnimationUsingKeyFrames>
                                                                                            <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                                <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                                <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
                                                                                            </ThicknessAnimationUsingKeyFrames>
                                                                                            <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                                                                <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                                <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="6"/>
                                                                                            </ThicknessAnimationUsingKeyFrames>
                                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                                <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
                                                                                            </DoubleAnimationUsingKeyFrames>
                                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                                <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
                                                                                            </DoubleAnimationUsingKeyFrames>
                                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                                                <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
                                                                                            </DoubleAnimationUsingKeyFrames>
                                                                                        </Storyboard>
                                                                                    </BeginStoryboard>
                                                                                </Trigger.ExitActions>
                                                                            </Trigger>
                                                                        </ControlTemplate.Triggers>
                                                                    </ControlTemplate>
                                                                </Setter.Value>
                                                            </Setter>
                                                        </Style>
                                                    </Custom:SurfaceThumb.Style>
                                                </Custom:SurfaceThumb>
                                            </Custom:SurfaceTrack.Thumb>
                                        </Custom:SurfaceTrack>
                                    </Border>
                                </Grid>
                                <ControlTemplate.Triggers>
                                    <Trigger Property="TickPlacement" Value="TopLeft">
                                        <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
                                    </Trigger>
                                    <Trigger Property="TickPlacement" Value="BottomRight">
                                        <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
                                    </Trigger>
                                    <Trigger Property="TickPlacement" Value="Both">
                                        <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
                                        <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
                                    </Trigger>
                                    <Trigger Property="IsMoveToPointEnabled" Value="True">
                                        <Setter Property="Visibility" TargetName="SliderIncrease" Value="Collapsed"/>
                                        <Setter Property="Visibility" TargetName="SliderDecrease" Value="Collapsed"/>
                                    </Trigger>
                                    <Trigger Property="Custom:Contacts.IsAnyContactOrMouseCapturedWithin" SourceName="SliderIncrease" Value="True">
                                        <Trigger.EnterActions>
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width" To="19"/>
                                                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
                                                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </Trigger.EnterActions>
                                        <Trigger.ExitActions>
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width"/>
                                                    <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
                                                    <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </Trigger.ExitActions>
                                        <Setter Property="Fill" TargetName="TrackBkgd" Value="#661B2022"/>
                                    </Trigger>
                                    <Trigger Property="Custom:Contacts.IsAnyContactOrMouseCapturedWithin" SourceName="SliderDecrease" Value="True">
                                        <Trigger.EnterActions>
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width" To="19"/>
                                                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
                                                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </Trigger.EnterActions>
                                        <Trigger.ExitActions>
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width"/>
                                                    <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
                                                    <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </Trigger.ExitActions>
                                        <Setter Property="Fill" TargetName="TrackBkgd" Value="#661B2022"/>
                                    </Trigger>
                                    <MultiTrigger>
                                        <MultiTrigger.Conditions>
                                            <Condition Property="IsMoveToPointEnabled" Value="True"/>
                                            <Condition Property="IsAnyContactCaptured" Value="True"/>
                                            <Condition Property="Custom:Contacts.IsAnyContactOrMouseCapturedWithin" SourceName="Thumb" Value="True"/>
                                        </MultiTrigger.Conditions>
                                        <MultiTrigger.ExitActions>
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width"/>
                                                    <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
                                                    <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </MultiTrigger.ExitActions>
                                        <MultiTrigger.EnterActions>
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width" To="19"/>
                                                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
                                                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </MultiTrigger.EnterActions>
                                    </MultiTrigger>
                                    <Trigger Property="IsEnabled" Value="False">
                                        <Setter Property="Foreground" TargetName="Thumb" Value="#A5333333"/>
                                        <Setter Property="Fill" TargetName="TrackBkgd" Value="#00000000"/>
                                        <Setter Property="Opacity" TargetName="TrackBkgd" Value="0.35"/>
                                        <Setter Property="Margin" TargetName="Thumb" Value="0"/>
                                    </Trigger>
                                </ControlTemplate.Triggers>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Trigger>
            </Style.Triggers>
        </Style>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" Width="Auto" Height="Auto" Background="{x:Null}">
        <Custom:SurfaceSlider  Height="Auto" x:Name="slider" Value="0.5" Width="Auto" 
                               Thumb.DragStarted="sliderPosition_DragStarted" Thumb.DragCompleted="sliderPosition_DragCompleted" ContactTapGesture="slider_ContactTapGesture" Background="#19FFFFFF" Style="{DynamicResource FingersDance.Control.Slider}" />
        <vw:TimelineView x:Name="tv" Margin="0,15,0,0" Background="{x:Null}"/>
        <popup:UserControlClose x:Name="confirmCancelPopup" Question="Êtes-vous de sûr de vouloir effacer cette annotation ?" Visibility="Hidden" ConfirmYesOrNo="confirmCancelPopup_ConfirmYesOrNo" />
    </Grid>
</UserControl>