ButtonStyle.xaml 31 KB

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