ButtonStyle.xaml 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  2. <Style x:Key="FocusVisual">
  3. <Setter Property="Control.Template">
  4. <Setter.Value>
  5. <ControlTemplate>
  6. <Rectangle
  7. Margin="2"
  8. SnapsToDevicePixels="true"
  9. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  10. StrokeDashArray="1 2"
  11. StrokeThickness="1" />
  12. </ControlTemplate>
  13. </Setter.Value>
  14. </Setter>
  15. </Style>
  16. <Style x:Key="PageEditToolBtn" BasedOn="{StaticResource TitleBarBtn}" TargetType="{x:Type Button}">
  17. <Setter Property="Background" Value="Transparent" />
  18. <Setter Property="BorderBrush" Value="Transparent" />
  19. <Setter Property="Width" Value="auto" />
  20. <Setter Property="Height" Value="40" />
  21. <Setter Property="Template">
  22. <Setter.Value>
  23. <ControlTemplate TargetType="{x:Type Button}">
  24. <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
  25. <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  26. </Border>
  27. <ControlTemplate.Triggers>
  28. <Trigger Property="IsMouseOver" Value="true">
  29. <Setter Property="Background" TargetName="border" Value="#1A000000" />
  30. <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}" />
  31. </Trigger>
  32. <Trigger Property="IsPressed" Value="true">
  33. <Setter Property="Background" TargetName="border" Value="#26000000" />
  34. <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}" />
  35. </Trigger>
  36. <Trigger Property="IsEnabled" Value="false">
  37. <Setter Property="Background" TargetName="border" Value="Transparent" />
  38. <Setter Property="BorderBrush" TargetName="border" Value="#33000000" />
  39. <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="#FF999999" />
  40. <Setter Property="Opacity" TargetName="contentPresenter" Value="0.4" />
  41. </Trigger>
  42. </ControlTemplate.Triggers>
  43. </ControlTemplate>
  44. </Setter.Value>
  45. </Setter>
  46. </Style>
  47. <Style x:Key="TitleBarBtn" TargetType="{x:Type Button}">
  48. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
  49. <Setter Property="Background" Value="{StaticResource Button.Static.Background}" />
  50. <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}" />
  51. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  52. <Setter Property="BorderThickness" Value="0" />
  53. <Setter Property="HorizontalContentAlignment" Value="Center" />
  54. <Setter Property="VerticalContentAlignment" Value="Center" />
  55. <Setter Property="Padding" Value="0" />
  56. <Setter Property="Width" Value="32" />
  57. <Setter Property="Height" Value="32" />
  58. <Setter Property="IsTabStop" Value="False" />
  59. <Setter Property="Template">
  60. <Setter.Value>
  61. <ControlTemplate TargetType="{x:Type Button}">
  62. <Border
  63. x:Name="border"
  64. Background="{TemplateBinding Background}"
  65. BorderBrush="{TemplateBinding BorderBrush}"
  66. BorderThickness="{TemplateBinding BorderThickness}"
  67. SnapsToDevicePixels="true">
  68. <ContentPresenter
  69. x:Name="contentPresenter"
  70. Margin="{TemplateBinding Padding}"
  71. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  72. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  73. Focusable="False"
  74. RecognizesAccessKey="True"
  75. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  76. </Border>
  77. <ControlTemplate.Triggers>
  78. <Trigger Property="IsMouseOver" Value="true">
  79. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.MouseOver.Background}" />
  80. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.MouseOver.Border}" />
  81. </Trigger>
  82. <Trigger Property="IsPressed" Value="true">
  83. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Pressed.Background}" />
  84. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Pressed.Border}" />
  85. </Trigger>
  86. <Trigger Property="IsEnabled" Value="false">
  87. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Disabled.Background}" />
  88. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Disabled.Border}" />
  89. <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{StaticResource Button.Disabled.Foreground}" />
  90. <Setter TargetName="contentPresenter" Property="Opacity" Value="0.5" />
  91. </Trigger>
  92. </ControlTemplate.Triggers>
  93. </ControlTemplate>
  94. </Setter.Value>
  95. </Setter>
  96. </Style>
  97. <!-- 只有内容的按钮(普通状态下,没有固定的边框和背景色) -->
  98. <!--<Setter Property="Background" Value="{StaticResource Button.Static.Background}" />
  99. <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}" />-->
  100. <Style x:Key="OnlyContentBtn" TargetType="{x:Type Button}">
  101. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
  102. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  103. <Setter Property="BorderThickness" Value="0" />
  104. <Setter Property="HorizontalContentAlignment" Value="Center" />
  105. <Setter Property="VerticalContentAlignment" Value="Center" />
  106. <Setter Property="Background" Value="Transparent" />
  107. <Setter Property="BorderBrush" Value="Transparent" />
  108. <Setter Property="Padding" Value="0" />
  109. <Setter Property="Width" Value="32" />
  110. <Setter Property="Height" Value="32" />
  111. <Setter Property="IsTabStop" Value="False" />
  112. <Setter Property="Template">
  113. <Setter.Value>
  114. <ControlTemplate TargetType="{x:Type Button}">
  115. <Border
  116. x:Name="border"
  117. Background="{TemplateBinding Background}"
  118. BorderBrush="{TemplateBinding BorderBrush}"
  119. BorderThickness="{TemplateBinding BorderThickness}"
  120. SnapsToDevicePixels="true">
  121. <ContentPresenter
  122. x:Name="contentPresenter"
  123. Margin="{TemplateBinding Padding}"
  124. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  125. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  126. Focusable="False"
  127. RecognizesAccessKey="True"
  128. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  129. </Border>
  130. <ControlTemplate.Triggers>
  131. <Trigger Property="IsMouseOver" Value="true">
  132. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.MouseOver.Background}" />
  133. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.MouseOver.Border}" />
  134. </Trigger>
  135. <Trigger Property="IsPressed" Value="true">
  136. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Pressed.Background}" />
  137. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Pressed.Border}" />
  138. </Trigger>
  139. <Trigger Property="IsEnabled" Value="false">
  140. <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{StaticResource Button.Disabled.Foreground}" />
  141. <Setter TargetName="contentPresenter" Property="Opacity" Value="0.5" />
  142. </Trigger>
  143. </ControlTemplate.Triggers>
  144. </ControlTemplate>
  145. </Setter.Value>
  146. </Setter>
  147. </Style>
  148. <!-- 阅读模式的按钮模板样式 -->
  149. <ControlTemplate x:Key="zoomout" TargetType="{x:Type ButtonBase}">
  150. <Border
  151. Name="border"
  152. Background="{TemplateBinding Panel.Background}"
  153. BorderBrush="{TemplateBinding Border.BorderBrush}"
  154. BorderThickness="{TemplateBinding Border.BorderThickness}"
  155. SnapsToDevicePixels="True">
  156. <Path
  157. Name="content"
  158. Width="16"
  159. Height="16"
  160. HorizontalAlignment="Center"
  161. VerticalAlignment="Center"
  162. Data="M6.5,0 C10.0898509,0 13,2.91014913 13,6.5 C13,8.1223907 12.4056075,9.60595359 11.4227096,10.7448016 L15.5,14.8210176 L14.8210176,15.5 L10.7448016,11.4227096 C9.60595359,12.4056075 8.1223907,13 6.5,13 C2.91014913,13 0,10.0898509 0,6.5 C0,2.91014913 2.91014913,0 6.5,0 Z M6.5,1 C3.46243388,1 1,3.46243388 1,6.5 C1,9.53756612 3.46243388,12 6.5,12 C9.53756612,12 12,9.53756612 12,6.5 C12,3.46243388 9.53756612,1 6.5,1 Z M10,6 L10,7 L3,7 L3,6 L10,6 Z"
  163. Fill="White" />
  164. </Border>
  165. <ControlTemplate.Triggers>
  166. <Trigger Property="Button.IsDefaulted" Value="True">
  167. <Setter TargetName="content" Property="Path.Fill" Value="White" />
  168. </Trigger>
  169. <Trigger Property="UIElement.IsMouseOver" Value="True">
  170. <Setter TargetName="content" Property="Path.Fill" Value="#B3FFFFFF" />
  171. </Trigger>
  172. <Trigger Property="ButtonBase.IsPressed" Value="True">
  173. <Setter TargetName="content" Property="Path.Fill" Value="#80FFFFFF" />
  174. </Trigger>
  175. </ControlTemplate.Triggers>
  176. </ControlTemplate>
  177. <ControlTemplate x:Key="zoomin" TargetType="{x:Type ButtonBase}">
  178. <Border
  179. Name="border"
  180. Background="{TemplateBinding Panel.Background}"
  181. BorderBrush="{TemplateBinding Border.BorderBrush}"
  182. BorderThickness="{TemplateBinding Border.BorderThickness}"
  183. SnapsToDevicePixels="True">
  184. <Path
  185. Name="content"
  186. Width="16"
  187. Height="16"
  188. HorizontalAlignment="Center"
  189. VerticalAlignment="Center"
  190. Data="M6.5,0 C10.0898509,0 13,2.91014913 13,6.5 C13,8.1223907 12.4056075,9.60595359 11.4227096,10.7448016 L15.5,14.8210176 L14.8210176,15.5 L10.7448016,11.4227096 C9.60595359,12.4056075 8.1223907,13 6.5,13 C2.91014913,13 0,10.0898509 0,6.5 C0,2.91014913 2.91014913,0 6.5,0 Z M6.5,1 C3.46243388,1 1,3.46243388 1,6.5 C1,9.53756612 3.46243388,12 6.5,12 C9.53756612,12 12,9.53756612 12,6.5 C12,3.46243388 9.53756612,1 6.5,1 Z M7,3 L7,6 L10,6 L10,7 L7,7 L7,10 L6,10 L6,7 L3,7 L3,6 L6,6 L6,3 L7,3 Z"
  191. Fill="White" />
  192. </Border>
  193. <ControlTemplate.Triggers>
  194. <Trigger Property="Button.IsDefaulted" Value="True">
  195. <Setter TargetName="content" Property="Path.Fill" Value="White" />
  196. </Trigger>
  197. <Trigger Property="UIElement.IsMouseOver" Value="True">
  198. <Setter TargetName="content" Property="Path.Fill" Value="#B3FFFFFF" />
  199. </Trigger>
  200. <Trigger Property="ButtonBase.IsPressed" Value="True">
  201. <Setter TargetName="content" Property="Path.Fill" Value="#80FFFFFF" />
  202. </Trigger>
  203. </ControlTemplate.Triggers>
  204. </ControlTemplate>
  205. <ControlTemplate x:Key="prepage" TargetType="{x:Type ButtonBase}">
  206. <Border
  207. Name="border"
  208. Background="{TemplateBinding Panel.Background}"
  209. BorderBrush="{TemplateBinding Border.BorderBrush}"
  210. BorderThickness="0"
  211. SnapsToDevicePixels="True">
  212. <Polygon
  213. Name="content"
  214. Width="16"
  215. Height="16"
  216. HorizontalAlignment="Center"
  217. VerticalAlignment="Center"
  218. Fill="White"
  219. Points="10.2999705 2.5 11 3.22644971 6.39995321 8 11 12.7735503 10.2999705 13.5 5 8" />
  220. </Border>
  221. <ControlTemplate.Triggers>
  222. <Trigger Property="Button.IsDefaulted" Value="True">
  223. <Setter TargetName="content" Property="Path.Fill" Value="White" />
  224. </Trigger>
  225. <Trigger Property="UIElement.IsMouseOver" Value="True">
  226. <Setter TargetName="content" Property="Path.Fill" Value="#B3FFFFFF" />
  227. </Trigger>
  228. <Trigger Property="ButtonBase.IsPressed" Value="True">
  229. <Setter TargetName="content" Property="Path.Fill" Value="#80FFFFFF" />
  230. </Trigger>
  231. </ControlTemplate.Triggers>
  232. </ControlTemplate>
  233. <ControlTemplate x:Key="nextpage" TargetType="{x:Type ButtonBase}">
  234. <Border
  235. Name="border"
  236. Background="{TemplateBinding Panel.Background}"
  237. BorderBrush="{TemplateBinding Border.BorderBrush}"
  238. BorderThickness="0"
  239. SnapsToDevicePixels="True">
  240. <Polygon
  241. x:Name="content"
  242. Width="16"
  243. Height="16"
  244. Fill="White"
  245. Points="10.2999705 2.5 11 3.22644971 6.39995321 8 11 12.7735503 10.2999705 13.5 5 8">
  246. <Polygon.RenderTransform>
  247. <TransformGroup>
  248. <TranslateTransform X="-8" Y="8" />
  249. <ScaleTransform ScaleX="-1" ScaleY="1" />
  250. <TranslateTransform X="8" Y="-8" />
  251. </TransformGroup>
  252. </Polygon.RenderTransform>
  253. </Polygon>
  254. </Border>
  255. <ControlTemplate.Triggers>
  256. <Trigger Property="Button.IsDefaulted" Value="True">
  257. <Setter TargetName="content" Property="Path.Fill" Value="White" />
  258. </Trigger>
  259. <Trigger Property="UIElement.IsMouseOver" Value="True">
  260. <Setter TargetName="content" Property="Path.Fill" Value="#B3FFFFFF" />
  261. </Trigger>
  262. <Trigger Property="ButtonBase.IsPressed" Value="True">
  263. <Setter TargetName="content" Property="Path.Fill" Value="#80FFFFFF" />
  264. </Trigger>
  265. </ControlTemplate.Triggers>
  266. </ControlTemplate>
  267. <!-- ControlTemplate For Button With Corner 4 -->
  268. <ControlTemplate x:Key="ButtonControlTemplateWithCorner4" TargetType="{x:Type Button}">
  269. <Border
  270. x:Name="border"
  271. Background="{TemplateBinding Background}"
  272. BorderBrush="{TemplateBinding BorderBrush}"
  273. BorderThickness="{TemplateBinding BorderThickness}"
  274. CornerRadius="{StaticResource radius.base.m}"
  275. SnapsToDevicePixels="true">
  276. <ContentPresenter
  277. x:Name="contentPresenter"
  278. Margin="{TemplateBinding Padding}"
  279. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  280. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  281. Focusable="False"
  282. RecognizesAccessKey="True"
  283. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  284. </Border>
  285. </ControlTemplate>
  286. <ControlTemplate x:Key="ButtonControlTemplateWithCorner20" TargetType="{x:Type Button}">
  287. <Border
  288. x:Name="border"
  289. Background="{TemplateBinding Background}"
  290. BorderBrush="{TemplateBinding BorderBrush}"
  291. BorderThickness="{TemplateBinding BorderThickness}"
  292. CornerRadius="{StaticResource radius.fullround-btn.l}"
  293. SnapsToDevicePixels="true">
  294. <ContentPresenter
  295. x:Name="contentPresenter"
  296. Margin="{TemplateBinding Padding}"
  297. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  298. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  299. Focusable="False"
  300. RecognizesAccessKey="True"
  301. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  302. </Border>
  303. </ControlTemplate>
  304. <!--
  305. Style for Btn.cta
  306. 样式里仅设置了背景色和文字颜色变化,字体大小和控件宽度需要调用时设置
  307. -->
  308. <Style x:Key="Btn.cta" TargetType="{x:Type Button}">
  309. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  310. <Setter Property="Background" Value="{StaticResource color.btn.cta.bg.norm}" />
  311. <Setter Property="BorderBrush" Value="{StaticResource color.btn.cta.bg.norm}" />
  312. <Setter Property="Foreground" Value="{StaticResource color.btn.cta.text.def}" />
  313. <Setter Property="FontFamily" Value="Segoe UI" />
  314. <Setter Property="FontWeight" Value="Regular" />
  315. <Setter Property="BorderThickness" Value="0" />
  316. <Setter Property="HorizontalContentAlignment" Value="Center" />
  317. <Setter Property="VerticalContentAlignment" Value="Center" />
  318. <Setter Property="Padding" Value="1" />
  319. <Setter Property="Template" Value="{StaticResource ButtonControlTemplateWithCorner4}" />
  320. <Style.Triggers>
  321. <Trigger Property="IsDefaulted" Value="true">
  322. <Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
  323. </Trigger>
  324. <Trigger Property="IsMouseOver" Value="true">
  325. <Setter Property="Background" Value="{StaticResource color.btn.cta.bg.hov}" />
  326. <Setter Property="BorderBrush" Value="{StaticResource color.btn.cta.bg.hov}" />
  327. </Trigger>
  328. <Trigger Property="IsPressed" Value="true">
  329. <Setter Property="Background" Value="{StaticResource color.btn.cta.bg.act}" />
  330. <Setter Property="BorderBrush" Value="{StaticResource color.btn.cta.bg.act}" />
  331. </Trigger>
  332. <Trigger Property="IsEnabled" Value="false">
  333. <Setter Property="Background" Value="{StaticResource color.btn.cta.bg.dis}" />
  334. <Setter Property="BorderBrush" Value="{StaticResource color.btn.cta.bg.dis}" />
  335. <Setter Property="Foreground" Value="{StaticResource color.btn.cta.text.dis}" />
  336. </Trigger>
  337. </Style.Triggers>
  338. </Style>
  339. <!-- style for Btn.Brand -->
  340. <Style
  341. x:Key="btn.brand"
  342. BasedOn="{StaticResource Btn.cta}"
  343. TargetType="{x:Type Button}">
  344. <Setter Property="Background" Value="{StaticResource color.btn.brand.bg.norm}" />
  345. <Setter Property="Foreground" Value="{StaticResource color.btn.brand.text.def}" />
  346. <Style.Triggers>
  347. <Trigger Property="IsDefaulted" Value="true">
  348. <Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
  349. </Trigger>
  350. <Trigger Property="IsMouseOver" Value="true">
  351. <Setter Property="Background" Value="{StaticResource color.btn.brand.bg.hov}" />
  352. <Setter Property="BorderBrush" Value="{StaticResource color.btn.brand.bg.hov}" />
  353. </Trigger>
  354. <Trigger Property="IsPressed" Value="true">
  355. <Setter Property="Background" Value="{StaticResource color.btn.brand.bg.act}" />
  356. <Setter Property="BorderBrush" Value="{StaticResource color.btn.brand.bg.act}" />
  357. </Trigger>
  358. <Trigger Property="IsEnabled" Value="false">
  359. <Setter Property="Background" Value="{StaticResource color.btn.brand.bg.dis}" />
  360. <Setter Property="BorderBrush" Value="{StaticResource color.btn.brand.bg.dis}" />
  361. <Setter Property="Foreground" Value="{StaticResource color.btn.brand.text.dis}" />
  362. </Trigger>
  363. </Style.Triggers>
  364. </Style>
  365. <!-- style for Btn.Sec -->
  366. <Style
  367. x:Key="btn.sec"
  368. BasedOn="{StaticResource Btn.cta}"
  369. TargetType="{x:Type Button}">
  370. <Setter Property="Background" Value="{StaticResource color.btn.sec.bg.norm}" />
  371. <Setter Property="Foreground" Value="{StaticResource color.btn.sec.text.def}" />
  372. <Setter Property="BorderBrush" Value="{StaticResource color.btn.sec.border-color}" />
  373. <Setter Property="BorderThickness" Value="{StaticResource border-width.1}" />
  374. <Style.Triggers>
  375. <Trigger Property="IsDefaulted" Value="true">
  376. <Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
  377. </Trigger>
  378. <Trigger Property="IsMouseOver" Value="true">
  379. <Setter Property="Background" Value="{StaticResource color.btn.sec.bg.hov}" />
  380. </Trigger>
  381. <Trigger Property="IsPressed" Value="true">
  382. <Setter Property="Background" Value="{StaticResource color.btn.sec.bg.act}" />
  383. </Trigger>
  384. <Trigger Property="IsEnabled" Value="false">
  385. <Setter Property="Background" Value="{StaticResource color.btn.sec.bg.dis}" />
  386. <Setter Property="Foreground" Value="{StaticResource color.btn.sec.text.dis}" />
  387. </Trigger>
  388. </Style.Triggers>
  389. </Style>
  390. <Style
  391. x:Key="btn.sec-icon"
  392. BasedOn="{StaticResource btn.sec}"
  393. TargetType="{x:Type Button}" />
  394. <Style
  395. x:Key="btn.link"
  396. BasedOn="{StaticResource Btn.cta}"
  397. TargetType="{x:Type Button}">
  398. <Setter Property="Background" Value="Transparent" />
  399. <Setter Property="Foreground" Value="{StaticResource color.btn.link.text.norm}" />
  400. <Setter Property="BorderThickness" Value="0" />
  401. <Style.Triggers>
  402. <Trigger Property="IsMouseOver" Value="true">
  403. <Setter Property="Foreground" Value="{StaticResource color.btn.link.text.hov}" />
  404. </Trigger>
  405. <Trigger Property="IsPressed" Value="true">
  406. <Setter Property="Foreground" Value="{StaticResource color.btn.link.text.act}" />
  407. </Trigger>
  408. <Trigger Property="IsEnabled" Value="false">
  409. <Setter Property="Foreground" Value="{StaticResource color.btn.link.text.dis}" />
  410. </Trigger>
  411. </Style.Triggers>
  412. </Style>
  413. <Style
  414. x:Key="btn.ghost"
  415. BasedOn="{StaticResource Btn.cta}"
  416. TargetType="{x:Type Button}">
  417. <Setter Property="Background" Value="Transparent" />
  418. <Setter Property="BorderBrush" Value="{StaticResource color.btn.ghost.border.norm}" />
  419. <Setter Property="Foreground" Value="{StaticResource color.btn.ghost.text.norm}" />
  420. <Setter Property="BorderThickness" Value="{StaticResource border-width.1}" />
  421. <Style.Triggers>
  422. <Trigger Property="IsDefaulted" Value="true">
  423. <Setter Property="BorderBrush" Value="{StaticResource color.btn.ghost.border.norm}" />
  424. </Trigger>
  425. <Trigger Property="IsMouseOver" Value="true">
  426. <Setter Property="BorderBrush" Value="{StaticResource color.btn.ghost.border.hov}" />
  427. </Trigger>
  428. <Trigger Property="IsPressed" Value="true">
  429. <Setter Property="BorderBrush" Value="{StaticResource color.btn.ghost.border.act}" />
  430. </Trigger>
  431. <Trigger Property="IsEnabled" Value="false">
  432. <Setter Property="BorderBrush" Value="{StaticResource color.btn.ghost.border.dis}" />
  433. <Setter Property="Foreground" Value="{StaticResource color.btn.ghost.text.dis}" />
  434. </Trigger>
  435. </Style.Triggers>
  436. </Style>
  437. <Style
  438. x:Key="btn.icon-fill"
  439. BasedOn="{StaticResource Btn.cta}"
  440. TargetType="{x:Type Button}">
  441. <Setter Property="Background" Value="{StaticResource color.btn.icon-fill.bg.norm}" />
  442. <Setter Property="BorderThickness" Value="0" />
  443. <Style.Triggers>
  444. <Trigger Property="IsDefaulted" Value="true">
  445. <Setter Property="Background" Value="{StaticResource color.btn.icon-fill.bg.norm}" />
  446. </Trigger>
  447. <Trigger Property="IsMouseOver" Value="true">
  448. <Setter Property="Background" Value="{StaticResource color.btn.icon-fill.bg.hov}" />
  449. </Trigger>
  450. <Trigger Property="IsPressed" Value="true">
  451. <Setter Property="Background" Value="{StaticResource color.btn.icon-fill.bg.act}" />
  452. </Trigger>
  453. <Trigger Property="IsEnabled" Value="false">
  454. <Setter Property="Background" Value="{StaticResource color.btn.icon-fill.bg.dis}" />
  455. </Trigger>
  456. </Style.Triggers>
  457. </Style>
  458. <Style
  459. x:Key="btn.upgrade"
  460. BasedOn="{StaticResource Btn.cta}"
  461. TargetType="{x:Type Button}">
  462. <Setter Property="Template" Value="{StaticResource ButtonControlTemplateWithCorner20}" />
  463. <Setter Property="Background" Value="{StaticResource color.btn.upgrade.bg.norm}" />
  464. <Setter Property="Foreground" Value="{StaticResource color.btn.upgrade.text.def}" />
  465. <Setter Property="BorderThickness" Value="0" />
  466. <Style.Triggers>
  467. <Trigger Property="IsDefaulted" Value="true">
  468. <Setter Property="Background" Value="{StaticResource color.btn.upgrade.bg.norm}" />
  469. </Trigger>
  470. <Trigger Property="IsMouseOver" Value="true">
  471. <Setter Property="Background" Value="{StaticResource color.btn.upgrade.bg.hov}" />
  472. </Trigger>
  473. <Trigger Property="IsPressed" Value="true">
  474. <Setter Property="Background" Value="{StaticResource color.btn.upgrade.bg.act}" />
  475. </Trigger>
  476. <Trigger Property="IsEnabled" Value="false">
  477. <Setter Property="Background" Value="{StaticResource color.btn.upgrade.bg.dis}" />
  478. <Setter Property="Foreground" Value="{StaticResource color.btn.upgrade.text.dis}" />
  479. </Trigger>
  480. </Style.Triggers>
  481. </Style>
  482. </ResourceDictionary>