ButtonStyle.xaml 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646
  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 x:Key="TitleBarBtn" TargetType="{x:Type Button}">
  20. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
  21. <Setter Property="Background" Value="{StaticResource Button.Static.Background}" />
  22. <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}" />
  23. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  24. <Setter Property="BorderThickness" Value="0" />
  25. <Setter Property="HorizontalContentAlignment" Value="Center" />
  26. <Setter Property="VerticalContentAlignment" Value="Center" />
  27. <Setter Property="Padding" Value="0" />
  28. <Setter Property="Width" Value="32" />
  29. <Setter Property="Height" Value="32" />
  30. <Setter Property="IsTabStop" Value="False" />
  31. <Setter Property="Template">
  32. <Setter.Value>
  33. <ControlTemplate TargetType="{x:Type Button}">
  34. <Border
  35. x:Name="border"
  36. Background="{TemplateBinding Background}"
  37. BorderBrush="{TemplateBinding BorderBrush}"
  38. BorderThickness="{TemplateBinding BorderThickness}"
  39. SnapsToDevicePixels="true">
  40. <ContentPresenter
  41. x:Name="contentPresenter"
  42. Margin="{TemplateBinding Padding}"
  43. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  44. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  45. Focusable="False"
  46. RecognizesAccessKey="True"
  47. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  48. </Border>
  49. <ControlTemplate.Triggers>
  50. <Trigger Property="IsMouseOver" Value="true">
  51. <Setter TargetName="border" Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
  52. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.MouseOver.Border}" />
  53. </Trigger>
  54. <Trigger Property="IsPressed" Value="true">
  55. <Setter TargetName="border" Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
  56. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Pressed.Border}" />
  57. </Trigger>
  58. <Trigger Property="IsEnabled" Value="false">
  59. <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{StaticResource Button.Disabled.Foreground}" />
  60. <Setter TargetName="contentPresenter" Property="Opacity" Value="0.5" />
  61. </Trigger>
  62. </ControlTemplate.Triggers>
  63. </ControlTemplate>
  64. </Setter.Value>
  65. </Setter>
  66. </Style>
  67. <Style
  68. x:Key="PageEditToolBtn"
  69. BasedOn="{StaticResource TitleBarBtn}"
  70. TargetType="{x:Type Button}">
  71. <Setter Property="Background" Value="Transparent" />
  72. <Setter Property="BorderBrush" Value="Transparent" />
  73. <Setter Property="Width" Value="auto" />
  74. <Setter Property="Height" Value="40" />
  75. <Setter Property="Template">
  76. <Setter.Value>
  77. <ControlTemplate TargetType="{x:Type Button}">
  78. <Border
  79. x:Name="border"
  80. Background="{TemplateBinding Background}"
  81. BorderBrush="{TemplateBinding BorderBrush}"
  82. BorderThickness="{TemplateBinding BorderThickness}"
  83. SnapsToDevicePixels="true">
  84. <ContentPresenter
  85. x:Name="contentPresenter"
  86. Margin="{TemplateBinding Padding}"
  87. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  88. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  89. Focusable="False"
  90. RecognizesAccessKey="True"
  91. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  92. </Border>
  93. <ControlTemplate.Triggers>
  94. <Trigger Property="IsMouseOver" Value="true">
  95. <Setter TargetName="border" Property="Background" Value="#1A000000" />
  96. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.MouseOver.Border}" />
  97. </Trigger>
  98. <Trigger Property="IsPressed" Value="true">
  99. <Setter TargetName="border" Property="Background" Value="#26000000" />
  100. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Pressed.Border}" />
  101. </Trigger>
  102. <Trigger Property="IsEnabled" Value="false">
  103. <Setter TargetName="border" Property="Background" Value="Transparent" />
  104. <Setter TargetName="border" Property="BorderBrush" Value="#33000000" />
  105. <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="#FF999999" />
  106. <Setter TargetName="contentPresenter" Property="Opacity" Value="0.4" />
  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. <Setter Property="Background" Value="Transparent" />
  487. </Trigger>
  488. <Trigger Property="IsPressed" Value="true">
  489. <Setter Property="Foreground" Value="{StaticResource color.btn.link.text.act}" />
  490. <Setter Property="Background" Value="Transparent" />
  491. </Trigger>
  492. <Trigger Property="IsEnabled" Value="false">
  493. <Setter Property="Foreground" Value="{StaticResource color.btn.link.text.dis}" />
  494. <Setter Property="Background" Value="Transparent" />
  495. </Trigger>
  496. </Style.Triggers>
  497. </Style>
  498. <!-- Design Token Btn.Ghost -->
  499. <Style
  500. x:Key="btn.ghost"
  501. BasedOn="{StaticResource Btn.cta}"
  502. TargetType="{x:Type Button}">
  503. <Setter Property="Background" Value="Transparent" />
  504. <Setter Property="BorderBrush" Value="{StaticResource color.btn.ghost.border.norm}" />
  505. <Setter Property="Foreground" Value="{StaticResource color.btn.ghost.text.norm}" />
  506. <Setter Property="BorderThickness" Value="{StaticResource border-width.1}" />
  507. <Style.Triggers>
  508. <Trigger Property="IsDefaulted" Value="true">
  509. <Setter Property="BorderBrush" Value="{StaticResource color.btn.ghost.border.norm}" />
  510. </Trigger>
  511. <Trigger Property="IsMouseOver" Value="true">
  512. <Setter Property="BorderBrush" Value="{StaticResource color.btn.ghost.border.hov}" />
  513. </Trigger>
  514. <Trigger Property="IsPressed" Value="true">
  515. <Setter Property="BorderBrush" Value="{StaticResource color.btn.ghost.border.act}" />
  516. </Trigger>
  517. <Trigger Property="IsEnabled" Value="false">
  518. <Setter Property="BorderBrush" Value="{StaticResource color.btn.ghost.border.dis}" />
  519. <Setter Property="Foreground" Value="{StaticResource color.btn.ghost.text.dis}" />
  520. </Trigger>
  521. </Style.Triggers>
  522. </Style>
  523. <!-- Design Token Btn.icon-Fill -->
  524. <Style
  525. x:Key="btn.icon-fill"
  526. BasedOn="{StaticResource Btn.cta}"
  527. TargetType="{x:Type Button}">
  528. <Setter Property="Background" Value="{StaticResource color.btn.icon-fill.bg.norm}" />
  529. <Setter Property="BorderThickness" Value="0" />
  530. <Style.Triggers>
  531. <Trigger Property="IsDefaulted" Value="true">
  532. <Setter Property="Background" Value="{StaticResource color.btn.icon-fill.bg.norm}" />
  533. </Trigger>
  534. <Trigger Property="IsMouseOver" Value="true">
  535. <Setter Property="Background" Value="{StaticResource color.btn.icon-fill.bg.hov}" />
  536. </Trigger>
  537. <Trigger Property="IsPressed" Value="true">
  538. <Setter Property="Background" Value="{StaticResource color.btn.icon-fill.bg.act}" />
  539. </Trigger>
  540. <Trigger Property="IsEnabled" Value="false">
  541. <Setter Property="Background" Value="{StaticResource color.btn.icon-fill.bg.dis}" />
  542. </Trigger>
  543. </Style.Triggers>
  544. </Style>
  545. <!-- Design Token Btn.Upgrade -->
  546. <Style
  547. x:Key="btn.upgrade"
  548. BasedOn="{StaticResource Btn.cta}"
  549. TargetType="{x:Type Button}">
  550. <Setter Property="Template" Value="{StaticResource ButtonControlTemplateWithCorner20}" />
  551. <Setter Property="Background" Value="{StaticResource color.btn.upgrade.bg.norm}" />
  552. <Setter Property="Foreground" Value="{StaticResource color.btn.upgrade.text.def}" />
  553. <Setter Property="BorderThickness" Value="0" />
  554. <Style.Triggers>
  555. <Trigger Property="IsDefaulted" Value="true">
  556. <Setter Property="Background" Value="{StaticResource color.btn.upgrade.bg.norm}" />
  557. </Trigger>
  558. <Trigger Property="IsMouseOver" Value="true">
  559. <Setter Property="Background" Value="{StaticResource color.btn.upgrade.bg.hov}" />
  560. </Trigger>
  561. <Trigger Property="IsPressed" Value="true">
  562. <Setter Property="Background" Value="{StaticResource color.btn.upgrade.bg.act}" />
  563. </Trigger>
  564. <Trigger Property="IsEnabled" Value="false">
  565. <Setter Property="Background" Value="{StaticResource color.btn.upgrade.bg.dis}" />
  566. <Setter Property="Foreground" Value="{StaticResource color.btn.upgrade.text.dis}" />
  567. </Trigger>
  568. </Style.Triggers>
  569. </Style>
  570. <!-- Design Token SubToolBar Style -->
  571. <Style
  572. x:Key="subToolBar"
  573. BasedOn="{StaticResource Btn.cta}"
  574. TargetType="{x:Type Button}">
  575. <Setter Property="Template" Value="{StaticResource ButtonControlTemplateWithCorner4}" />
  576. <Setter Property="Background" Value="Transparent" />
  577. <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
  578. <Setter Property="BorderThickness" Value="0" />
  579. <Setter Property="Width" Value="28" />
  580. <Setter Property="Height" Value="28" />
  581. <Style.Triggers>
  582. <Trigger Property="IsDefaulted" Value="true">
  583. <Setter Property="Background" Value="Transparent" />
  584. </Trigger>
  585. <Trigger Property="IsMouseOver" Value="true">
  586. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  587. </Trigger>
  588. <Trigger Property="IsPressed" Value="true">
  589. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  590. </Trigger>
  591. <Trigger Property="IsEnabled" Value="false">
  592. <Setter Property="Background" Value="Transparent" />
  593. <Setter Property="Opacity" Value="0.6" />
  594. <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.dis}" />
  595. </Trigger>
  596. </Style.Triggers>
  597. </Style>
  598. <!-- Design Token Pagination.Selector style -->
  599. <Style
  600. x:Key="btn.selector"
  601. BasedOn="{StaticResource Btn.cta}"
  602. TargetType="{x:Type Button}">
  603. <Setter Property="Template" Value="{StaticResource ButtonControlTemplateWithCorner4}" />
  604. <Setter Property="Background" Value="Transparent" />
  605. <Setter Property="Foreground" Value="{StaticResource color.icon.base.neutral.norm.lv1}" />
  606. <Setter Property="BorderBrush" Value="{StaticResource color.field.border.norm}" />
  607. <Setter Property="BorderThickness" Value="1" />
  608. <Setter Property="Width" Value="24" />
  609. <Setter Property="Height" Value="24" />
  610. <Style.Triggers>
  611. <Trigger Property="IsDefaulted" Value="true">
  612. <Setter Property="Background" Value="Transparent" />
  613. </Trigger>
  614. <Trigger Property="IsMouseOver" Value="true">
  615. <Setter Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
  616. <Setter Property="BorderBrush" Value="{StaticResource color.field.border.norm}" />
  617. </Trigger>
  618. <Trigger Property="IsPressed" Value="true">
  619. <Setter Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
  620. <Setter Property="BorderBrush" Value="{StaticResource color.field.border.norm}" />
  621. </Trigger>
  622. <Trigger Property="IsEnabled" Value="false">
  623. <Setter Property="Background" Value="{StaticResource color.field.border.dis}" />
  624. <Setter Property="BorderBrush" Value="{StaticResource color.field.border.norm}" />
  625. </Trigger>
  626. </Style.Triggers>
  627. </Style>
  628. </ResourceDictionary>