|
8 | 8 | <Setter Property="Padding" Value="8, 6" />
|
9 | 9 | <!--<Setter Property="FocusVisualStyle" Value="{StaticResource MyFocusVisual}" />-->
|
10 | 10 | <Setter Property="Background" Value="#fafafa"/>
|
| 11 | + <Setter Property="BorderBrush" Value="#e0e0e0"/> |
| 12 | + <Setter Property="BorderThickness" Value="1"/> |
| 13 | + <Setter Property="ClipToBounds" Value="False"/> |
11 | 14 | <Setter Property="Template">
|
12 | 15 | <Setter.Value>
|
13 | 16 | <ControlTemplate TargetType="Button">
|
14 | 17 | <ControlTemplate.Resources>
|
15 |
| - |
16 |
| - |
17 |
| - <Storyboard x:Key="GlowOn"> |
18 |
| - <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" |
19 |
| - Storyboard.TargetName="border" |
20 |
| - Storyboard.TargetProperty="(Effect).Opacity"> |
21 |
| - <SplineDoubleKeyFrame KeyTime="0:0:0.3" Value=".8"/> |
22 |
| - </DoubleAnimationUsingKeyFrames> |
23 |
| - </Storyboard> |
24 |
| - <Storyboard x:Key="GlowOff"> |
25 |
| - <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" |
26 |
| - Storyboard.TargetName="border" |
27 |
| - Storyboard.TargetProperty="(Effect).Opacity"> |
28 |
| - <SplineDoubleKeyFrame KeyTime="0:0:0.3" Value=".4"/> |
29 |
| - </DoubleAnimationUsingKeyFrames> |
30 |
| - </Storyboard> |
31 | 18 | <Storyboard x:Key="JellyClick">
|
32 | 19 | <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
|
33 | 20 | Storyboard.TargetName="border"
|
34 | 21 | Storyboard.TargetProperty="(RenderTransform).ScaleX">
|
35 |
| - <SplineDoubleKeyFrame KeyTime="0:0:0.3" Value=".925"/> |
| 22 | + <SplineDoubleKeyFrame KeyTime="0:0:0.1" Value=".9125"/> |
36 | 23 | </DoubleAnimationUsingKeyFrames>
|
37 | 24 | <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
|
38 | 25 | Storyboard.TargetName="border"
|
39 | 26 | Storyboard.TargetProperty="(RenderTransform).ScaleY">
|
40 |
| - <SplineDoubleKeyFrame KeyTime="0:0:0.3" Value=".925"/> |
| 27 | + <SplineDoubleKeyFrame KeyTime="0:0:0.1" Value=".9125"/> |
41 | 28 | </DoubleAnimationUsingKeyFrames>
|
42 | 29 | </Storyboard>
|
43 | 30 | <Storyboard x:Key="JellyClickOff">
|
44 | 31 | <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
|
45 | 32 | Storyboard.TargetName="border"
|
46 | 33 | Storyboard.TargetProperty="(RenderTransform).ScaleX">
|
47 |
| - <SplineDoubleKeyFrame KeyTime="0:0:0.15" Value="1"/> |
| 34 | + <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1"/> |
48 | 35 | </DoubleAnimationUsingKeyFrames>
|
49 | 36 | <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
|
50 | 37 | Storyboard.TargetName="border"
|
51 | 38 | Storyboard.TargetProperty="(RenderTransform).ScaleY">
|
52 |
| - <SplineDoubleKeyFrame KeyTime="0:0:0.15" Value="1"/> |
| 39 | + <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1"/> |
53 | 40 | </DoubleAnimationUsingKeyFrames>
|
54 | 41 | </Storyboard>
|
55 | 42 | </ControlTemplate.Resources>
|
56 |
| - <Grid Margin="{TemplateBinding Margin}"> |
57 |
| - <Border Name="border" |
58 |
| - BorderThickness="0" |
59 |
| - Margin="{TemplateBinding Margin}" |
60 |
| - Padding="{TemplateBinding Padding}" |
61 |
| - BorderBrush="DarkGray" |
62 |
| - CornerRadius="2" |
63 |
| - Background="{TemplateBinding Background}"> |
64 |
| - <Border.Effect> |
65 |
| - <DropShadowEffect x:Name="shadow" RenderingBias="Quality" Direction="90" BlurRadius="4" ShadowDepth="0" Color="#000" Opacity=".4" /> |
66 |
| - </Border.Effect> |
| 43 | + <Grid Margin="{TemplateBinding Margin}" UseLayoutRounding="True" SnapsToDevicePixels="True" ClipToBounds="False"> |
| 44 | + <Border Name="border" |
| 45 | + UseLayoutRounding="True" |
| 46 | + BorderThickness="{TemplateBinding BorderThickness}" |
| 47 | + BorderBrush="{TemplateBinding BorderBrush}" |
| 48 | + CornerRadius="2" |
| 49 | + Padding="{TemplateBinding Padding}" |
| 50 | + Background="{TemplateBinding Background}"> |
67 | 51 | <Border.Resources>
|
68 | 52 | </Border.Resources>
|
69 | 53 | <Border.RenderTransformOrigin>
|
|
72 | 56 | <Border.RenderTransform>
|
73 | 57 | <ScaleTransform ScaleX="1" ScaleY="1" RenderOptions.BitmapScalingMode="NearestNeighbor" />
|
74 | 58 | </Border.RenderTransform>
|
75 |
| - <Grid> |
76 |
| - <ContentPresenter HorizontalAlignment="Center" |
| 59 | + <ContentPresenter TextOptions.TextFormattingMode="Display" HorizontalAlignment="Center" |
77 | 60 | VerticalAlignment="Center" Name="content"/>
|
78 |
| - </Grid> |
79 | 61 | </Border>
|
80 | 62 | </Grid>
|
81 | 63 | <ControlTemplate.Triggers>
|
82 | 64 | <Trigger Property="IsMouseOver" Value="True">
|
83 | 65 | <Setter Property="Background" Value="#fff" />
|
| 66 | + <Setter Property="Cursor" Value="Hand" /> |
| 67 | + </Trigger> |
| 68 | + <Trigger Property="IsPressed" Value="True"> |
84 | 69 | <Trigger.EnterActions>
|
85 |
| - <BeginStoryboard Storyboard="{StaticResource GlowOn}" /> |
| 70 | + <BeginStoryboard Storyboard="{StaticResource JellyClick}" /> |
86 | 71 | </Trigger.EnterActions>
|
87 | 72 | <Trigger.ExitActions>
|
88 |
| - <BeginStoryboard Storyboard="{StaticResource GlowOff}" /> |
| 73 | + <BeginStoryboard Storyboard="{StaticResource JellyClickOff}" /> |
89 | 74 | </Trigger.ExitActions>
|
90 | 75 | </Trigger>
|
91 |
| - <Trigger Property="IsPressed" Value="True"> |
| 76 | + <Trigger Property="IsDefaulted" Value="True"> |
92 | 77 | <Trigger.EnterActions>
|
93 |
| - <BeginStoryboard Storyboard="{StaticResource GlowOn}" /> |
94 | 78 | <BeginStoryboard Storyboard="{StaticResource JellyClick}" />
|
95 | 79 | </Trigger.EnterActions>
|
96 | 80 | <Trigger.ExitActions>
|
97 |
| - <BeginStoryboard Storyboard="{StaticResource GlowOff}" /> |
98 | 81 | <BeginStoryboard Storyboard="{StaticResource JellyClickOff}" />
|
99 | 82 | </Trigger.ExitActions>
|
100 | 83 | </Trigger>
|
101 |
| - <Trigger Property="IsDefaulted" Value="True"> |
102 |
| - </Trigger> |
103 | 84 | <Trigger Property="IsFocused" Value="True">
|
104 | 85 | </Trigger>
|
105 | 86 | <Trigger Property="IsEnabled" Value="False">
|
106 |
| - <Setter Property="Background" Value="#ddd" /> |
| 87 | + <Setter Property="Background" Value="#ccc" /> |
| 88 | + <Setter Property="BorderBrush" Value="#aaa" /> |
107 | 89 | </Trigger>
|
108 | 90 |
|
109 | 91 | </ControlTemplate.Triggers>
|
|
0 commit comments