ButtonStyle.xaml 25 KB

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