1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Colors2.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!--空按钮-->
<Style TargetType="Button" x:Key="Styles.Button.Empty">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
Height="{TemplateBinding Height}"
Width="{TemplateBinding Width}"
>
<ContentPresenter RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsKeyboardFocused" Value="true">
</Trigger>
<Trigger Property="IsEnabled" Value="false">
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Opacity" Value="0.5"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
</Style>
<Style TargetType="Button" x:Key="Styles.Button1">
<Setter Property="Width" Value="150"/>
<Setter Property="Height" Value="70"/>
<Setter Property="Margin" Value="6"/>
<Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="36" />
<Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="Background" Value="#FF3B3B3B" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<StackPanel Orientation="Vertical">
<Border Background="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
<ContentPresenter HorizontalAlignment="Right" VerticalAlignment="Top" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsKeyboardFocused" Value="true">
</Trigger>
<Trigger Property="IsEnabled" Value="false">
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Opacity" Value="0.5"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Button" x:Key="Styles.Button2">
<Setter Property="Margin" Value="6"/>
<Setter Property="Width" Value="185"/>
<Setter Property="Height" Value="85"/>
<Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="48" />
<Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="Background" Value="#FF3B3B3B" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<StackPanel Orientation="Vertical">
<Border Background="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
<ContentPresenter RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsKeyboardFocused" Value="true">
</Trigger>
<Trigger Property="IsEnabled" Value="false">
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Opacity" Value="0.5"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="Black" Direction="270" ShadowDepth="3" Opacity="0.4" />
</Setter.Value>
</Setter>
<Setter Property="FlowDirection" Value="LeftToRight" />
</Style>
<Style TargetType="Button" x:Key="Styles.Button3">
<Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="48" />
<Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="Background" Value="#FF3B3B3B" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<StackPanel Orientation="Vertical">
<Border Background="{TemplateBinding Background}" Height="{TemplateBinding ActualHeight}" Width="{TemplateBinding ActualWidth}">
<ContentPresenter RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Opacity" Value="0.5"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="Black" Direction="270" ShadowDepth="3" Opacity="0.4" />
</Setter.Value>
</Setter>
</Style>
<!--× √ toggle 按钮-->
<Style TargetType="{x:Type ToggleButton}" x:Key="Styles.ToggleButton.YESNO" >
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Canvas Height="45" Width="106">
<Path x:Name="Path_Background" Data="F1M1,1C1,1 105,1 105,1 105,1 105,44 105,44 105,44 1,44 1,44 1,44 1,1 1,1z"
Fill="#FF008BE5" Height="45" Width="106"/>
<Path x:Name="Path_block" Data="F1M1,1C1,1 23,1 23,1 23,1 23,35 23,35 23,35 1,35 1,35 1,35 1,1 1,1z"
Fill="#FFFFFFFF" Height="36" Canvas.Left="77" Canvas.Top="5" Width="24"/>
<Path x:Name="Path_On" Data="F1M9.551,15.307C9.551,15.307 13.212,23.525 13.212,23.525 13.212,23.525 19.161,6.825 28.542,1.258 28.314,5.234 27.398,8.68 29,12.921 24.881,13.982 16.415,25.91 13.669,31.742 9.78,26.175 5.203,21.934 2,20.609 2,20.609 9.551,15.307 9.551,15.307z"
Fill="#FFFFFFFF" Height="33" Canvas.Left="25" Canvas.Top="6" Width="31"/>
<Path x:Name="Path_Off" Visibility="Hidden" Data="F1M24.997,23.003C24.997,23.003 15.888,23.003 15.888,23.003 15.888,23.003 12.921,18.001 12.921,18.001 12.921,18.001 9.955,23.003 9.955,23.003 9.955,23.003 1.003,23.003 1.003,23.003 1.003,23.003 7.146,12.303 7.146,12.303 7.146,12.303 1.278,1.997 1.278,1.997 1.278,1.997 10.27,1.997 10.27,1.997 10.27,1.997 13.157,6.801 13.157,6.801 13.157,6.801 15.966,1.997 15.966,1.997 15.966,1.997 24.76,1.997 24.76,1.997 24.76,1.997 18.854,12.303 18.854,12.303 18.854,12.303 24.997,23.003 24.997,23.003z"
Fill="#FFFFFFFF" Height="25" Canvas.Left="51" Canvas.Top="10" Width="26"/>
</Canvas>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="False">
<Setter TargetName="Path_On" Property="Visibility" Value="Hidden"/>
<Setter TargetName="Path_Off" Property="Visibility" Value="Visible"/>
<Setter TargetName="Path_block" Property="Canvas.Left" Value="4"/>
<Setter TargetName="Path_Background" Property="Fill" Value="#FF3B3B3B"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="Path_Background" Property="Opacity" Value="0.7"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--button内的阴影-->
<Style TargetType="FrameworkElement" x:Key="Styles.Shadow">
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect BlurRadius="10" RenderingBias="Quality" Color="Black" Direction="270" ShadowDepth="2" Opacity="0.5" />
</Setter.Value>
</Setter>
</Style>
<Style x:Key="Styles.Button.Square.Accent2" TargetType="Button" BasedOn="{StaticResource MahApps.Styles.Button.Square.Accent}" >
<Setter Property="FontSize" Value="18"/>
<Setter Property="Width" Value="120"/>
<Setter Property="Height" Value="40"/>
<Setter Property="Margin" Value="5"/>
</Style>
<Style x:Key="Styles.Button.Square2" TargetType="Button" BasedOn="{StaticResource MahApps.Styles.Button.Square}" >
<Setter Property="FontSize" Value="18"/>
<Setter Property="Width" Value="120"/>
<Setter Property="Height" Value="40"/>
<Setter Property="Margin" Value="5"/>
</Style>
</ResourceDictionary>