1
+ <ResourceDictionary xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2
+ xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
3
+ xmlns : local =" clr-namespace:Biyori.Lib.Styles" >
4
+
5
+ <Style x : Key =" NavButtons" TargetType =" Button" >
6
+ <Setter Property =" OverridesDefaultStyle" Value =" True" />
7
+ <Setter Property =" Margin" Value =" 0" />
8
+ <Setter Property =" Padding" Value =" 8, 6" />
9
+ <!-- <Setter Property="FocusVisualStyle" Value="{StaticResource MyFocusVisual}" />-->
10
+ <Setter Property =" Background" Value =" #fafafa" />
11
+ <Setter Property =" Template" >
12
+ <Setter .Value>
13
+ <ControlTemplate TargetType =" Button" >
14
+ <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
+ <Storyboard x : Key =" JellyClick" >
32
+ <DoubleAnimationUsingKeyFrames BeginTime =" 00:00:00"
33
+ Storyboard.TargetName=" border"
34
+ Storyboard.TargetProperty=" (RenderTransform).ScaleX" >
35
+ <SplineDoubleKeyFrame KeyTime =" 0:0:0.3" Value =" .925" />
36
+ </DoubleAnimationUsingKeyFrames >
37
+ <DoubleAnimationUsingKeyFrames BeginTime =" 00:00:00"
38
+ Storyboard.TargetName=" border"
39
+ Storyboard.TargetProperty=" (RenderTransform).ScaleY" >
40
+ <SplineDoubleKeyFrame KeyTime =" 0:0:0.3" Value =" .925" />
41
+ </DoubleAnimationUsingKeyFrames >
42
+ </Storyboard >
43
+ <Storyboard x : Key =" JellyClickOff" >
44
+ <DoubleAnimationUsingKeyFrames BeginTime =" 00:00:00"
45
+ Storyboard.TargetName=" border"
46
+ Storyboard.TargetProperty=" (RenderTransform).ScaleX" >
47
+ <SplineDoubleKeyFrame KeyTime =" 0:0:0.15" Value =" 1" />
48
+ </DoubleAnimationUsingKeyFrames >
49
+ <DoubleAnimationUsingKeyFrames BeginTime =" 00:00:00"
50
+ Storyboard.TargetName=" border"
51
+ Storyboard.TargetProperty=" (RenderTransform).ScaleY" >
52
+ <SplineDoubleKeyFrame KeyTime =" 0:0:0.15" Value =" 1" />
53
+ </DoubleAnimationUsingKeyFrames >
54
+ </Storyboard >
55
+ </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>
67
+ <Border .Resources>
68
+ </Border .Resources>
69
+ <Border .RenderTransformOrigin>
70
+ <Point X =" .5" Y =" .5" />
71
+ </Border .RenderTransformOrigin>
72
+ <Border .RenderTransform>
73
+ <ScaleTransform ScaleX =" 1" ScaleY =" 1" RenderOptions.BitmapScalingMode=" NearestNeighbor" />
74
+ </Border .RenderTransform>
75
+ <Grid >
76
+ <ContentPresenter HorizontalAlignment =" Center"
77
+ VerticalAlignment =" Center" Name =" content" />
78
+ </Grid >
79
+ </Border >
80
+ </Grid >
81
+ <ControlTemplate .Triggers>
82
+ <Trigger Property =" IsMouseOver" Value =" True" >
83
+ <Setter Property =" Background" Value =" #fff" />
84
+ <Trigger .EnterActions>
85
+ <BeginStoryboard Storyboard =" {StaticResource GlowOn}" />
86
+ </Trigger .EnterActions>
87
+ <Trigger .ExitActions>
88
+ <BeginStoryboard Storyboard =" {StaticResource GlowOff}" />
89
+ </Trigger .ExitActions>
90
+ </Trigger >
91
+ <Trigger Property =" IsPressed" Value =" True" >
92
+ <Trigger .EnterActions>
93
+ <BeginStoryboard Storyboard =" {StaticResource GlowOn}" />
94
+ <BeginStoryboard Storyboard =" {StaticResource JellyClick}" />
95
+ </Trigger .EnterActions>
96
+ <Trigger .ExitActions>
97
+ <BeginStoryboard Storyboard =" {StaticResource GlowOff}" />
98
+ <BeginStoryboard Storyboard =" {StaticResource JellyClickOff}" />
99
+ </Trigger .ExitActions>
100
+ </Trigger >
101
+ <Trigger Property =" IsDefaulted" Value =" True" >
102
+ </Trigger >
103
+ <Trigger Property =" IsFocused" Value =" True" >
104
+ </Trigger >
105
+ <Trigger Property =" IsEnabled" Value =" False" >
106
+ <Setter Property =" Background" Value =" #ddd" />
107
+ </Trigger >
108
+
109
+ </ControlTemplate .Triggers>
110
+ </ControlTemplate >
111
+ </Setter .Value>
112
+ </Setter >
113
+ </Style >
114
+ </ResourceDictionary >
0 commit comments