OtherControlStyle.xaml 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  2. <Style x:Key="ContextMenuStyle" TargetType="{x:Type ContextMenu}">
  3. <Setter Property="SnapsToDevicePixels" Value="True" />
  4. <Setter Property="Grid.IsSharedSizeScope" Value="true" />
  5. <Setter Property="HasDropShadow" Value="True" />
  6. <Setter Property="Template">
  7. <Setter.Value>
  8. <ControlTemplate TargetType="{x:Type ContextMenu}">
  9. <Border Uid="Border_93">
  10. <Border.Style>
  11. <Style TargetType="{x:Type Border}">
  12. <Setter Property="Tag" Value="{DynamicResource {x:Static SystemParameters.DropShadowKey}}" />
  13. <Style.Triggers>
  14. <DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource Self}}" Value="True">
  15. <Setter Property="Effect">
  16. <Setter.Value>
  17. <DropShadowEffect
  18. BlurRadius="4"
  19. Opacity="0.8"
  20. ShadowDepth="1" />
  21. </Setter.Value>
  22. </Setter>
  23. </DataTrigger>
  24. </Style.Triggers>
  25. </Style>
  26. </Border.Style>
  27. <Border
  28. Uid="Border_50"
  29. Background="{TemplateBinding Background}"
  30. BorderBrush="{TemplateBinding BorderBrush}"
  31. BorderThickness="{TemplateBinding BorderThickness}">
  32. <ScrollViewer
  33. Uid="ScrollViewer_9"
  34. CanContentScroll="True"
  35. Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer,
  36. TypeInTargetAssembly={x:Type FrameworkElement}}}">
  37. <ItemsPresenter
  38. Uid="ItemsPresenter_5"
  39. KeyboardNavigation.DirectionalNavigation="Cycle"
  40. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  41. </ScrollViewer>
  42. </Border>
  43. </Border>
  44. </ControlTemplate>
  45. </Setter.Value>
  46. </Setter>
  47. </Style>
  48. <Style x:Key="ContextToggleMenuStyle" TargetType="{x:Type ContextMenu}">
  49. <Setter Property="SnapsToDevicePixels" Value="True" />
  50. <Setter Property="Grid.IsSharedSizeScope" Value="true" />
  51. <Setter Property="HasDropShadow" Value="True" />
  52. <Setter Property="Template">
  53. <Setter.Value>
  54. <ControlTemplate TargetType="{x:Type ContextMenu}">
  55. <Border Uid="Border_93">
  56. <Border.Style>
  57. <Style TargetType="{x:Type Border}">
  58. <Setter Property="Tag" Value="{DynamicResource {x:Static SystemParameters.DropShadowKey}}" />
  59. <Style.Triggers>
  60. <DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource Self}}" Value="True">
  61. <Setter Property="Effect">
  62. <Setter.Value>
  63. <DropShadowEffect
  64. BlurRadius="4"
  65. Opacity="0.8"
  66. ShadowDepth="1" />
  67. </Setter.Value>
  68. </Setter>
  69. </DataTrigger>
  70. </Style.Triggers>
  71. </Style>
  72. </Border.Style>
  73. <Border
  74. Uid="Border_50"
  75. Background="{TemplateBinding Background}"
  76. BorderBrush="{TemplateBinding BorderBrush}"
  77. BorderThickness="{TemplateBinding BorderThickness}">
  78. <ScrollViewer
  79. Uid="ScrollViewer_9"
  80. CanContentScroll="True"
  81. Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer,
  82. TypeInTargetAssembly={x:Type FrameworkElement}}}">
  83. <ItemsPresenter
  84. Uid="ItemsPresenter_5"
  85. KeyboardNavigation.DirectionalNavigation="Cycle"
  86. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  87. </ScrollViewer>
  88. </Border>
  89. </Border>
  90. </ControlTemplate>
  91. </Setter.Value>
  92. </Setter>
  93. </Style>
  94. <ControlTemplate x:Key="textbox" TargetType="{x:Type TextBoxBase}">
  95. <Border
  96. Name="border"
  97. Background="{TemplateBinding Panel.Background}"
  98. BorderBrush="{TemplateBinding Border.BorderBrush}"
  99. BorderThickness="{TemplateBinding Border.BorderThickness}"
  100. SnapsToDevicePixels="True">
  101. <ScrollViewer
  102. Name="PART_ContentHost"
  103. Focusable="False"
  104. HorizontalScrollBarVisibility="Hidden"
  105. VerticalScrollBarVisibility="Hidden" />
  106. </Border>
  107. <ControlTemplate.Triggers>
  108. <Trigger Property="UIElement.IsEnabled" Value="False">
  109. <Setter TargetName="border" Property="UIElement.Opacity" Value="0.56" />
  110. </Trigger>
  111. <Trigger Property="UIElement.IsMouseOver" Value="True">
  112. <Setter TargetName="border" Property="Border.BorderBrush" Value="#FF477EDE" />
  113. <Setter TargetName="border" Property="Border.Background" Value="White" />
  114. </Trigger>
  115. <Trigger Property="UIElement.IsFocused" Value="True">
  116. <Setter TargetName="border" Property="Border.Background" Value="White" />
  117. <Setter TargetName="border" Property="Border.BorderBrush" Value="#FF477EDE" />
  118. </Trigger>
  119. <Trigger Property="UIElement.IsKeyboardFocused" Value="True">
  120. <Setter TargetName="border" Property="Border.BorderBrush" Value="#569DE5" />
  121. </Trigger>
  122. </ControlTemplate.Triggers>
  123. </ControlTemplate>
  124. <Style x:Key="AnnotationToggleStyle" TargetType="ToggleButton">
  125. <Setter Property="Focusable" Value="False" />
  126. <Setter Property="Width" Value="16" />
  127. <Setter Property="Height" Value="16" />
  128. <Setter Property="Template">
  129. <Setter.Value>
  130. <ControlTemplate TargetType="ToggleButton">
  131. <Border Name="Border">
  132. <Polygon
  133. Name="ExpandPath"
  134. Fill="Black"
  135. Points="2 4 6 8 10 4"
  136. RenderTransformOrigin="0.5,0.5"
  137. Stretch="Uniform">
  138. <Polygon.RenderTransform>
  139. <TransformGroup>
  140. <TranslateTransform X="6" Y="6" />
  141. <RotateTransform Angle="-90" />
  142. <TranslateTransform X="-6" Y="6" />
  143. </TransformGroup>
  144. </Polygon.RenderTransform>
  145. </Polygon>
  146. </Border>
  147. <ControlTemplate.Triggers>
  148. <Trigger Property="IsChecked" Value="True">
  149. <Setter TargetName="ExpandPath" Property="RenderTransform">
  150. <Setter.Value>
  151. <RotateTransform Angle="0" />
  152. </Setter.Value>
  153. </Setter>
  154. </Trigger>
  155. </ControlTemplate.Triggers>
  156. </ControlTemplate>
  157. </Setter.Value>
  158. </Setter>
  159. </Style>
  160. <SolidColorBrush x:Key="Expander.MouseOver.Circle.Stroke" Color="#FF5593FF" />
  161. <SolidColorBrush x:Key="Expander.MouseOver.Circle.Fill" Color="#FFF3F9FF" />
  162. <SolidColorBrush x:Key="Expander.MouseOver.Arrow.Stroke" Color="#FF000000" />
  163. <SolidColorBrush x:Key="Expander.Pressed.Circle.Stroke" Color="#FF3C77DD" />
  164. <SolidColorBrush x:Key="Expander.Pressed.Circle.Fill" Color="#FFD9ECFF" />
  165. <SolidColorBrush x:Key="Expander.Pressed.Arrow.Stroke" Color="#FF000000" />
  166. <SolidColorBrush x:Key="Expander.Disabled.Circle.Stroke" Color="#FFBCBCBC" />
  167. <SolidColorBrush x:Key="Expander.Disabled.Circle.Fill" Color="#FFE6E6E6" />
  168. <SolidColorBrush x:Key="Expander.Disabled.Arrow.Stroke" Color="#FF707070" />
  169. <SolidColorBrush x:Key="Expander.Static.Circle.Fill" Color="#FFFFFFFF" />
  170. <SolidColorBrush x:Key="Expander.Static.Circle.Stroke" Color="#FF333333" />
  171. <SolidColorBrush x:Key="Expander.Static.Arrow.Stroke" Color="#FF333333" />
  172. <Style x:Key="ExpanderHeaderFocusVisual">
  173. <Setter Property="Control.Template">
  174. <Setter.Value>
  175. <ControlTemplate>
  176. <Border>
  177. <Rectangle
  178. Margin="0"
  179. SnapsToDevicePixels="true"
  180. Stroke="Black"
  181. StrokeDashArray="1 2"
  182. StrokeThickness="1" />
  183. </Border>
  184. </ControlTemplate>
  185. </Setter.Value>
  186. </Setter>
  187. </Style>
  188. <Style x:Key="ExpanderDownHeaderStyle" TargetType="{x:Type ToggleButton}">
  189. <Setter Property="Template">
  190. <Setter.Value>
  191. <ControlTemplate TargetType="{x:Type ToggleButton}">
  192. <Border Padding="{TemplateBinding Padding}">
  193. <Grid Background="Transparent" SnapsToDevicePixels="False">
  194. <Grid.ColumnDefinitions>
  195. <ColumnDefinition Width="*" />
  196. <ColumnDefinition Width="19" />
  197. </Grid.ColumnDefinitions>
  198. <Ellipse
  199. x:Name="circle"
  200. Width="19"
  201. Height="19"
  202. HorizontalAlignment="Center"
  203. VerticalAlignment="Center"
  204. Fill="{StaticResource Expander.Static.Circle.Fill}"
  205. Stroke="{StaticResource Expander.Static.Circle.Stroke}"
  206. Visibility="Collapsed" />
  207. <Rectangle Grid.Column="1" Fill="#FFE2E3E6" />
  208. <Polygon
  209. x:Name="arrow"
  210. Grid.Column="1"
  211. Margin="0,0,12,0"
  212. HorizontalAlignment="Center"
  213. VerticalAlignment="Center"
  214. Fill="Black"
  215. Points="11 2 5 8 11 14"
  216. SnapsToDevicePixels="false"
  217. Stroke="{StaticResource Expander.Static.Arrow.Stroke}"
  218. StrokeThickness="2">
  219. <Polygon.RenderTransform>
  220. <TransformGroup>
  221. <TranslateTransform X="8" Y="8" />
  222. <ScaleTransform ScaleX="-1" ScaleY="1" />
  223. <TranslateTransform X="25" Y="-8" />
  224. </TransformGroup>
  225. </Polygon.RenderTransform>
  226. </Polygon>
  227. <Polygon
  228. x:Name="arrowdown"
  229. Grid.Column="1"
  230. Margin="0,0,12,0"
  231. HorizontalAlignment="Center"
  232. VerticalAlignment="Center"
  233. Fill="Black"
  234. Points="11 2 5 8 11 14"
  235. SnapsToDevicePixels="false"
  236. Stroke="{StaticResource Expander.Static.Arrow.Stroke}"
  237. StrokeThickness="2"
  238. Visibility="Collapsed">
  239. <Polygon.RenderTransform>
  240. <TransformGroup>
  241. <TranslateTransform X="8" Y="8" />
  242. <RotateTransform Angle="-90" />
  243. <TranslateTransform X="-5" Y="22" />
  244. </TransformGroup>
  245. </Polygon.RenderTransform>
  246. </Polygon>
  247. <ContentPresenter
  248. Grid.Column="0"
  249. Margin="0,0,0,0"
  250. HorizontalAlignment="Stretch"
  251. VerticalAlignment="Center"
  252. RecognizesAccessKey="True"
  253. SnapsToDevicePixels="True" />
  254. </Grid>
  255. </Border>
  256. <ControlTemplate.Triggers>
  257. <Trigger Property="IsChecked" Value="true">
  258. <Setter TargetName="arrow" Property="Visibility" Value="Collapsed" />
  259. <Setter TargetName="arrowdown" Property="Visibility" Value="Visible" />
  260. </Trigger>
  261. <Trigger Property="IsMouseOver" Value="true">
  262. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.MouseOver.Circle.Stroke}" />
  263. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.MouseOver.Circle.Fill}" />
  264. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
  265. <Setter TargetName="arrowdown" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
  266. </Trigger>
  267. <Trigger Property="IsPressed" Value="true">
  268. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Pressed.Circle.Stroke}" />
  269. <Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
  270. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Pressed.Circle.Fill}" />
  271. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Pressed.Arrow.Stroke}" />
  272. <Setter TargetName="arrowdown" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
  273. </Trigger>
  274. <Trigger Property="IsEnabled" Value="false">
  275. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Disabled.Circle.Stroke}" />
  276. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Disabled.Circle.Fill}" />
  277. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" />
  278. <Setter TargetName="arrowdown" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" />
  279. </Trigger>
  280. </ControlTemplate.Triggers>
  281. </ControlTemplate>
  282. </Setter.Value>
  283. </Setter>
  284. </Style>
  285. <Style x:Key="GropExpanderHeader" TargetType="{x:Type Expander}">
  286. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  287. <Setter Property="Background" Value="Transparent" />
  288. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  289. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  290. <Setter Property="BorderBrush" Value="Transparent" />
  291. <Setter Property="BorderThickness" Value="1" />
  292. <Setter Property="Template">
  293. <Setter.Value>
  294. <ControlTemplate TargetType="{x:Type Expander}">
  295. <Border
  296. Background="{TemplateBinding Background}"
  297. BorderBrush="{TemplateBinding BorderBrush}"
  298. BorderThickness="{TemplateBinding BorderThickness}"
  299. CornerRadius="3"
  300. SnapsToDevicePixels="true">
  301. <DockPanel>
  302. <ToggleButton
  303. x:Name="HeaderSite"
  304. MinWidth="0"
  305. MinHeight="0"
  306. Margin="1"
  307. Padding="{TemplateBinding Padding}"
  308. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  309. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  310. Content="{TemplateBinding Header}"
  311. ContentTemplate="{TemplateBinding HeaderTemplate}"
  312. ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
  313. DockPanel.Dock="Top"
  314. FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}"
  315. FontFamily="{TemplateBinding FontFamily}"
  316. FontSize="{TemplateBinding FontSize}"
  317. FontStretch="{TemplateBinding FontStretch}"
  318. FontStyle="{TemplateBinding FontStyle}"
  319. FontWeight="{TemplateBinding FontWeight}"
  320. Foreground="{TemplateBinding Foreground}"
  321. IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  322. Style="{StaticResource ExpanderDownHeaderStyle}" />
  323. <ContentPresenter
  324. x:Name="ExpandSite"
  325. Margin="{TemplateBinding Padding}"
  326. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  327. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  328. DockPanel.Dock="Bottom"
  329. Focusable="false"
  330. Visibility="Collapsed" />
  331. </DockPanel>
  332. </Border>
  333. <ControlTemplate.Triggers>
  334. <Trigger Property="IsExpanded" Value="true">
  335. <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
  336. </Trigger>
  337. <Trigger Property="IsEnabled" Value="false">
  338. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  339. </Trigger>
  340. </ControlTemplate.Triggers>
  341. </ControlTemplate>
  342. </Setter.Value>
  343. </Setter>
  344. </Style>
  345. <SolidColorBrush x:Key="RadioButton.Static.Background" Color="#FFFFFFFF" />
  346. <SolidColorBrush x:Key="RadioButton.Static.Border" Color="#FF707070" />
  347. <Style x:Key="OptionMarkFocusVisual">
  348. <Setter Property="Control.Template">
  349. <Setter.Value>
  350. <ControlTemplate>
  351. <Rectangle
  352. Margin="14,0,0,0"
  353. SnapsToDevicePixels="true"
  354. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  355. StrokeDashArray="1 2"
  356. StrokeThickness="1" />
  357. </ControlTemplate>
  358. </Setter.Value>
  359. </Setter>
  360. </Style>
  361. <SolidColorBrush x:Key="RadioButton.MouseOver.Background" Color="#1A000000" />
  362. <SolidColorBrush x:Key="RadioButton.MouseOver.Border" Color="#FF5593FF" />
  363. <SolidColorBrush x:Key="RadioButton.MouseOver.Glyph" Color="#FFF3F9FF" />
  364. <SolidColorBrush x:Key="RadioButton.Disabled.Background" Color="#00000000" />
  365. <SolidColorBrush x:Key="RadioButton.Disabled.Border" Color="#FFBCBCBC" />
  366. <SolidColorBrush x:Key="RadioButton.Disabled.Glyph" Color="#FF707070" />
  367. <SolidColorBrush x:Key="RadioButton.Pressed.Background" Color="#26000000" />
  368. <SolidColorBrush x:Key="RadioButton.Pressed.Border" Color="#FF3C77DD" />
  369. <SolidColorBrush x:Key="RadioButton.Pressed.Glyph" Color="#1A477EDE" />
  370. <SolidColorBrush x:Key="RadioButton.Static.Glyph" Color="#FF212121" />
  371. <Style x:Key="PageViewRadioBtn" TargetType="{x:Type RadioButton}">
  372. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
  373. <Setter Property="Background" Value="{StaticResource RadioButton.Static.Background}" />
  374. <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Static.Border}" />
  375. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  376. <Setter Property="BorderThickness" Value="0" />
  377. <Setter Property="Width" Value="72" />
  378. <Setter Property="Height" Value="80" />
  379. <Setter Property="HorizontalContentAlignment" Value="Center" />
  380. <Setter Property="VerticalContentAlignment" Value="Center" />
  381. <Setter Property="Template">
  382. <Setter.Value>
  383. <ControlTemplate TargetType="{x:Type RadioButton}">
  384. <Grid
  385. x:Name="templateRoot"
  386. Background="Transparent"
  387. SnapsToDevicePixels="True">
  388. <Border
  389. x:Name="radioButtonBorder"
  390. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  391. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  392. Background="{TemplateBinding Background}"
  393. BorderBrush="{TemplateBinding BorderBrush}"
  394. BorderThickness="{TemplateBinding BorderThickness}">
  395. <Rectangle
  396. x:Name="optionMark"
  397. Width="{TemplateBinding Width}"
  398. Height="{TemplateBinding Height}"
  399. Opacity="0" />
  400. </Border>
  401. <ContentPresenter
  402. x:Name="contentPresenter"
  403. Margin="{TemplateBinding Padding}"
  404. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  405. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  406. Focusable="False"
  407. RecognizesAccessKey="True"
  408. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  409. </Grid>
  410. <ControlTemplate.Triggers>
  411. <Trigger Property="HasContent" Value="true">
  412. <Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}" />
  413. <Setter Property="Padding" Value="4,-1,0,0" />
  414. </Trigger>
  415. <Trigger Property="IsMouseOver" Value="true">
  416. <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.MouseOver.Background}" />
  417. <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.MouseOver.Border}" />
  418. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.MouseOver.Glyph}" />
  419. </Trigger>
  420. <Trigger Property="IsEnabled" Value="false">
  421. <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Disabled.Background}" />
  422. <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Disabled.Border}" />
  423. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Disabled.Glyph}" />
  424. </Trigger>
  425. <Trigger Property="IsPressed" Value="true">
  426. <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Pressed.Background}" />
  427. <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Pressed.Border}" />
  428. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" />
  429. </Trigger>
  430. <Trigger Property="IsChecked" Value="true">
  431. <Setter TargetName="optionMark" Property="Opacity" Value="1" />
  432. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" />
  433. </Trigger>
  434. <Trigger Property="IsChecked" Value="{x:Null}">
  435. <Setter TargetName="optionMark" Property="Opacity" Value="0.56" />
  436. </Trigger>
  437. </ControlTemplate.Triggers>
  438. </ControlTemplate>
  439. </Setter.Value>
  440. </Setter>
  441. </Style>
  442. <Style x:Key="PagesView_txtContext" TargetType="{x:Type TextBlock}">
  443. <Setter Property="FontFamily" Value="Segoe UI" />
  444. <Setter Property="FontSize" Value="12" />
  445. <Setter Property="TextWrapping" Value="Wrap" />
  446. </Style>
  447. <Style x:Key="PagesView_titleContext" TargetType="{x:Type TextBlock}">
  448. <Setter Property="FontFamily" Value=" Segoe UI Semibold" />
  449. <Setter Property="FontWeight" Value="SemiBold" />
  450. <Setter Property="FontSize" Value="14" />
  451. </Style>
  452. <Style x:Key="PageViewBtn" TargetType="{x:Type Button}">
  453. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
  454. <Setter Property="Background" Value="#00000000" />
  455. <Setter Property="BorderBrush" Value="#FF5593FF" />
  456. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  457. <Setter Property="BorderThickness" Value="0" />
  458. <Setter Property="Width" Value="72" />
  459. <Setter Property="Height" Value="80" />
  460. <Setter Property="HorizontalContentAlignment" Value="Center" />
  461. <Setter Property="VerticalContentAlignment" Value="Center" />
  462. <Setter Property="Focusable" Value="False" />
  463. <Setter Property="Template">
  464. <Setter.Value>
  465. <ControlTemplate TargetType="{x:Type Button}">
  466. <Grid
  467. x:Name="templateRoot"
  468. Background="Transparent"
  469. Focusable="False"
  470. SnapsToDevicePixels="True">
  471. <Border
  472. x:Name="radioButtonBorder"
  473. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  474. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  475. Background="{TemplateBinding Background}"
  476. BorderBrush="{TemplateBinding BorderBrush}"
  477. BorderThickness="{TemplateBinding BorderThickness}"
  478. Focusable="False">
  479. <Rectangle
  480. x:Name="optionMark"
  481. Width="{TemplateBinding Width}"
  482. Height="{TemplateBinding Height}"
  483. Opacity="0" />
  484. </Border>
  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. </Grid>
  494. <ControlTemplate.Triggers>
  495. <Trigger Property="HasContent" Value="true">
  496. <Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}" />
  497. <Setter Property="Padding" Value="4,-1,0,0" />
  498. </Trigger>
  499. <Trigger Property="IsMouseOver" Value="true">
  500. <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.MouseOver.Background}" />
  501. <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.MouseOver.Border}" />
  502. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.MouseOver.Glyph}" />
  503. </Trigger>
  504. <Trigger Property="IsEnabled" Value="false">
  505. <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Disabled.Background}" />
  506. <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Disabled.Border}" />
  507. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Disabled.Glyph}" />
  508. </Trigger>
  509. <Trigger Property="IsPressed" Value="true">
  510. <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Pressed.Background}" />
  511. <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Pressed.Border}" />
  512. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" />
  513. </Trigger>
  514. </ControlTemplate.Triggers>
  515. </ControlTemplate>
  516. </Setter.Value>
  517. </Setter>
  518. </Style>
  519. <SolidColorBrush x:Key="OptionMark.Static.Background" Color="#FFFFFFFF" />
  520. <SolidColorBrush x:Key="OptionMark.Static.Border" Color="#FF707070" />
  521. <SolidColorBrush x:Key="OptionMark.MouseOver.Background" Color="White" />
  522. <SolidColorBrush x:Key="OptionMark.MouseOver.Border" Color="Black" />
  523. <SolidColorBrush x:Key="OptionMark.MouseOver.Glyph" Color="White" />
  524. <SolidColorBrush x:Key="OptionMark.Disabled.Background" Color="#FFE6E6E6" />
  525. <SolidColorBrush x:Key="OptionMark.Disabled.Border" Color="#FFBCBCBC" />
  526. <SolidColorBrush x:Key="OptionMark.Disabled.Glyph" Color="#FF707070" />
  527. <SolidColorBrush x:Key="OptionMark.Pressed.Background" Color="#FFD9ECFF" />
  528. <SolidColorBrush x:Key="OptionMark.Pressed.Border" Color="#FF3C77DD" />
  529. <SolidColorBrush x:Key="OptionMark.Pressed.Glyph" Color="White" />
  530. <SolidColorBrush x:Key="OptionMark.Static.Glyph" Color="White" />
  531. <ControlTemplate x:Key="MenuCheckbox" TargetType="{x:Type CheckBox}">
  532. <Grid
  533. x:Name="templateRoot"
  534. Background="Transparent"
  535. SnapsToDevicePixels="True">
  536. <Grid.ColumnDefinitions>
  537. <ColumnDefinition Width="Auto" />
  538. <ColumnDefinition Width="*" />
  539. </Grid.ColumnDefinitions>
  540. <Border
  541. x:Name="checkBoxBorder"
  542. Width="20"
  543. Height="20"
  544. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  545. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  546. BorderBrush="{TemplateBinding BorderBrush}"
  547. BorderThickness="1">
  548. <Grid x:Name="markGrid">
  549. <Polygon
  550. x:Name="optionMark"
  551. Width="20"
  552. Height="20"
  553. Margin="1,0,0,0"
  554. VerticalAlignment="Center"
  555. Fill="{StaticResource OptionMark.Static.Glyph}"
  556. Opacity="0"
  557. Points="15.5992424 4.59619408 16.3063492 5.30330086 5.69974747 15.9099026 0.396446609 10.6066017 1.10355339 9.89949494 5.7 14.496" />
  558. <Rectangle
  559. x:Name="indeterminateMark"
  560. Width="20"
  561. Height="20"
  562. Fill="{StaticResource OptionMark.Static.Glyph}"
  563. Opacity="0" />
  564. </Grid>
  565. </Border>
  566. <ContentPresenter
  567. x:Name="contentPresenter"
  568. Grid.Column="1"
  569. Margin="{TemplateBinding Padding}"
  570. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  571. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  572. Focusable="False"
  573. RecognizesAccessKey="True"
  574. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  575. </Grid>
  576. <ControlTemplate.Triggers>
  577. <Trigger Property="HasContent" Value="true">
  578. <Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}" />
  579. <Setter Property="Padding" Value="4,-1,0,0" />
  580. </Trigger>
  581. <Trigger Property="IsMouseOver" Value="true">
  582. <Setter TargetName="checkBoxBorder" Property="Background" Value="{StaticResource OptionMark.MouseOver.Background}" />
  583. <Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{StaticResource OptionMark.MouseOver.Border}" />
  584. <Setter TargetName="checkBoxBorder" Property="BorderThickness" Value="2" />
  585. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource OptionMark.MouseOver.Glyph}" />
  586. <Setter TargetName="indeterminateMark" Property="Fill" Value="{StaticResource OptionMark.MouseOver.Glyph}" />
  587. </Trigger>
  588. <Trigger Property="IsEnabled" Value="false">
  589. <Setter TargetName="checkBoxBorder" Property="Background" Value="{StaticResource OptionMark.Disabled.Background}" />
  590. <Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{StaticResource OptionMark.Disabled.Border}" />
  591. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource OptionMark.Disabled.Glyph}" />
  592. <Setter TargetName="indeterminateMark" Property="Fill" Value="{StaticResource OptionMark.Disabled.Glyph}" />
  593. </Trigger>
  594. <Trigger Property="IsPressed" Value="true">
  595. <Setter TargetName="checkBoxBorder" Property="Background" Value="{StaticResource OptionMark.Pressed.Background}" />
  596. <Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{StaticResource OptionMark.Pressed.Border}" />
  597. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource OptionMark.Pressed.Glyph}" />
  598. <Setter TargetName="indeterminateMark" Property="Fill" Value="{StaticResource OptionMark.Pressed.Glyph}" />
  599. </Trigger>
  600. <Trigger Property="IsChecked" Value="true">
  601. <Setter TargetName="optionMark" Property="Opacity" Value="1" />
  602. <Setter TargetName="indeterminateMark" Property="Opacity" Value="0" />
  603. <Setter TargetName="checkBoxBorder" Property="Background" Value="#FF0078D7" />
  604. </Trigger>
  605. <Trigger Property="IsChecked" Value="{x:Null}">
  606. <Setter TargetName="optionMark" Property="Opacity" Value="0" />
  607. <Setter TargetName="indeterminateMark" Property="Opacity" Value="1" />
  608. </Trigger>
  609. </ControlTemplate.Triggers>
  610. </ControlTemplate>
  611. <Style x:Key="zoomcomboxitemstyle" TargetType="ComboBoxItem">
  612. <Setter Property="Template" Value="{StaticResource comboxitem}" />
  613. <Setter Property="Width" Value="224" />
  614. <Setter Property="Height" Value="32" />
  615. <Setter Property="VerticalContentAlignment" Value="Center" />
  616. <Setter Property="FontFamily" Value="Segoe UI" />
  617. <Setter Property="FontSize" Value="14" />
  618. </Style>
  619. </ResourceDictionary>