CustomBtnStyle.xaml 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  1. <ResourceDictionary
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:customControl="clr-namespace:PDF_Master.CustomControl">
  5. <SolidColorBrush x:Key="Common.Border" Color="#FF273C62" />
  6. <SolidColorBrush x:Key="Common.ForGround.Blue" Color="#FF273C62" />
  7. <SolidColorBrush x:Key="Common.ForGround.Black" Color="#FF000000" />
  8. <SolidColorBrush x:Key="Button.Static.Background" Color="#273C62" />
  9. <SolidColorBrush x:Key="Button.Static.Border" Color="#FF273C62" />
  10. <SolidColorBrush x:Key="Button.MouseOver.Background" Color="#1A477EDE" />
  11. <SolidColorBrush x:Key="Button.MouseOver.Border" Color="#273C62" />
  12. <SolidColorBrush x:Key="Button.Pressed.Background" Color="#29477EDE" />
  13. <SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B" />
  14. <SolidColorBrush x:Key="Button.Disabled.Background" Color="#273C62" />
  15. <SolidColorBrush x:Key="Button.Disabled.Border" Color="#273C62" />
  16. <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#26FFFFFF" />
  17. <SolidColorBrush x:Key="CloseButton.MouseOver.Foreground" Color="Red" />
  18. <SolidColorBrush x:Key="Disabled.ForeGround" Color="#FFE2E3E6" />
  19. <SolidColorBrush x:Key="BlueBtn.Mouseover.Background" Color="#31538D" />
  20. <SolidColorBrush x:Key="BlueBtn.Pressed.Background" Color="#1B2944" />
  21. <SolidColorBrush x:Key="Redact.Background" Color="#477EDE" />
  22. <Style x:Key="ToggleBtnScreenAnnotationStyle" TargetType="customControl:CustomIconToggleBtn">
  23. <Setter Property="Background" Value="{StaticResource Button.Static.Background}" />
  24. <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}" />
  25. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  26. <Setter Property="BorderThickness" Value="0" />
  27. <Setter Property="HorizontalContentAlignment" Value="Center" />
  28. <Setter Property="Margin" Value="4" />
  29. <Setter Property="Height" Value="40" />
  30. <Setter Property="Template">
  31. <Setter.Value>
  32. <ControlTemplate TargetType="customControl:CustomIconToggleBtn">
  33. <Border
  34. x:Name="border"
  35. Background="{TemplateBinding Background}"
  36. BorderBrush="Transparent"
  37. CornerRadius="4"
  38. SnapsToDevicePixels="true">
  39. <Grid
  40. Width="40"
  41. Height="40"
  42. HorizontalAlignment="Center"
  43. VerticalAlignment="Center">
  44. <ContentPresenter
  45. x:Name="contentPresenter"
  46. Margin="0"
  47. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  48. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  49. Focusable="False"
  50. RecognizesAccessKey="True"
  51. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  52. </Grid>
  53. </Border>
  54. <ControlTemplate.Triggers>
  55. <Trigger Property="IsMouseOver" Value="True">
  56. <Setter TargetName="border" Property="Background" Value="#e2e3e5" />
  57. <Setter TargetName="border" Property="BorderBrush" Value="#CED0D4" />
  58. </Trigger>
  59. <Trigger Property="IsPressed" Value="True">
  60. <Setter TargetName="border" Property="Background" Value="#e2e3e5" />
  61. <Setter TargetName="border" Property="BorderBrush" Value="#CED0D4" />
  62. </Trigger>
  63. </ControlTemplate.Triggers>
  64. </ControlTemplate>
  65. </Setter.Value>
  66. </Setter>
  67. <Style.Triggers>
  68. <Trigger Property="IsChecked" Value="True">
  69. <Setter Property="Background" Value="#e2e3e5" />
  70. <Setter Property="BorderBrush" Value="#CED0D4" />
  71. </Trigger>
  72. <Trigger Property="IsChecked" Value="False">
  73. <Setter Property="Background" Value="Transparent" />
  74. <Setter Property="BorderBrush" Value="Transparent" />
  75. </Trigger>
  76. <Trigger Property="IsChecked" Value="{x:Null}">
  77. <Setter Property="Background" Value="Transparent" />
  78. </Trigger>
  79. </Style.Triggers>
  80. </Style>
  81. <Style x:Key="ToggleBtnAnnotationStyle" TargetType="customControl:CustomIconToggleBtn">
  82. <Setter Property="Background" Value="Transparent" />
  83. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  84. <Setter Property="BorderThickness" Value="0" />
  85. <Setter Property="HorizontalContentAlignment" Value="Left" />
  86. <Setter Property="VerticalContentAlignment" Value="Top" />
  87. <Setter Property="Height" Value="25" />
  88. <Setter Property="Template">
  89. <Setter.Value>
  90. <ControlTemplate TargetType="customControl:CustomIconToggleBtn">
  91. <Border
  92. x:Name="border"
  93. Background="{TemplateBinding Background}"
  94. BorderBrush="{TemplateBinding BorderBrush}"
  95. BorderThickness="{TemplateBinding BorderThickness}"
  96. SnapsToDevicePixels="true">
  97. <Grid>
  98. <Grid
  99. Width="25"
  100. Height="25"
  101. HorizontalAlignment="Left"
  102. VerticalAlignment="Top">
  103. <Image
  104. x:Name="ImageIcon"
  105. Width="25"
  106. Height="25"
  107. Source="{Binding Icon, RelativeSource={RelativeSource Mode=TemplatedParent}}"
  108. Visibility="Collapsed" />
  109. </Grid>
  110. <ContentPresenter
  111. x:Name="contentPresenter"
  112. Margin="{TemplateBinding Padding}"
  113. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  114. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  115. Focusable="False"
  116. RecognizesAccessKey="True"
  117. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  118. </Grid>
  119. </Border>
  120. </ControlTemplate>
  121. </Setter.Value>
  122. </Setter>
  123. </Style>
  124. <Style x:Key="ToggleBtnViewModeStyle" TargetType="customControl:CustomIconToggleBtn">
  125. <Setter Property="Background" Value="{StaticResource Button.Static.Background}" />
  126. <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}" />
  127. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  128. <Setter Property="BorderThickness" Value="0" />
  129. <Setter Property="HorizontalContentAlignment" Value="Center" />
  130. <Setter Property="Height" Value="40" />
  131. <Setter Property="Margin" Value="4,0,4,0" />
  132. <Setter Property="Template">
  133. <Setter.Value>
  134. <ControlTemplate TargetType="customControl:CustomIconToggleBtn">
  135. <Border
  136. x:Name="border"
  137. Background="{TemplateBinding Background}"
  138. BorderBrush="{TemplateBinding BorderBrush}"
  139. BorderThickness="{TemplateBinding BorderThickness}"
  140. SnapsToDevicePixels="true">
  141. <Grid>
  142. <Grid
  143. Width="40"
  144. Height="40"
  145. HorizontalAlignment="Center"
  146. VerticalAlignment="Center">
  147. <Image
  148. x:Name="ImageIcon"
  149. Width="20"
  150. Height="20"
  151. Source="{Binding Icon, RelativeSource={RelativeSource Mode=TemplatedParent}}"
  152. Visibility="Collapsed" />
  153. </Grid>
  154. <ContentPresenter
  155. x:Name="contentPresenter"
  156. Margin="{TemplateBinding Padding}"
  157. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  158. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  159. Focusable="False"
  160. RecognizesAccessKey="True"
  161. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  162. </Grid>
  163. </Border>
  164. <ControlTemplate.Triggers>
  165. <Trigger Property="IsMouseOver" Value="true">
  166. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.MouseOver.Background}" />
  167. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.MouseOver.Border}" />
  168. </Trigger>
  169. <Trigger Property="IsPressed" Value="true">
  170. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Pressed.Background}" />
  171. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Pressed.Border}" />
  172. </Trigger>
  173. <!--<Trigger Property="IsEnabled" Value="false">
  174. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Disabled.Background}" />
  175. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Disabled.Border}" />
  176. <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{StaticResource Button.Disabled.Foreground}" />
  177. <Setter TargetName="contentPresenter" Property="Opacity" Value="0.5" />
  178. </Trigger>-->
  179. </ControlTemplate.Triggers>
  180. </ControlTemplate>
  181. </Setter.Value>
  182. </Setter>
  183. <Style.Triggers>
  184. <Trigger Property="IsChecked" Value="True">
  185. <Setter Property="Background" Value="{StaticResource Button.Pressed.Background}" />
  186. </Trigger>
  187. <Trigger Property="IsChecked" Value="False">
  188. <Setter Property="Background" Value="Transparent" />
  189. </Trigger>
  190. <Trigger Property="IsChecked" Value="{x:Null}">
  191. <Setter Property="Background" Value="Transparent" />
  192. </Trigger>
  193. </Style.Triggers>
  194. </Style>
  195. <SolidColorBrush
  196. x:Key="Button.Select.Background"
  197. Opacity="0.1"
  198. Color="#1770F4" />
  199. <SolidColorBrush x:Key="Button.SelectForeground.Background" Color="#1770F4" />
  200. <Style x:Key="ToggleBtnSelectStyle" TargetType="customControl:CustomIconToggleBtn">
  201. <Setter Property="Background" Value="{StaticResource Button.Static.Background}" />
  202. <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}" />
  203. <Setter Property="Foreground" Value="#8F96A7" />
  204. <Setter Property="BorderThickness" Value="0" />
  205. <Setter Property="HorizontalContentAlignment" Value="Center" />
  206. <Setter Property="Height" Value="40" />
  207. <Setter Property="Margin" Value="4,0,4,0" />
  208. <Setter Property="Template">
  209. <Setter.Value>
  210. <ControlTemplate TargetType="customControl:CustomIconToggleBtn">
  211. <Border
  212. x:Name="border"
  213. Background="{TemplateBinding Background}"
  214. BorderBrush="{TemplateBinding BorderBrush}"
  215. BorderThickness="{TemplateBinding BorderThickness}"
  216. CornerRadius="4"
  217. SnapsToDevicePixels="true">
  218. <Grid>
  219. <Grid
  220. Width="40"
  221. Height="40"
  222. HorizontalAlignment="Center"
  223. VerticalAlignment="Center">
  224. <Image
  225. x:Name="ImageIcon"
  226. Width="20"
  227. Height="20"
  228. Source="{Binding Icon, RelativeSource={RelativeSource Mode=TemplatedParent}}"
  229. Visibility="Collapsed" />
  230. </Grid>
  231. <ContentPresenter
  232. x:Name="contentPresenter"
  233. Margin="{TemplateBinding Padding}"
  234. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  235. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  236. Focusable="False"
  237. RecognizesAccessKey="True"
  238. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  239. </Grid>
  240. </Border>
  241. <ControlTemplate.Triggers>
  242. <Trigger Property="IsMouseOver" Value="true">
  243. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.MouseOver.Background}" />
  244. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.MouseOver.Border}" />
  245. </Trigger>
  246. <Trigger Property="IsPressed" Value="true">
  247. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Pressed.Background}" />
  248. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Pressed.Border}" />
  249. </Trigger>
  250. <Trigger Property="IsEnabled" Value="false">
  251. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Disabled.Background}" />
  252. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Disabled.Border}" />
  253. <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{StaticResource Button.Disabled.Foreground}" />
  254. <Setter TargetName="contentPresenter" Property="Opacity" Value="0.5" />
  255. </Trigger>
  256. </ControlTemplate.Triggers>
  257. </ControlTemplate>
  258. </Setter.Value>
  259. </Setter>
  260. <Style.Triggers>
  261. <Trigger Property="IsChecked" Value="True">
  262. <Setter Property="Background" Value="{StaticResource Button.Select.Background}" />
  263. <Setter Property="Foreground" Value="{StaticResource Button.SelectForeground.Background}" />
  264. </Trigger>
  265. <Trigger Property="IsChecked" Value="False">
  266. <Setter Property="Background" Value="Transparent" />
  267. </Trigger>
  268. <Trigger Property="IsChecked" Value="{x:Null}">
  269. <Setter Property="Background" Value="Transparent" />
  270. </Trigger>
  271. </Style.Triggers>
  272. </Style>
  273. <Style x:Key="BlueBtnStyle" TargetType="{x:Type Button}">
  274. <Setter Property="Background" Value="#1460F3" />
  275. <Setter Property="Template">
  276. <Setter.Value>
  277. <ControlTemplate TargetType="{x:Type Button}">
  278. <Border
  279. x:Name="border"
  280. Background="{TemplateBinding Background}"
  281. BorderBrush="{TemplateBinding BorderBrush}"
  282. BorderThickness="{TemplateBinding BorderThickness}"
  283. CornerRadius="4"
  284. SnapsToDevicePixels="true">
  285. <ContentPresenter
  286. x:Name="contentPresenter"
  287. Margin="{TemplateBinding Padding}"
  288. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  289. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  290. Focusable="False"
  291. RecognizesAccessKey="True"
  292. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  293. </Border>
  294. <ControlTemplate.Triggers>
  295. <Trigger Property="IsMouseOver" Value="true">
  296. <Setter TargetName="border" Property="Background" Value="{StaticResource BlueBtn.Mouseover.Background}" />
  297. </Trigger>
  298. <Trigger Property="IsPressed" Value="true">
  299. <Setter TargetName="border" Property="Background" Value="{StaticResource BlueBtn.Pressed.Background}" />
  300. </Trigger>
  301. <Trigger Property="IsEnabled" Value="false">
  302. <Setter TargetName="border" Property="Background" Value="#33000000" />
  303. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Disabled.Border}" />
  304. <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="#FF999999" />
  305. <Setter TargetName="contentPresenter" Property="Opacity" Value="0.5" />
  306. </Trigger>
  307. </ControlTemplate.Triggers>
  308. </ControlTemplate>
  309. </Setter.Value>
  310. </Setter>
  311. </Style>
  312. <Style x:Key="InsideBarBtnStyle" TargetType="{x:Type Button}">
  313. <Setter Property="Background" Value="Transparent" />
  314. <Setter Property="BorderBrush" Value="Transparent" />
  315. <Setter Property="Margin" Value="4,0,4,0" />
  316. <Setter Property="Width" Value="auto" />
  317. <Setter Property="Height" Value="28" />
  318. <Setter Property="Template">
  319. <Setter.Value>
  320. <ControlTemplate TargetType="{x:Type Button}">
  321. <Border
  322. x:Name="border"
  323. Background="{TemplateBinding Background}"
  324. BorderBrush="{TemplateBinding BorderBrush}"
  325. BorderThickness="0,0,0,0"
  326. CornerRadius="4"
  327. SnapsToDevicePixels="true">
  328. <ContentPresenter
  329. x:Name="contentPresenter"
  330. Margin="{TemplateBinding Padding}"
  331. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  332. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  333. Focusable="False"
  334. RecognizesAccessKey="True"
  335. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  336. </Border>
  337. <ControlTemplate.Triggers>
  338. <Trigger Property="IsMouseOver" Value="true">
  339. <Setter TargetName="border" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  340. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  341. </Trigger>
  342. <Trigger Property="IsPressed" Value="true">
  343. <Setter TargetName="border" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  344. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  345. </Trigger>
  346. <Trigger Property="IsEnabled" Value="false">
  347. <Setter TargetName="border" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  348. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  349. </Trigger>
  350. </ControlTemplate.Triggers>
  351. </ControlTemplate>
  352. </Setter.Value>
  353. </Setter>
  354. </Style>
  355. <Style x:Key="CompressBtn" TargetType="Button">
  356. <Setter Property="Background" Value="White" />
  357. <Setter Property="BorderBrush" Value="White" />
  358. <Setter Property="Width" Value="528" />
  359. <Setter Property="Height" Value="64" />
  360. <Setter Property="HorizontalAlignment" Value="Center" />
  361. <Setter Property="Template">
  362. <Setter.Value>
  363. <ControlTemplate TargetType="{x:Type Button}">
  364. <Border
  365. x:Name="border"
  366. Background="{TemplateBinding Background}"
  367. BorderBrush="Black"
  368. BorderThickness="1,1,1,1"
  369. CornerRadius="7,7,7,7"
  370. SnapsToDevicePixels="true">
  371. <ContentPresenter
  372. x:Name="contentPresenter"
  373. Margin="{TemplateBinding Padding}"
  374. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  375. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  376. Focusable="False"
  377. RecognizesAccessKey="True"
  378. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  379. </Border>
  380. <ControlTemplate.Triggers>
  381. <Trigger Property="IsMouseOver" Value="true">
  382. <Setter TargetName="border" Property="Background" Value="#1A000000" />
  383. <Setter TargetName="border" Property="BorderBrush" Value="gray" />
  384. </Trigger>
  385. <Trigger Property="IsPressed" Value="true">
  386. <Setter TargetName="border" Property="Background" Value="#26000000" />
  387. <Setter TargetName="border" Property="BorderBrush" Value="gray" />
  388. </Trigger>
  389. <Trigger Property="IsEnabled" Value="false">
  390. <Setter TargetName="border" Property="Background" Value="Transparent" />
  391. <Setter TargetName="border" Property="BorderBrush" Value="#33000000" />
  392. <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="#FF999999" />
  393. <Setter TargetName="contentPresenter" Property="Opacity" Value="0.4" />
  394. </Trigger>
  395. </ControlTemplate.Triggers>
  396. </ControlTemplate>
  397. </Setter.Value>
  398. </Setter>
  399. </Style>
  400. <SolidColorBrush x:Key="RadioButton.MouseOver.Background" Color="#1A000000" />
  401. <SolidColorBrush x:Key="RadioButton.MouseOver.Border" Color="#FF5593FF" />
  402. <SolidColorBrush x:Key="RadioButton.MouseOver.Glyph" Color="#FFF3F9FF" />
  403. <SolidColorBrush x:Key="RadioButton.Disabled.Background" Color="#00000000" />
  404. <SolidColorBrush x:Key="RadioButton.Disabled.Border" Color="#FFBCBCBC" />
  405. <SolidColorBrush x:Key="RadioButton.Disabled.Glyph" Color="#FF707070" />
  406. <SolidColorBrush x:Key="RadioButton.Pressed.Background" Color="#26000000" />
  407. <SolidColorBrush x:Key="RadioButton.Pressed.Border" Color="#FF3C77DD" />
  408. <SolidColorBrush x:Key="RadioButton.Pressed.Glyph" Color="#1A477EDE" />
  409. <SolidColorBrush x:Key="RadioButton.Static.Glyph" Color="#FF212121" />
  410. <SolidColorBrush x:Key="RadioButton.Static.Background" Color="#FFFFFFFF" />
  411. <SolidColorBrush x:Key="RadioButton.Static.Border" Color="#FF707070" />
  412. <!-- 自定义形状的单选按钮 -->
  413. <Style x:Key="RectangleRadionButton" TargetType="{x:Type RadioButton}">
  414. <Setter Property="Background" Value="{StaticResource RadioButton.Static.Background}" />
  415. <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Static.Border}" />
  416. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  417. <Setter Property="BorderThickness" Value="0" />
  418. <Setter Property="Width" Value="72" />
  419. <Setter Property="Height" Value="80" />
  420. <Setter Property="HorizontalContentAlignment" Value="Center" />
  421. <Setter Property="VerticalContentAlignment" Value="Center" />
  422. <Setter Property="Template">
  423. <Setter.Value>
  424. <ControlTemplate TargetType="{x:Type RadioButton}">
  425. <Grid
  426. x:Name="templateRoot"
  427. Background="Transparent"
  428. SnapsToDevicePixels="True">
  429. <Border
  430. x:Name="radioButtonBorder"
  431. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  432. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  433. Background="{TemplateBinding Background}"
  434. BorderBrush="{TemplateBinding BorderBrush}"
  435. BorderThickness="{TemplateBinding BorderThickness}">
  436. <Rectangle
  437. x:Name="optionMark"
  438. Width="{TemplateBinding Width}"
  439. Height="{TemplateBinding Height}"
  440. Opacity="0" />
  441. </Border>
  442. <ContentPresenter
  443. x:Name="contentPresenter"
  444. Margin="{TemplateBinding Padding}"
  445. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  446. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  447. Focusable="False"
  448. RecognizesAccessKey="True"
  449. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  450. </Grid>
  451. <ControlTemplate.Triggers>
  452. <Trigger Property="IsMouseOver" Value="true">
  453. <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.MouseOver.Background}" />
  454. <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.MouseOver.Border}" />
  455. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.MouseOver.Glyph}" />
  456. </Trigger>
  457. <Trigger Property="IsEnabled" Value="false">
  458. <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Disabled.Background}" />
  459. <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Disabled.Border}" />
  460. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Disabled.Glyph}" />
  461. </Trigger>
  462. <Trigger Property="IsPressed" Value="true">
  463. <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Pressed.Background}" />
  464. <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Pressed.Border}" />
  465. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" />
  466. </Trigger>
  467. <Trigger Property="IsChecked" Value="true">
  468. <Setter TargetName="radioButtonBorder" Property="Background" Value="Red" />
  469. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" />
  470. </Trigger>
  471. <Trigger Property="IsChecked" Value="{x:Null}">
  472. <Setter TargetName="optionMark" Property="Opacity" Value="0.56" />
  473. </Trigger>
  474. </ControlTemplate.Triggers>
  475. </ControlTemplate>
  476. </Setter.Value>
  477. </Setter>
  478. </Style>
  479. <Style x:Key="RectangleRadionButtonWithCorner" TargetType="{x:Type RadioButton}">
  480. <Setter Property="Background" Value="{StaticResource RadioButton.Static.Background}" />
  481. <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Static.Border}" />
  482. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  483. <Setter Property="BorderThickness" Value="0" />
  484. <Setter Property="Width" Value="72" />
  485. <Setter Property="Height" Value="80" />
  486. <Setter Property="HorizontalContentAlignment" Value="Center" />
  487. <Setter Property="VerticalContentAlignment" Value="Center" />
  488. <Setter Property="Template">
  489. <Setter.Value>
  490. <ControlTemplate TargetType="{x:Type RadioButton}">
  491. <Grid
  492. x:Name="templateRoot"
  493. Background="Transparent"
  494. SnapsToDevicePixels="True">
  495. <Border
  496. x:Name="radioButtonBorder"
  497. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  498. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  499. Background="{TemplateBinding Background}"
  500. BorderBrush="{TemplateBinding BorderBrush}"
  501. BorderThickness="{TemplateBinding BorderThickness}"
  502. CornerRadius="4">
  503. <Rectangle
  504. x:Name="optionMark"
  505. Width="{TemplateBinding Width}"
  506. Height="{TemplateBinding Height}"
  507. Opacity="0" />
  508. </Border>
  509. <ContentPresenter
  510. x:Name="contentPresenter"
  511. Margin="{TemplateBinding Padding}"
  512. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  513. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  514. Focusable="False"
  515. RecognizesAccessKey="True"
  516. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  517. </Grid>
  518. </ControlTemplate>
  519. </Setter.Value>
  520. </Setter>
  521. <Style.Triggers>
  522. <Trigger Property="IsMouseOver" Value="true">
  523. <Setter Property="Background" Value="{StaticResource RadioButton.MouseOver.Background}" />
  524. <Setter Property="BorderBrush" Value="{StaticResource RadioButton.MouseOver.Border}" />
  525. </Trigger>
  526. <Trigger Property="IsEnabled" Value="false">
  527. <Setter Property="Background" Value="{StaticResource RadioButton.Disabled.Background}" />
  528. <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Disabled.Border}" />
  529. </Trigger>
  530. <Trigger Property="IsChecked" Value="True">
  531. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  532. </Trigger>
  533. <Trigger Property="IsPressed" Value="true">
  534. <Setter Property="Background" Value="{StaticResource RadioButton.Pressed.Background}" />
  535. <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Pressed.Border}" />
  536. </Trigger>
  537. </Style.Triggers>
  538. </Style>
  539. <!-- 带有蓝色边框的单选按钮 -->
  540. <Style x:Key="BlueBorderRadionButtonWithCorner" TargetType="{x:Type RadioButton}">
  541. <Setter Property="Background" Value="Transparent" />
  542. <Setter Property="BorderBrush" Value="Transparent" />
  543. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  544. <Setter Property="BorderThickness" Value="0" />
  545. <Setter Property="Width" Value="72" />
  546. <Setter Property="Height" Value="80" />
  547. <Setter Property="HorizontalContentAlignment" Value="Center" />
  548. <Setter Property="VerticalContentAlignment" Value="Center" />
  549. <Setter Property="Template">
  550. <Setter.Value>
  551. <ControlTemplate TargetType="{x:Type RadioButton}">
  552. <Grid
  553. x:Name="templateRoot"
  554. Background="Transparent"
  555. SnapsToDevicePixels="True">
  556. <Border
  557. x:Name="radioButtonBorder"
  558. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  559. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  560. Background="{TemplateBinding Background}"
  561. BorderBrush="{TemplateBinding BorderBrush}"
  562. BorderThickness="{TemplateBinding BorderThickness}"
  563. CornerRadius="4">
  564. <Rectangle
  565. x:Name="optionMark"
  566. Width="{TemplateBinding Width}"
  567. Height="{TemplateBinding Height}"
  568. Opacity="0" />
  569. </Border>
  570. <ContentPresenter
  571. x:Name="contentPresenter"
  572. Margin="{TemplateBinding Padding}"
  573. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  574. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  575. Focusable="False"
  576. RecognizesAccessKey="True"
  577. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  578. </Grid>
  579. <ControlTemplate.Triggers>
  580. <Trigger Property="IsMouseOver" Value="true">
  581. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.MouseOver.Glyph}" />
  582. </Trigger>
  583. <Trigger Property="IsEnabled" Value="false">
  584. <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Disabled.Background}" />
  585. <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Disabled.Border}" />
  586. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Disabled.Glyph}" />
  587. </Trigger>
  588. <Trigger Property="IsPressed" Value="true">
  589. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" />
  590. </Trigger>
  591. <Trigger Property="IsChecked" Value="true">
  592. <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="blue" />
  593. </Trigger>
  594. <Trigger Property="IsChecked" Value="{x:Null}">
  595. <Setter TargetName="optionMark" Property="Opacity" Value="0.56" />
  596. </Trigger>
  597. </ControlTemplate.Triggers>
  598. </ControlTemplate>
  599. </Setter.Value>
  600. </Setter>
  601. </Style>
  602. <!-- Design Token SubToolbar lv2 radionbutton -->
  603. <Style
  604. x:Key="SubToolbarRdb"
  605. BasedOn="{StaticResource RectangleRadionButtonWithCorner}"
  606. TargetType="{x:Type RadioButton}">
  607. <Setter Property="Background" Value="Transparent" />
  608. <Setter Property="FontSize" Value="12" />
  609. <Setter Property="FontFamily" Value="Segoe UI" />
  610. <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
  611. <Setter Property="BorderThickness" Value="0" />
  612. <!--<Style.Triggers>
  613. <Trigger Property="IsMouseOver" Value="True">
  614. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  615. </Trigger>
  616. <Trigger Property="IsPressed" Value="True">
  617. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  618. </Trigger>
  619. <Trigger Property="IsChecked" Value="True">
  620. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  621. </Trigger>
  622. <Trigger Property="IsEnabled" Value="False">
  623. <Setter Property="Background" Value="Transparent" />
  624. <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.dis}" />
  625. </Trigger>
  626. </Style.Triggers>-->
  627. </Style>
  628. <Style x:Key="HomePageCompressBtn" TargetType="Button">
  629. <Setter Property="Background" Value="White" />
  630. <Setter Property="BorderBrush" Value="White" />
  631. <Setter Property="HorizontalAlignment" Value="Center" />
  632. <Setter Property="Template">
  633. <Setter.Value>
  634. <ControlTemplate TargetType="{x:Type Button}">
  635. <Border
  636. x:Name="border"
  637. Background="{TemplateBinding Background}"
  638. BorderBrush="White"
  639. BorderThickness="1,1,1,1"
  640. SnapsToDevicePixels="true">
  641. <ContentPresenter
  642. x:Name="contentPresenter"
  643. Margin="{TemplateBinding Padding}"
  644. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  645. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  646. Focusable="False"
  647. RecognizesAccessKey="True"
  648. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  649. </Border>
  650. <ControlTemplate.Triggers>
  651. <Trigger Property="IsMouseOver" Value="true">
  652. <Setter TargetName="border" Property="Background" Value="#1A000000" />
  653. <Setter TargetName="border" Property="BorderBrush" Value="AntiqueWhite" />
  654. </Trigger>
  655. <Trigger Property="IsPressed" Value="true">
  656. <Setter TargetName="border" Property="Background" Value="#26000000" />
  657. <Setter TargetName="border" Property="BorderBrush" Value="WhiteSmoke" />
  658. </Trigger>
  659. <Trigger Property="IsEnabled" Value="false">
  660. <Setter TargetName="border" Property="Background" Value="White" />
  661. <Setter TargetName="border" Property="BorderBrush" Value="White" />
  662. <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="Black" />
  663. <Setter TargetName="contentPresenter" Property="Opacity" Value="1" />
  664. </Trigger>
  665. </ControlTemplate.Triggers>
  666. </ControlTemplate>
  667. </Setter.Value>
  668. </Setter>
  669. </Style>
  670. </ResourceDictionary>