|
| 1 | +<?xml version="1.0" encoding="utf-8" ?> |
| 2 | +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + xmlns:local="using:DevWinUI"> |
| 5 | + |
| 6 | + <Style x:Key="SliderThumbStyle" TargetType="Thumb"> |
| 7 | + <Setter Property="BorderThickness" Value="1" /> |
| 8 | + <Setter Property="Background" Value="{ThemeResource SliderThumbBackground}" /> |
| 9 | + <Setter Property="Template"> |
| 10 | + <Setter.Value> |
| 11 | + <ControlTemplate TargetType="Thumb"> |
| 12 | + <Border Margin="-2" |
| 13 | + Background="{ThemeResource SliderOuterThumbBackground}" |
| 14 | + BorderBrush="{ThemeResource SliderThumbBorderBrush}" |
| 15 | + BorderThickness="{TemplateBinding BorderThickness}" |
| 16 | + CornerRadius="{ThemeResource SliderThumbCornerRadius}"> |
| 17 | + <VisualStateManager.VisualStateGroups> |
| 18 | + <VisualStateGroup x:Name="CommonStates"> |
| 19 | + <VisualState x:Name="Normal"> |
| 20 | + <Storyboard> |
| 21 | + <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SliderInnerThumb" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)"> |
| 22 | + <!-- 0.86 is relative scale from 14px to 12px --> |
| 23 | + <SplineDoubleKeyFrame KeySpline="{StaticResource ControlFastOutSlowInKeySpline}" KeyTime="{StaticResource ControlFastAnimationDuration}" Value="0.86" /> |
| 24 | + </DoubleAnimationUsingKeyFrames> |
| 25 | + <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SliderInnerThumb" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)"> |
| 26 | + <!-- 0.86 is relative scale from 14px to 12px --> |
| 27 | + <SplineDoubleKeyFrame KeySpline="{StaticResource ControlFastOutSlowInKeySpline}" KeyTime="{StaticResource ControlFastAnimationDuration}" Value="0.86" /> |
| 28 | + </DoubleAnimationUsingKeyFrames> |
| 29 | + </Storyboard> |
| 30 | + </VisualState> |
| 31 | + <VisualState x:Name="PointerOver"> |
| 32 | + <Storyboard> |
| 33 | + <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SliderInnerThumb" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)"> |
| 34 | + <!-- 1.167 is relative scale from 12px to 14px --> |
| 35 | + <SplineDoubleKeyFrame KeySpline="{StaticResource ControlFastOutSlowInKeySpline}" KeyTime="{StaticResource ControlNormalAnimationDuration}" Value="1.167" /> |
| 36 | + </DoubleAnimationUsingKeyFrames> |
| 37 | + <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SliderInnerThumb" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)"> |
| 38 | + <!-- 1.167 is relative scale from 12px to 14px --> |
| 39 | + <SplineDoubleKeyFrame KeySpline="{StaticResource ControlFastOutSlowInKeySpline}" KeyTime="{StaticResource ControlNormalAnimationDuration}" Value="1.167" /> |
| 40 | + </DoubleAnimationUsingKeyFrames> |
| 41 | + </Storyboard> |
| 42 | + </VisualState> |
| 43 | + <VisualState x:Name="Pressed"> |
| 44 | + <Storyboard> |
| 45 | + <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SliderInnerThumb" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)"> |
| 46 | + <!-- 0.71 is relative scale from 14px to 10px --> |
| 47 | + <SplineDoubleKeyFrame KeySpline="{StaticResource ControlFastOutSlowInKeySpline}" KeyTime="{StaticResource ControlNormalAnimationDuration}" Value="0.71" /> |
| 48 | + </DoubleAnimationUsingKeyFrames> |
| 49 | + <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SliderInnerThumb" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)"> |
| 50 | + <!-- 0.71 is relative scale from 14px to 10px --> |
| 51 | + <SplineDoubleKeyFrame KeySpline="{StaticResource ControlFastOutSlowInKeySpline}" KeyTime="{StaticResource ControlNormalAnimationDuration}" Value="0.71" /> |
| 52 | + </DoubleAnimationUsingKeyFrames> |
| 53 | + </Storyboard> |
| 54 | + </VisualState> |
| 55 | + <VisualState x:Name="Disabled"> |
| 56 | + <Storyboard> |
| 57 | + <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SliderInnerThumb" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)"> |
| 58 | + <!-- 1.167 is relative scale from 12px to 14px --> |
| 59 | + <SplineDoubleKeyFrame KeySpline="{StaticResource ControlFastOutSlowInKeySpline}" KeyTime="{StaticResource ControlFastAnimationDuration}" Value="1.167" /> |
| 60 | + </DoubleAnimationUsingKeyFrames> |
| 61 | + <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SliderInnerThumb" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)"> |
| 62 | + <!-- 1.167 is relative scale from 12px to 14px --> |
| 63 | + <SplineDoubleKeyFrame KeySpline="{StaticResource ControlFastOutSlowInKeySpline}" KeyTime="{StaticResource ControlFastAnimationDuration}" Value="1.167" /> |
| 64 | + </DoubleAnimationUsingKeyFrames> |
| 65 | + </Storyboard> |
| 66 | + </VisualState> |
| 67 | + </VisualStateGroup> |
| 68 | + </VisualStateManager.VisualStateGroups> |
| 69 | + <Ellipse x:Name="SliderInnerThumb" |
| 70 | + Width="{ThemeResource SliderInnerThumbWidth}" |
| 71 | + Height="{ThemeResource SliderInnerThumbHeight}" |
| 72 | + Fill="{TemplateBinding Background}" |
| 73 | + RenderTransformOrigin="0.5, 0.5"> |
| 74 | + <Ellipse.RenderTransform> |
| 75 | + <CompositeTransform /> |
| 76 | + </Ellipse.RenderTransform> |
| 77 | + </Ellipse> |
| 78 | + </Border> |
| 79 | + </ControlTemplate> |
| 80 | + </Setter.Value> |
| 81 | + </Setter> |
| 82 | + </Style> |
| 83 | + |
| 84 | +</ResourceDictionary> |
0 commit comments