CustomBtnStyle.xaml 47 KB

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