CustomBtnStyle.xaml 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809
  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. xmlns:convert="clr-namespace:PDF_Master.DataConvert">
  6. <convert:UnVisivleConvert x:Key="UnvisibleConvert" />
  7. <SolidColorBrush x:Key="Common.Border" Color="#FF273C62" />
  8. <SolidColorBrush x:Key="Common.ForGround.Blue" Color="#FF273C62" />
  9. <SolidColorBrush x:Key="Common.ForGround.Black" Color="#FF000000" />
  10. <SolidColorBrush x:Key="Button.Static.Background" Color="#273C62" />
  11. <SolidColorBrush x:Key="Button.Static.Border" Color="#FF273C62" />
  12. <SolidColorBrush x:Key="Button.MouseOver.Background" Color="#DFE1E5" />
  13. <SolidColorBrush x:Key="Button.MouseOver.Border" Color="#273C62" />
  14. <SolidColorBrush x:Key="Button.Pressed.Background" Color="#29477EDE" />
  15. <SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B" />
  16. <SolidColorBrush x:Key="Button.Disabled.Background" Color="#273C62" />
  17. <SolidColorBrush x:Key="Button.Disabled.Border" Color="#273C62" />
  18. <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#26FFFFFF" />
  19. <SolidColorBrush x:Key="CloseButton.MouseOver.Foreground" Color="Red" />
  20. <SolidColorBrush x:Key="Disabled.ForeGround" Color="#FFE2E3E6" />
  21. <SolidColorBrush x:Key="BlueBtn.Mouseover.Background" Color="#31538D" />
  22. <SolidColorBrush x:Key="BlueBtn.Pressed.Background" Color="#1B2944" />
  23. <SolidColorBrush x:Key="Redact.Background" Color="#477EDE" />
  24. <Style x:Key="ToggleBtnScreenAnnotationStyle" TargetType="customControl:CustomIconToggleBtn">
  25. <Setter Property="Background" Value="{StaticResource Button.Static.Background}" />
  26. <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}" />
  27. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  28. <Setter Property="BorderThickness" Value="0" />
  29. <Setter Property="HorizontalContentAlignment" Value="Center" />
  30. <Setter Property="Margin" Value="4" />
  31. <Setter Property="Height" Value="40" />
  32. <Setter Property="Template">
  33. <Setter.Value>
  34. <ControlTemplate TargetType="customControl:CustomIconToggleBtn">
  35. <Border
  36. x:Name="border"
  37. Background="{TemplateBinding Background}"
  38. BorderBrush="Transparent"
  39. CornerRadius="4"
  40. SnapsToDevicePixels="true">
  41. <Grid
  42. Width="40"
  43. Height="40"
  44. HorizontalAlignment="Center"
  45. VerticalAlignment="Center">
  46. <ContentPresenter
  47. x:Name="contentPresenter"
  48. Margin="0"
  49. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  50. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  51. Focusable="False"
  52. RecognizesAccessKey="True"
  53. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  54. </Grid>
  55. </Border>
  56. <ControlTemplate.Triggers>
  57. <Trigger Property="IsMouseOver" Value="True">
  58. <Setter TargetName="border" Property="Background" Value="#e2e3e5" />
  59. <Setter TargetName="border" Property="BorderBrush" Value="#CED0D4" />
  60. </Trigger>
  61. <Trigger Property="IsPressed" Value="True">
  62. <Setter TargetName="border" Property="Background" Value="#e2e3e5" />
  63. <Setter TargetName="border" Property="BorderBrush" Value="#CED0D4" />
  64. </Trigger>
  65. </ControlTemplate.Triggers>
  66. </ControlTemplate>
  67. </Setter.Value>
  68. </Setter>
  69. <Style.Triggers>
  70. <Trigger Property="IsChecked" Value="True">
  71. <Setter Property="Background" Value="#e2e3e5" />
  72. <Setter Property="BorderBrush" Value="#CED0D4" />
  73. </Trigger>
  74. <Trigger Property="IsChecked" Value="False">
  75. <Setter Property="Background" Value="Transparent" />
  76. <Setter Property="BorderBrush" Value="Transparent" />
  77. </Trigger>
  78. <Trigger Property="IsChecked" Value="{x:Null}">
  79. <Setter Property="Background" Value="Transparent" />
  80. </Trigger>
  81. </Style.Triggers>
  82. </Style>
  83. <Style x:Key="ToggleBtnAnnotationStyle" TargetType="customControl:CustomIconToggleBtn">
  84. <Setter Property="Background" Value="Transparent" />
  85. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  86. <Setter Property="BorderThickness" Value="0" />
  87. <Setter Property="HorizontalContentAlignment" Value="Left" />
  88. <Setter Property="VerticalContentAlignment" Value="Top" />
  89. <Setter Property="Height" Value="25" />
  90. <Setter Property="Template">
  91. <Setter.Value>
  92. <ControlTemplate TargetType="customControl:CustomIconToggleBtn">
  93. <Border
  94. x:Name="border"
  95. Background="{TemplateBinding Background}"
  96. BorderBrush="{TemplateBinding BorderBrush}"
  97. BorderThickness="{TemplateBinding BorderThickness}"
  98. SnapsToDevicePixels="true">
  99. <Grid>
  100. <Grid
  101. Width="25"
  102. Height="25"
  103. HorizontalAlignment="Left"
  104. VerticalAlignment="Top">
  105. <Image
  106. x:Name="ImageIcon"
  107. Width="25"
  108. Height="25"
  109. Source="{Binding Icon, RelativeSource={RelativeSource Mode=TemplatedParent}}"
  110. Visibility="Collapsed" />
  111. </Grid>
  112. <ContentPresenter
  113. x:Name="contentPresenter"
  114. Margin="{TemplateBinding Padding}"
  115. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  116. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  117. Focusable="False"
  118. RecognizesAccessKey="True"
  119. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  120. </Grid>
  121. </Border>
  122. </ControlTemplate>
  123. </Setter.Value>
  124. </Setter>
  125. </Style>
  126. <Style x:Key="ToggleBtnViewModeStyle" TargetType="customControl:CustomIconToggleBtn">
  127. <Setter Property="Background" Value="{StaticResource Button.Static.Background}" />
  128. <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}" />
  129. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  130. <Setter Property="BorderThickness" Value="0" />
  131. <Setter Property="HorizontalContentAlignment" Value="Center" />
  132. <Setter Property="Height" Value="40" />
  133. <Setter Property="Margin" Value="2,0,2,0" />
  134. <Setter Property="Template">
  135. <Setter.Value>
  136. <ControlTemplate TargetType="customControl:CustomIconToggleBtn">
  137. <Border
  138. Width="40"
  139. Height="40"
  140. SnapsToDevicePixels="true">
  141. <Grid>
  142. <Border
  143. Width="28"
  144. Height="28"
  145. x:Name="border"
  146. CornerRadius="4"
  147. Background="{TemplateBinding Background}"
  148. BorderBrush="{TemplateBinding BorderBrush}"
  149. BorderThickness="{TemplateBinding BorderThickness}"
  150. HorizontalAlignment="Center"
  151. VerticalAlignment="Center">
  152. <Image
  153. x:Name="ImageIcon"
  154. Width="20"
  155. Height="20"
  156. Source="{Binding Icon, RelativeSource={RelativeSource Mode=TemplatedParent}}"
  157. Visibility="Collapsed" />
  158. </Border>
  159. <ContentPresenter
  160. x:Name="contentPresenter"
  161. Margin="{TemplateBinding Padding}"
  162. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  163. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  164. Focusable="False"
  165. RecognizesAccessKey="True"
  166. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  167. </Grid>
  168. </Border>
  169. <ControlTemplate.Triggers>
  170. <Trigger Property="IsMouseOver" Value="true">
  171. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.MouseOver.Background}" />
  172. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.MouseOver.Border}" />
  173. </Trigger>
  174. <Trigger Property="IsPressed" Value="true">
  175. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Pressed.Background}" />
  176. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Pressed.Border}" />
  177. </Trigger>
  178. <!--<Trigger Property="IsEnabled" Value="false">
  179. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Disabled.Background}" />
  180. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Disabled.Border}" />
  181. <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{StaticResource Button.Disabled.Foreground}" />
  182. <Setter TargetName="contentPresenter" Property="Opacity" Value="0.5" />
  183. </Trigger>-->
  184. </ControlTemplate.Triggers>
  185. </ControlTemplate>
  186. </Setter.Value>
  187. </Setter>
  188. <Style.Triggers>
  189. <Trigger Property="IsChecked" Value="True">
  190. <Setter Property="Background" Value="{StaticResource Button.Pressed.Background}" />
  191. </Trigger>
  192. <Trigger Property="IsChecked" Value="False">
  193. <Setter Property="Background" Value="Transparent" />
  194. </Trigger>
  195. <Trigger Property="IsChecked" Value="{x:Null}">
  196. <Setter Property="Background" Value="Transparent" />
  197. </Trigger>
  198. </Style.Triggers>
  199. </Style>
  200. <Style x:Key="ToggleBtnShowAnnotViewModeStyle" 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="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  204. <Setter Property="BorderThickness" Value="0" />
  205. <Setter Property="HorizontalContentAlignment" Value="Center" />
  206. <Setter Property="Height" Value="40" />
  207. <Setter Property="Margin" Value="2,0,2,0" />
  208. <Setter Property="Template">
  209. <Setter.Value>
  210. <ControlTemplate TargetType="customControl:CustomIconToggleBtn">
  211. <Border
  212. Width="40"
  213. Height="40"
  214. SnapsToDevicePixels="true">
  215. <Grid>
  216. <Border
  217. Width="28"
  218. Height="28"
  219. x:Name="border"
  220. CornerRadius="4"
  221. Background="{TemplateBinding Background}"
  222. BorderBrush="{TemplateBinding BorderBrush}"
  223. BorderThickness="{TemplateBinding BorderThickness}"
  224. HorizontalAlignment="Center"
  225. VerticalAlignment="Center">
  226. <Grid >
  227. <Grid x:Name="close" >
  228. <Path
  229. Width="20"
  230. Height="20"
  231. HorizontalAlignment="Center"
  232. VerticalAlignment="Center"
  233. Data="M19 4.93752C17.3793 7.129 13.9582 9.69731 9.99995 9.69731C6.04179 9.69731 2.62074 7.05211 1 4.7"
  234. Stroke="{StaticResource color.icon.base.brand}"
  235. StrokeThickness="2" />
  236. <Path
  237. Width="20"
  238. Height="20"
  239. StrokeEndLineCap="Square"
  240. Data="M3 10.8973L1.9 12.8026M17 10.8973L18.1 12.8026M7.47998 12.6973L6.91058 14.8223M12.52 12.6973L13.0894 14.8223"
  241. Stroke="{StaticResource color.icon.base.neutral.norm.lv2}"
  242. StrokeThickness="2" />
  243. </Grid>
  244. <Grid Visibility="{Binding ElementName=close, Path=Visibility, Converter={StaticResource UnvisibleConvert}}">
  245. <Path
  246. Width="20"
  247. Height="20"
  248. HorizontalAlignment="Center"
  249. VerticalAlignment="Center"
  250. Data="M19 10C19 10.1949 18.859 10.6759 18.3852 11.3782C17.9381 12.0409 17.2726 12.7841 16.4329 13.4801C14.7446 14.8795 12.4627 16 10 16C7.50771 16 5.22082 14.981 3.55093 13.6545C2.71821 12.993 2.06253 12.2733 1.62266 11.6009C1.17041 10.9097 1 10.3526 1 10C1 9.64743 1.17041 9.0903 1.62266 8.39905C2.06253 7.72674 2.71821 7.00699 3.55093 6.34552C5.22082 5.01903 7.50771 4 10 4C12.4627 4 14.7446 5.12047 16.4329 6.5199C17.2726 7.21593 17.9381 7.95909 18.3852 8.6218C18.859 9.32408 19 9.80507 19 10Z"
  251. Stroke="{StaticResource color.icon.base.brand}"
  252. StrokeThickness="2" />
  253. <Ellipse
  254. Margin="1.600000000000001,1.2,0,0"
  255. Width="8"
  256. Height="8"
  257. Stroke="#94989c"
  258. StrokeThickness="2">
  259. <Ellipse.RenderTransform>
  260. <TranslateTransform X="-0.5" Y="-0.5" />
  261. </Ellipse.RenderTransform>
  262. </Ellipse>
  263. </Grid>
  264. </Grid>
  265. </Border>
  266. <ContentPresenter
  267. x:Name="contentPresenter"
  268. Margin="{TemplateBinding Padding}"
  269. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  270. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  271. Focusable="False"
  272. RecognizesAccessKey="True"
  273. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  274. </Grid>
  275. </Border>
  276. <ControlTemplate.Triggers>
  277. <Trigger Property="IsMouseOver" Value="true">
  278. <Setter TargetName="border" Property="Background" Value="Transparent" />
  279. <Setter TargetName="border" Property="BorderBrush" Value="Transparent" />
  280. </Trigger>
  281. <Trigger Property="IsPressed" Value="true">
  282. <Setter TargetName="border" Property="Background" Value="Transparent" />
  283. </Trigger>
  284. <Trigger Property="IsChecked" Value="True">
  285. <Setter TargetName="close" Property="Visibility" Value="Collapsed" />
  286. </Trigger>
  287. <!--<Trigger Property="IsEnabled" Value="false">
  288. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Disabled.Background}" />
  289. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Disabled.Border}" />
  290. <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{StaticResource Button.Disabled.Foreground}" />
  291. <Setter TargetName="contentPresenter" Property="Opacity" Value="0.5" />
  292. </Trigger>-->
  293. </ControlTemplate.Triggers>
  294. </ControlTemplate>
  295. </Setter.Value>
  296. </Setter>
  297. <Style.Triggers>
  298. <Trigger Property="IsChecked" Value="True">
  299. <Setter Property="Background" Value="Transparent" />
  300. </Trigger>
  301. <Trigger Property="IsChecked" Value="False">
  302. <Setter Property="Background" Value="Transparent" />
  303. </Trigger>
  304. <Trigger Property="IsChecked" Value="{x:Null}">
  305. <Setter Property="Background" Value="Transparent" />
  306. </Trigger>
  307. </Style.Triggers>
  308. </Style>
  309. <SolidColorBrush
  310. x:Key="Button.Select.Background"
  311. Opacity="0.1"
  312. Color="#1770F4" />
  313. <SolidColorBrush x:Key="Button.SelectForeground.Background" Color="#1770F4" />
  314. <Style x:Key="ToggleBtnSelectStyle" TargetType="customControl:CustomIconToggleBtn">
  315. <Setter Property="Background" Value="{StaticResource Button.Static.Background}" />
  316. <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}" />
  317. <Setter Property="Foreground" Value="#8F96A7" />
  318. <Setter Property="BorderThickness" Value="0" />
  319. <Setter Property="HorizontalContentAlignment" Value="Center" />
  320. <Setter Property="Height" Value="40" />
  321. <Setter Property="Margin" Value="4,0,4,0" />
  322. <Setter Property="Template">
  323. <Setter.Value>
  324. <ControlTemplate TargetType="customControl:CustomIconToggleBtn">
  325. <Border
  326. x:Name="border"
  327. Background="{TemplateBinding Background}"
  328. BorderBrush="{TemplateBinding BorderBrush}"
  329. BorderThickness="{TemplateBinding BorderThickness}"
  330. CornerRadius="4"
  331. SnapsToDevicePixels="true">
  332. <Grid>
  333. <Grid
  334. Width="40"
  335. Height="40"
  336. HorizontalAlignment="Center"
  337. VerticalAlignment="Center">
  338. <Image
  339. x:Name="ImageIcon"
  340. Width="20"
  341. Height="20"
  342. Source="{Binding Icon, RelativeSource={RelativeSource Mode=TemplatedParent}}"
  343. Visibility="Collapsed" />
  344. </Grid>
  345. <ContentPresenter
  346. x:Name="contentPresenter"
  347. Margin="{TemplateBinding Padding}"
  348. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  349. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  350. Focusable="False"
  351. RecognizesAccessKey="True"
  352. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  353. </Grid>
  354. </Border>
  355. <ControlTemplate.Triggers>
  356. <Trigger Property="IsMouseOver" Value="true">
  357. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.MouseOver.Background}" />
  358. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.MouseOver.Border}" />
  359. </Trigger>
  360. <Trigger Property="IsPressed" Value="true">
  361. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Pressed.Background}" />
  362. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Pressed.Border}" />
  363. </Trigger>
  364. <Trigger Property="IsEnabled" Value="false">
  365. <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Disabled.Background}" />
  366. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Disabled.Border}" />
  367. <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{StaticResource Button.Disabled.Foreground}" />
  368. <Setter TargetName="contentPresenter" Property="Opacity" Value="0.5" />
  369. </Trigger>
  370. </ControlTemplate.Triggers>
  371. </ControlTemplate>
  372. </Setter.Value>
  373. </Setter>
  374. <Style.Triggers>
  375. <Trigger Property="IsChecked" Value="True">
  376. <Setter Property="Background" Value="{StaticResource Button.Select.Background}" />
  377. <Setter Property="Foreground" Value="{StaticResource Button.SelectForeground.Background}" />
  378. </Trigger>
  379. <Trigger Property="IsChecked" Value="False">
  380. <Setter Property="Background" Value="Transparent" />
  381. </Trigger>
  382. <Trigger Property="IsChecked" Value="{x:Null}">
  383. <Setter Property="Background" Value="Transparent" />
  384. </Trigger>
  385. </Style.Triggers>
  386. </Style>
  387. <Style x:Key="BlueBtnStyle" TargetType="{x:Type Button}">
  388. <Setter Property="Background" Value="#1460F3" />
  389. <Setter Property="Template">
  390. <Setter.Value>
  391. <ControlTemplate TargetType="{x:Type Button}">
  392. <Border
  393. x:Name="border"
  394. Background="{TemplateBinding Background}"
  395. BorderBrush="{TemplateBinding BorderBrush}"
  396. BorderThickness="{TemplateBinding BorderThickness}"
  397. CornerRadius="4"
  398. SnapsToDevicePixels="true">
  399. <ContentPresenter
  400. x:Name="contentPresenter"
  401. Margin="{TemplateBinding Padding}"
  402. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  403. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  404. Focusable="False"
  405. RecognizesAccessKey="True"
  406. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  407. </Border>
  408. <ControlTemplate.Triggers>
  409. <Trigger Property="IsMouseOver" Value="true">
  410. <Setter TargetName="border" Property="Background" Value="{StaticResource BlueBtn.Mouseover.Background}" />
  411. </Trigger>
  412. <Trigger Property="IsPressed" Value="true">
  413. <Setter TargetName="border" Property="Background" Value="{StaticResource BlueBtn.Pressed.Background}" />
  414. </Trigger>
  415. <Trigger Property="IsEnabled" Value="false">
  416. <Setter TargetName="border" Property="Background" Value="#33000000" />
  417. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Disabled.Border}" />
  418. <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="#FF999999" />
  419. <Setter TargetName="contentPresenter" Property="Opacity" Value="0.5" />
  420. </Trigger>
  421. </ControlTemplate.Triggers>
  422. </ControlTemplate>
  423. </Setter.Value>
  424. </Setter>
  425. </Style>
  426. <Style x:Key="InsideBarBtnStyle" TargetType="{x:Type Button}">
  427. <Setter Property="Background" Value="Transparent" />
  428. <Setter Property="BorderBrush" Value="Transparent" />
  429. <Setter Property="Margin" Value="4,0,4,0" />
  430. <Setter Property="Width" Value="auto" />
  431. <Setter Property="Height" Value="28" />
  432. <Setter Property="Template">
  433. <Setter.Value>
  434. <ControlTemplate TargetType="{x:Type Button}">
  435. <Border
  436. x:Name="border"
  437. Background="{TemplateBinding Background}"
  438. BorderBrush="{TemplateBinding BorderBrush}"
  439. BorderThickness="0,0,0,0"
  440. CornerRadius="4"
  441. SnapsToDevicePixels="true">
  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. </Border>
  451. <ControlTemplate.Triggers>
  452. <Trigger Property="IsMouseOver" Value="true">
  453. <Setter TargetName="border" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  454. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  455. </Trigger>
  456. <Trigger Property="IsPressed" Value="true">
  457. <Setter TargetName="border" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  458. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  459. </Trigger>
  460. <Trigger Property="IsEnabled" Value="false">
  461. <Setter TargetName="border" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  462. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  463. </Trigger>
  464. </ControlTemplate.Triggers>
  465. </ControlTemplate>
  466. </Setter.Value>
  467. </Setter>
  468. </Style>
  469. <Style x:Key="CompressBtn" TargetType="Button">
  470. <Setter Property="Background" Value="White" />
  471. <Setter Property="BorderBrush" Value="White" />
  472. <Setter Property="Width" Value="528" />
  473. <Setter Property="Height" Value="64" />
  474. <Setter Property="HorizontalAlignment" Value="Center" />
  475. <Setter Property="Template">
  476. <Setter.Value>
  477. <ControlTemplate TargetType="{x:Type Button}">
  478. <Border
  479. x:Name="border"
  480. Background="{TemplateBinding Background}"
  481. BorderBrush="Black"
  482. BorderThickness="1,1,1,1"
  483. CornerRadius="7,7,7,7"
  484. SnapsToDevicePixels="true">
  485. <ContentPresenter
  486. x:Name="contentPresenter"
  487. Margin="{TemplateBinding Padding}"
  488. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  489. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  490. Focusable="False"
  491. RecognizesAccessKey="True"
  492. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  493. </Border>
  494. <ControlTemplate.Triggers>
  495. <Trigger Property="IsMouseOver" Value="true">
  496. <Setter TargetName="border" Property="Background" Value="#1A000000" />
  497. <Setter TargetName="border" Property="BorderBrush" Value="gray" />
  498. </Trigger>
  499. <Trigger Property="IsPressed" Value="true">
  500. <Setter TargetName="border" Property="Background" Value="#26000000" />
  501. <Setter TargetName="border" Property="BorderBrush" Value="gray" />
  502. </Trigger>
  503. <Trigger Property="IsEnabled" Value="false">
  504. <Setter TargetName="border" Property="Background" Value="Transparent" />
  505. <Setter TargetName="border" Property="BorderBrush" Value="#33000000" />
  506. <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="#FF999999" />
  507. <Setter TargetName="contentPresenter" Property="Opacity" Value="0.4" />
  508. </Trigger>
  509. </ControlTemplate.Triggers>
  510. </ControlTemplate>
  511. </Setter.Value>
  512. </Setter>
  513. </Style>
  514. <SolidColorBrush x:Key="RadioButton.MouseOver.Background" Color="#1A000000" />
  515. <SolidColorBrush x:Key="RadioButton.MouseOver.Border" Color="#FF5593FF" />
  516. <SolidColorBrush x:Key="RadioButton.MouseOver.Glyph" Color="#FFF3F9FF" />
  517. <SolidColorBrush x:Key="RadioButton.Disabled.Background" Color="#00000000" />
  518. <SolidColorBrush x:Key="RadioButton.Disabled.Border" Color="#FFBCBCBC" />
  519. <SolidColorBrush x:Key="RadioButton.Disabled.Glyph" Color="#FF707070" />
  520. <SolidColorBrush x:Key="RadioButton.Pressed.Background" Color="#26000000" />
  521. <SolidColorBrush x:Key="RadioButton.Pressed.Border" Color="#FF3C77DD" />
  522. <SolidColorBrush x:Key="RadioButton.Pressed.Glyph" Color="#1A477EDE" />
  523. <SolidColorBrush x:Key="RadioButton.Static.Glyph" Color="#FF212121" />
  524. <SolidColorBrush x:Key="RadioButton.Static.Background" Color="#FFFFFFFF" />
  525. <SolidColorBrush x:Key="RadioButton.Static.Border" Color="#FF707070" />
  526. <!-- 自定义形状的单选按钮 -->
  527. <Style x:Key="RectangleRadionButton" TargetType="{x:Type RadioButton}">
  528. <Setter Property="Background" Value="{StaticResource RadioButton.Static.Background}" />
  529. <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Static.Border}" />
  530. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  531. <Setter Property="BorderThickness" Value="0" />
  532. <Setter Property="Width" Value="72" />
  533. <Setter Property="Height" Value="80" />
  534. <Setter Property="HorizontalContentAlignment" Value="Center" />
  535. <Setter Property="VerticalContentAlignment" Value="Center" />
  536. <Setter Property="Template">
  537. <Setter.Value>
  538. <ControlTemplate TargetType="{x:Type RadioButton}">
  539. <Grid
  540. x:Name="templateRoot"
  541. Background="Transparent"
  542. SnapsToDevicePixels="True">
  543. <Border
  544. x:Name="radioButtonBorder"
  545. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  546. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  547. Background="{TemplateBinding Background}"
  548. BorderBrush="{TemplateBinding BorderBrush}"
  549. BorderThickness="{TemplateBinding BorderThickness}">
  550. <Rectangle
  551. x:Name="optionMark"
  552. Width="{TemplateBinding Width}"
  553. Height="{TemplateBinding Height}"
  554. Opacity="0" />
  555. </Border>
  556. <ContentPresenter
  557. x:Name="contentPresenter"
  558. Margin="{TemplateBinding Padding}"
  559. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  560. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  561. Focusable="False"
  562. RecognizesAccessKey="True"
  563. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  564. </Grid>
  565. <ControlTemplate.Triggers>
  566. <Trigger Property="IsMouseOver" Value="true">
  567. <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.MouseOver.Background}" />
  568. <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.MouseOver.Border}" />
  569. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.MouseOver.Glyph}" />
  570. </Trigger>
  571. <Trigger Property="IsEnabled" Value="false">
  572. <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Disabled.Background}" />
  573. <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Disabled.Border}" />
  574. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Disabled.Glyph}" />
  575. </Trigger>
  576. <Trigger Property="IsPressed" Value="true">
  577. <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Pressed.Background}" />
  578. <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Pressed.Border}" />
  579. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" />
  580. </Trigger>
  581. <Trigger Property="IsChecked" Value="true">
  582. <Setter TargetName="radioButtonBorder" Property="Background" Value="Red" />
  583. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" />
  584. </Trigger>
  585. <Trigger Property="IsChecked" Value="{x:Null}">
  586. <Setter TargetName="optionMark" Property="Opacity" Value="0.56" />
  587. </Trigger>
  588. </ControlTemplate.Triggers>
  589. </ControlTemplate>
  590. </Setter.Value>
  591. </Setter>
  592. </Style>
  593. <Style x:Key="RectangleRadionButtonWithCorner" TargetType="{x:Type RadioButton}">
  594. <Setter Property="Background" Value="{StaticResource RadioButton.Static.Background}" />
  595. <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Static.Border}" />
  596. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  597. <Setter Property="BorderThickness" Value="0" />
  598. <Setter Property="Width" Value="72" />
  599. <Setter Property="Height" Value="80" />
  600. <Setter Property="HorizontalContentAlignment" Value="Center" />
  601. <Setter Property="VerticalContentAlignment" Value="Center" />
  602. <Setter Property="Template">
  603. <Setter.Value>
  604. <ControlTemplate TargetType="{x:Type RadioButton}">
  605. <Grid
  606. x:Name="templateRoot"
  607. Background="Transparent"
  608. SnapsToDevicePixels="True">
  609. <Border
  610. x:Name="radioButtonBorder"
  611. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  612. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  613. Background="{TemplateBinding Background}"
  614. BorderBrush="{TemplateBinding BorderBrush}"
  615. BorderThickness="{TemplateBinding BorderThickness}"
  616. CornerRadius="4">
  617. <Rectangle
  618. x:Name="optionMark"
  619. Width="{TemplateBinding Width}"
  620. Height="{TemplateBinding Height}"
  621. Opacity="0" />
  622. </Border>
  623. <ContentPresenter
  624. x:Name="contentPresenter"
  625. Margin="{TemplateBinding Padding}"
  626. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  627. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  628. Focusable="False"
  629. RecognizesAccessKey="True"
  630. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  631. </Grid>
  632. </ControlTemplate>
  633. </Setter.Value>
  634. </Setter>
  635. <Style.Triggers>
  636. <Trigger Property="IsMouseOver" Value="true">
  637. <Setter Property="Background" Value="{StaticResource RadioButton.MouseOver.Background}" />
  638. <Setter Property="BorderBrush" Value="{StaticResource RadioButton.MouseOver.Border}" />
  639. </Trigger>
  640. <Trigger Property="IsEnabled" Value="false">
  641. <Setter Property="Background" Value="{StaticResource RadioButton.Disabled.Background}" />
  642. <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Disabled.Border}" />
  643. </Trigger>
  644. <Trigger Property="IsChecked" Value="True">
  645. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  646. </Trigger>
  647. <Trigger Property="IsPressed" Value="true">
  648. <Setter Property="Background" Value="{StaticResource RadioButton.Pressed.Background}" />
  649. <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Pressed.Border}" />
  650. </Trigger>
  651. </Style.Triggers>
  652. </Style>
  653. <!-- 带有蓝色边框的单选按钮 -->
  654. <Style x:Key="BlueBorderRadionButtonWithCorner" TargetType="{x:Type RadioButton}">
  655. <Setter Property="Background" Value="Transparent" />
  656. <Setter Property="BorderBrush" Value="Transparent" />
  657. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  658. <Setter Property="BorderThickness" Value="0" />
  659. <Setter Property="Width" Value="72" />
  660. <Setter Property="Height" Value="80" />
  661. <Setter Property="HorizontalContentAlignment" Value="Center" />
  662. <Setter Property="VerticalContentAlignment" Value="Center" />
  663. <Setter Property="Template">
  664. <Setter.Value>
  665. <ControlTemplate TargetType="{x:Type RadioButton}">
  666. <Grid
  667. x:Name="templateRoot"
  668. Background="Transparent"
  669. SnapsToDevicePixels="True">
  670. <Border
  671. x:Name="radioButtonBorder"
  672. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  673. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  674. Background="{TemplateBinding Background}"
  675. BorderBrush="{TemplateBinding BorderBrush}"
  676. BorderThickness="{TemplateBinding BorderThickness}"
  677. CornerRadius="4">
  678. <Rectangle
  679. x:Name="optionMark"
  680. Width="{TemplateBinding Width}"
  681. Height="{TemplateBinding Height}"
  682. Opacity="0" />
  683. </Border>
  684. <ContentPresenter
  685. x:Name="contentPresenter"
  686. Margin="{TemplateBinding Padding}"
  687. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  688. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  689. Focusable="False"
  690. RecognizesAccessKey="True"
  691. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  692. </Grid>
  693. <ControlTemplate.Triggers>
  694. <Trigger Property="IsMouseOver" Value="true">
  695. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.MouseOver.Glyph}" />
  696. </Trigger>
  697. <Trigger Property="IsEnabled" Value="false">
  698. <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Disabled.Background}" />
  699. <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Disabled.Border}" />
  700. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Disabled.Glyph}" />
  701. </Trigger>
  702. <Trigger Property="IsPressed" Value="true">
  703. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" />
  704. </Trigger>
  705. <Trigger Property="IsChecked" Value="true">
  706. <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="blue" />
  707. </Trigger>
  708. <Trigger Property="IsChecked" Value="{x:Null}">
  709. <Setter TargetName="optionMark" Property="Opacity" Value="0.56" />
  710. </Trigger>
  711. </ControlTemplate.Triggers>
  712. </ControlTemplate>
  713. </Setter.Value>
  714. </Setter>
  715. </Style>
  716. <!-- Design Token SubToolbar lv2 radionbutton -->
  717. <Style
  718. x:Key="SubToolbarRdb"
  719. BasedOn="{StaticResource RectangleRadionButtonWithCorner}"
  720. TargetType="{x:Type RadioButton}">
  721. <Setter Property="Background" Value="Transparent" />
  722. <Setter Property="FontSize" Value="12" />
  723. <Setter Property="FontFamily" Value="Segoe UI" />
  724. <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
  725. <Setter Property="BorderThickness" Value="0" />
  726. <!--<Style.Triggers>
  727. <Trigger Property="IsMouseOver" Value="True">
  728. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  729. </Trigger>
  730. <Trigger Property="IsPressed" Value="True">
  731. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  732. </Trigger>
  733. <Trigger Property="IsChecked" Value="True">
  734. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  735. </Trigger>
  736. <Trigger Property="IsEnabled" Value="False">
  737. <Setter Property="Background" Value="Transparent" />
  738. <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.dis}" />
  739. </Trigger>
  740. </Style.Triggers>-->
  741. </Style>
  742. <Style x:Key="HomePageCompressBtn" TargetType="Button">
  743. <Setter Property="Background" Value="White" />
  744. <Setter Property="BorderBrush" Value="White" />
  745. <Setter Property="HorizontalAlignment" Value="Center" />
  746. <Setter Property="Template">
  747. <Setter.Value>
  748. <ControlTemplate TargetType="{x:Type Button}">
  749. <Border
  750. x:Name="border"
  751. Background="{TemplateBinding Background}"
  752. BorderBrush="White"
  753. BorderThickness="1,1,1,1"
  754. SnapsToDevicePixels="true">
  755. <ContentPresenter
  756. x:Name="contentPresenter"
  757. Margin="{TemplateBinding Padding}"
  758. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  759. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  760. Focusable="False"
  761. RecognizesAccessKey="True"
  762. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  763. </Border>
  764. <ControlTemplate.Triggers>
  765. <Trigger Property="IsMouseOver" Value="true">
  766. <Setter TargetName="border" Property="Background" Value="#1A000000" />
  767. <Setter TargetName="border" Property="BorderBrush" Value="AntiqueWhite" />
  768. </Trigger>
  769. <Trigger Property="IsPressed" Value="true">
  770. <Setter TargetName="border" Property="Background" Value="#26000000" />
  771. <Setter TargetName="border" Property="BorderBrush" Value="WhiteSmoke" />
  772. </Trigger>
  773. <Trigger Property="IsEnabled" Value="false">
  774. <Setter TargetName="border" Property="Background" Value="White" />
  775. <Setter TargetName="border" Property="BorderBrush" Value="White" />
  776. <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="Black" />
  777. <Setter TargetName="contentPresenter" Property="Opacity" Value="1" />
  778. </Trigger>
  779. </ControlTemplate.Triggers>
  780. </ControlTemplate>
  781. </Setter.Value>
  782. </Setter>
  783. </Style>
  784. </ResourceDictionary>