终端一体化运控平台
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

3916 lignes
225 KiB

  1. <ResourceDictionary
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
  5. xmlns:Themes1="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
  6. xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
  7. xmlns:hc="https://handyorg.github.io/handycontrol"
  8. xmlns:local="clr-namespace:BPASmartClient.CustomResource.UserControls">
  9. <!--#region Color-->
  10. <SolidColorBrush x:Key="foreground" Color="#a2c2e8" />
  11. <SolidColorBrush x:Key="borderBrush" Color="#FF074B92" />
  12. <SolidColorBrush x:Key="Titleforeground" Color="#FF07D7FF" />
  13. <SolidColorBrush x:Key="DataGridColumnHeaderColor" Color="#00c2f4" />
  14. <SolidColorBrush x:Key="LabelColor" Color="#FF00EEF3" />
  15. <SolidColorBrush x:Key="MainTitleforeground" Color="#feffff" />
  16. <SolidColorBrush x:Key="ButtonSelectForeground" Color="#4fade8" />
  17. <SolidColorBrush x:Key="ButtonUnSelectForeground" Color="#3afdff" />
  18. <SolidColorBrush x:Key="MeunSelectForeground" Color="#8f723c" />
  19. <SolidColorBrush x:Key="MeunUnSelectForeground" Color="White" />
  20. <!--<SolidColorBrush x:Key="foreground" Color="Red" />
  21. <SolidColorBrush x:Key="borderBrush" Color="Red" />
  22. <SolidColorBrush x:Key="Titleforeground" Color="Red" />
  23. <SolidColorBrush x:Key="LabelColor" Color="Red" />
  24. <SolidColorBrush x:Key="DataGridColumnHeaderColor" Color="Red"/>
  25. <SolidColorBrush x:Key="MainTitleforeground" Color="Red"/>
  26. <SolidColorBrush x:Key="ButtonSelectForeground" Color="Red"/>
  27. <SolidColorBrush x:Key="ButtonUnSelectForeground" Color="Red"/>
  28. <SolidColorBrush x:Key="MeunSelectForeground" Color="Red"/>
  29. <SolidColorBrush x:Key="MeunUnSelectForeground" Color="Red"/>-->
  30. <!--#endregion-->
  31. <!--#region ScrollBar-->
  32. <Style x:Key="UpScrollBarButton" TargetType="{x:Type RepeatButton}">
  33. <Setter Property="OverridesDefaultStyle" Value="true" />
  34. <Setter Property="Cursor" Value="Hand" />
  35. <Setter Property="Focusable" Value="false" />
  36. <Setter Property="IsTabStop" Value="false" />
  37. <Setter Property="Template">
  38. <Setter.Value>
  39. <ControlTemplate TargetType="{x:Type RepeatButton}">
  40. <Image
  41. Width="8"
  42. Height="5"
  43. Source="Image/Scroll_↑.png" />
  44. </ControlTemplate>
  45. </Setter.Value>
  46. </Setter>
  47. </Style>
  48. <Style x:Key="DownScrollBarButton" TargetType="{x:Type RepeatButton}">
  49. <Setter Property="OverridesDefaultStyle" Value="true" />
  50. <Setter Property="Cursor" Value="Hand" />
  51. <Setter Property="Focusable" Value="false" />
  52. <Setter Property="IsTabStop" Value="false" />
  53. <Setter Property="Template">
  54. <Setter.Value>
  55. <ControlTemplate TargetType="{x:Type RepeatButton}">
  56. <Image
  57. Width="8"
  58. Height="5"
  59. Source="Image/Scroll_↓.png" />
  60. </ControlTemplate>
  61. </Setter.Value>
  62. </Setter>
  63. </Style>
  64. <Style x:Key="LeftScrollBarButton" TargetType="{x:Type RepeatButton}">
  65. <Setter Property="OverridesDefaultStyle" Value="true" />
  66. <Setter Property="Cursor" Value="Hand" />
  67. <Setter Property="Focusable" Value="false" />
  68. <Setter Property="IsTabStop" Value="false" />
  69. <Setter Property="Template">
  70. <Setter.Value>
  71. <ControlTemplate TargetType="{x:Type RepeatButton}">
  72. <Image
  73. Width="5"
  74. Height="8"
  75. Source="Image/Scroll_←.png" />
  76. </ControlTemplate>
  77. </Setter.Value>
  78. </Setter>
  79. </Style>
  80. <Style x:Key="RightScrollBarButton" TargetType="{x:Type RepeatButton}">
  81. <Setter Property="OverridesDefaultStyle" Value="true" />
  82. <Setter Property="Cursor" Value="Hand" />
  83. <Setter Property="Focusable" Value="false" />
  84. <Setter Property="IsTabStop" Value="false" />
  85. <Setter Property="Template">
  86. <Setter.Value>
  87. <ControlTemplate TargetType="{x:Type RepeatButton}">
  88. <Image
  89. Width="5"
  90. Height="8"
  91. Source="Image/Scroll_→.png" />
  92. </ControlTemplate>
  93. </Setter.Value>
  94. </Setter>
  95. </Style>
  96. <Style x:Key="VerticalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
  97. <Setter Property="OverridesDefaultStyle" Value="true" />
  98. <Setter Property="Background" Value="Transparent" />
  99. <Setter Property="Focusable" Value="false" />
  100. <Setter Property="IsTabStop" Value="false" />
  101. <Setter Property="Template">
  102. <Setter.Value>
  103. <ControlTemplate TargetType="{x:Type RepeatButton}">
  104. <Rectangle
  105. Width="{TemplateBinding Width}"
  106. Height="{TemplateBinding Height}"
  107. Fill="{TemplateBinding Background}" />
  108. </ControlTemplate>
  109. </Setter.Value>
  110. </Setter>
  111. </Style>
  112. <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
  113. <Setter Property="OverridesDefaultStyle" Value="true" />
  114. <Setter Property="IsTabStop" Value="false" />
  115. <Setter Property="Template">
  116. <Setter.Value>
  117. <ControlTemplate TargetType="{x:Type Thumb}">
  118. <Border
  119. x:Name="bd1"
  120. Margin="2,2,2,2"
  121. Background="#00c2f4"
  122. CornerRadius="3"
  123. Cursor="Hand"
  124. Opacity="1"
  125. SnapsToDevicePixels="true" />
  126. <ControlTemplate.Triggers>
  127. <Trigger Property="IsMouseOver" Value="true">
  128. <Setter TargetName="bd1" Property="Margin" Value="-1,-1,-1,-1" />
  129. </Trigger>
  130. </ControlTemplate.Triggers>
  131. </ControlTemplate>
  132. </Setter.Value>
  133. </Setter>
  134. </Style>
  135. <LinearGradientBrush x:Key="HorizontalScrollBarBackground" StartPoint="0,0" EndPoint="0,1">
  136. <GradientStop Offset="0" Color="#E1E1E1" />
  137. <GradientStop Offset="0.20" Color="#EDEDED" />
  138. <GradientStop Offset="0.80" Color="#EDEDED" />
  139. <GradientStop Offset="1" Color="#E3E3E3" />
  140. </LinearGradientBrush>
  141. <Style x:Key="HorizontalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
  142. <Setter Property="OverridesDefaultStyle" Value="true" />
  143. <Setter Property="Background" Value="Transparent" />
  144. <Setter Property="Focusable" Value="false" />
  145. <Setter Property="IsTabStop" Value="false" />
  146. <Setter Property="Template">
  147. <Setter.Value>
  148. <ControlTemplate TargetType="{x:Type RepeatButton}">
  149. <Rectangle
  150. Width="{TemplateBinding Width}"
  151. Height="{TemplateBinding Height}"
  152. Fill="{TemplateBinding Background}" />
  153. </ControlTemplate>
  154. </Setter.Value>
  155. </Setter>
  156. </Style>
  157. <Style TargetType="{x:Type ScrollBar}">
  158. <Setter Property="Background">
  159. <Setter.Value>
  160. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/表格标题背景2.png" Opacity="0.2" />
  161. </Setter.Value>
  162. </Setter>
  163. <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
  164. <Setter Property="Stylus.IsFlicksEnabled" Value="false" />
  165. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  166. <Setter Property="Opacity" Value="1" />
  167. <Setter Property="MinWidth" Value="3" />
  168. <Setter Property="Template">
  169. <Setter.Value>
  170. <ControlTemplate TargetType="{x:Type ScrollBar}">
  171. <Border
  172. Width="10"
  173. Margin="0,0,0,0"
  174. Background="{TemplateBinding Background}"
  175. CornerRadius="2"
  176. Opacity="{TemplateBinding Opacity}">
  177. <Grid x:Name="Bg" SnapsToDevicePixels="true">
  178. <Grid.RowDefinitions>
  179. <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}" />
  180. <RowDefinition Height="*" />
  181. <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}" />
  182. </Grid.RowDefinitions>
  183. <RepeatButton
  184. Themes:ScrollChrome.ScrollGlyph="UpArrow"
  185. Command="{x:Static ScrollBar.LineUpCommand}"
  186. IsEnabled="{TemplateBinding IsMouseOver}"
  187. Style="{StaticResource UpScrollBarButton}" />
  188. <Track
  189. x:Name="PART_Track"
  190. Grid.Row="1"
  191. IsDirectionReversed="true"
  192. IsEnabled="{TemplateBinding IsMouseOver}">
  193. <Track.DecreaseRepeatButton>
  194. <RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource VerticalScrollBarPageButton}" />
  195. </Track.DecreaseRepeatButton>
  196. <Track.IncreaseRepeatButton>
  197. <RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource VerticalScrollBarPageButton}" />
  198. </Track.IncreaseRepeatButton>
  199. <Track.Thumb>
  200. <Thumb Themes:ScrollChrome.ScrollGlyph="VerticalGripper" Style="{StaticResource ScrollBarThumb}" />
  201. </Track.Thumb>
  202. </Track>
  203. <RepeatButton
  204. Grid.Row="2"
  205. Themes:ScrollChrome.ScrollGlyph="DownArrow"
  206. Command="{x:Static ScrollBar.LineDownCommand}"
  207. IsEnabled="{TemplateBinding IsMouseOver}"
  208. Style="{StaticResource DownScrollBarButton}" />
  209. </Grid>
  210. </Border>
  211. </ControlTemplate>
  212. </Setter.Value>
  213. </Setter>
  214. <Style.Triggers>
  215. <Trigger Property="Orientation" Value="Horizontal">
  216. <Setter Property="Template">
  217. <Setter.Value>
  218. <ControlTemplate TargetType="{x:Type ScrollBar}">
  219. <Border
  220. Height="10"
  221. Margin="0,0,0,0"
  222. Background="{TemplateBinding Background}"
  223. CornerRadius="2"
  224. Opacity="{TemplateBinding Opacity}">
  225. <Grid
  226. x:Name="Bg"
  227. Background="{TemplateBinding Background}"
  228. SnapsToDevicePixels="true">
  229. <Grid.ColumnDefinitions>
  230. <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}" />
  231. <ColumnDefinition Width="*" />
  232. <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}" />
  233. </Grid.ColumnDefinitions>
  234. <RepeatButton
  235. Themes:ScrollChrome.ScrollGlyph="LeftArrow"
  236. Command="{x:Static ScrollBar.LineLeftCommand}"
  237. IsEnabled="{TemplateBinding IsMouseOver}"
  238. Style="{StaticResource LeftScrollBarButton}" />
  239. <Track
  240. x:Name="PART_Track"
  241. Grid.Column="1"
  242. IsEnabled="{TemplateBinding IsMouseOver}">
  243. <Track.DecreaseRepeatButton>
  244. <RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}" Style="{StaticResource HorizontalScrollBarPageButton}" />
  245. </Track.DecreaseRepeatButton>
  246. <Track.IncreaseRepeatButton>
  247. <RepeatButton Command="{x:Static ScrollBar.PageRightCommand}" Style="{StaticResource HorizontalScrollBarPageButton}" />
  248. </Track.IncreaseRepeatButton>
  249. <Track.Thumb>
  250. <Thumb Themes:ScrollChrome.ScrollGlyph="HorizontalGripper" Style="{StaticResource ScrollBarThumb}" />
  251. </Track.Thumb>
  252. </Track>
  253. <RepeatButton
  254. Grid.Column="2"
  255. Themes:ScrollChrome.ScrollGlyph="RightArrow"
  256. Command="{x:Static ScrollBar.LineRightCommand}"
  257. IsEnabled="{TemplateBinding IsMouseOver}"
  258. Style="{StaticResource RightScrollBarButton}" />
  259. </Grid>
  260. </Border>
  261. </ControlTemplate>
  262. </Setter.Value>
  263. </Setter>
  264. </Trigger>
  265. </Style.Triggers>
  266. </Style>
  267. <LinearGradientBrush x:Key="VerticalScrollBarBackground" StartPoint="0,0" EndPoint="1,0">
  268. <GradientStop Offset="0" Color="#E1E1E1" />
  269. <GradientStop Offset="0.20" Color="#EDEDED" />
  270. <GradientStop Offset="0.80" Color="#EDEDED" />
  271. <GradientStop Offset="1" Color="#E3E3E3" />
  272. </LinearGradientBrush>
  273. <!--#endregion-->
  274. <!--#region Menu-->
  275. <SolidColorBrush x:Key="Menu.Static.Background" Color="#FFF0F0F0" />
  276. <SolidColorBrush x:Key="Expander.Static.Circle.Stroke" Color="#FF333333" />
  277. <SolidColorBrush x:Key="Expander.Static.Circle.Fill" Color="#FFFFFFFF" />
  278. <SolidColorBrush x:Key="Expander.Static.Arrow.Stroke" Color="#FF333333" />
  279. <SolidColorBrush x:Key="Expander.MouseOver.Circle.Stroke" Color="#FF5593FF" />
  280. <SolidColorBrush x:Key="Expander.MouseOver.Circle.Fill" Color="#FFF3F9FF" />
  281. <SolidColorBrush x:Key="Expander.MouseOver.Arrow.Stroke" Color="#FF000000" />
  282. <SolidColorBrush x:Key="Expander.Pressed.Circle.Stroke" Color="#FF3C77DD" />
  283. <SolidColorBrush x:Key="Expander.Pressed.Circle.Fill" Color="#FFD9ECFF" />
  284. <SolidColorBrush x:Key="Expander.Pressed.Arrow.Stroke" Color="#FF000000" />
  285. <SolidColorBrush x:Key="Expander.Disabled.Circle.Stroke" Color="#FFBCBCBC" />
  286. <SolidColorBrush x:Key="Expander.Disabled.Circle.Fill" Color="#FFE6E6E6" />
  287. <SolidColorBrush x:Key="Expander.Disabled.Arrow.Stroke" Color="#FF707070" />
  288. <Style x:Key="ExpanderHeaderFocusVisual">
  289. <Setter Property="Control.Template">
  290. <Setter.Value>
  291. <ControlTemplate>
  292. <Border>
  293. <Rectangle
  294. Margin="0"
  295. SnapsToDevicePixels="true"
  296. Stroke="Black"
  297. StrokeDashArray="1 2"
  298. StrokeThickness="1" />
  299. </Border>
  300. </ControlTemplate>
  301. </Setter.Value>
  302. </Setter>
  303. </Style>
  304. <Style x:Key="ExpanderDownHeaderStyle" TargetType="{x:Type ToggleButton}">
  305. <Setter Property="Template">
  306. <Setter.Value>
  307. <ControlTemplate TargetType="{x:Type ToggleButton}">
  308. <Border Padding="{TemplateBinding Padding}" Cursor="Hand">
  309. <Grid
  310. Height="35"
  311. Margin="5"
  312. SnapsToDevicePixels="False">
  313. <Grid.Background>
  314. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/Exp.png" />
  315. </Grid.Background>
  316. <Grid.ColumnDefinitions>
  317. <ColumnDefinition Width="35" />
  318. <ColumnDefinition Width="*" />
  319. </Grid.ColumnDefinitions>
  320. <Image
  321. Width="15"
  322. Margin="10,0,0,0"
  323. Source="/BPASmartClient.CustomResource;component/Image/上箭头.png" />
  324. <Ellipse
  325. x:Name="circle"
  326. Width="19"
  327. Height="19"
  328. HorizontalAlignment="Center"
  329. VerticalAlignment="Center"
  330. Fill="{StaticResource Expander.Static.Circle.Fill}"
  331. Stroke="{StaticResource Expander.Static.Circle.Stroke}"
  332. Visibility="Collapsed" />
  333. <Path
  334. x:Name="arrow"
  335. HorizontalAlignment="Center"
  336. VerticalAlignment="Center"
  337. Data="M 1,1.5 L 4.5,5 L 8,1.5"
  338. SnapsToDevicePixels="false"
  339. Stroke="{StaticResource Expander.Static.Arrow.Stroke}"
  340. StrokeThickness="2"
  341. Visibility="Collapsed" />
  342. <ContentPresenter
  343. Grid.Column="1"
  344. Margin="4,0,0,0"
  345. HorizontalAlignment="Left"
  346. VerticalAlignment="Center"
  347. RecognizesAccessKey="True"
  348. SnapsToDevicePixels="True" />
  349. </Grid>
  350. </Border>
  351. <ControlTemplate.Triggers>
  352. <Trigger Property="IsChecked" Value="true">
  353. <Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
  354. </Trigger>
  355. <Trigger Property="IsMouseOver" Value="true">
  356. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.MouseOver.Circle.Stroke}" />
  357. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.MouseOver.Circle.Fill}" />
  358. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
  359. </Trigger>
  360. <Trigger Property="IsPressed" Value="true">
  361. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Pressed.Circle.Stroke}" />
  362. <Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
  363. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Pressed.Circle.Fill}" />
  364. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Pressed.Arrow.Stroke}" />
  365. </Trigger>
  366. <Trigger Property="IsEnabled" Value="false">
  367. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Disabled.Circle.Stroke}" />
  368. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Disabled.Circle.Fill}" />
  369. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" />
  370. </Trigger>
  371. </ControlTemplate.Triggers>
  372. </ControlTemplate>
  373. </Setter.Value>
  374. </Setter>
  375. </Style>
  376. <SolidColorBrush x:Key="TextBox.Static.Border" Color="#FFABAdB3" />
  377. <SolidColorBrush x:Key="TextBox.MouseOver.Border" Color="#FF7EB4EA" />
  378. <SolidColorBrush x:Key="TextBox.Focus.Border" Color="#FF569DE5" />
  379. <Style x:Key="ExpanderUpHeaderStyle" TargetType="{x:Type ToggleButton}">
  380. <Setter Property="Template">
  381. <Setter.Value>
  382. <ControlTemplate TargetType="{x:Type ToggleButton}">
  383. <Border Padding="{TemplateBinding Padding}">
  384. <Grid Background="Transparent" SnapsToDevicePixels="False">
  385. <Grid.ColumnDefinitions>
  386. <ColumnDefinition Width="19" />
  387. <ColumnDefinition Width="*" />
  388. </Grid.ColumnDefinitions>
  389. <Grid>
  390. <Grid.LayoutTransform>
  391. <TransformGroup>
  392. <TransformGroup.Children>
  393. <TransformCollection>
  394. <RotateTransform Angle="180" />
  395. </TransformCollection>
  396. </TransformGroup.Children>
  397. </TransformGroup>
  398. </Grid.LayoutTransform>
  399. <Ellipse
  400. x:Name="circle"
  401. Width="19"
  402. Height="19"
  403. HorizontalAlignment="Center"
  404. VerticalAlignment="Center"
  405. Fill="{StaticResource Expander.Static.Circle.Fill}"
  406. Stroke="{StaticResource Expander.Static.Circle.Stroke}" />
  407. <Path
  408. x:Name="arrow"
  409. HorizontalAlignment="Center"
  410. VerticalAlignment="Center"
  411. Data="M 1,1.5 L 4.5,5 L 8,1.5"
  412. SnapsToDevicePixels="false"
  413. Stroke="{StaticResource Expander.Static.Arrow.Stroke}"
  414. StrokeThickness="2" />
  415. </Grid>
  416. <ContentPresenter
  417. Grid.Column="1"
  418. Margin="4,0,0,0"
  419. HorizontalAlignment="Left"
  420. VerticalAlignment="Center"
  421. RecognizesAccessKey="True"
  422. SnapsToDevicePixels="True" />
  423. </Grid>
  424. </Border>
  425. <ControlTemplate.Triggers>
  426. <Trigger Property="IsChecked" Value="true">
  427. <Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
  428. </Trigger>
  429. <Trigger Property="IsMouseOver" Value="true">
  430. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.MouseOver.Circle.Stroke}" />
  431. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.MouseOver.Circle.Fill}" />
  432. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
  433. </Trigger>
  434. <Trigger Property="IsPressed" Value="true">
  435. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Pressed.Circle.Stroke}" />
  436. <Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
  437. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Pressed.Circle.Fill}" />
  438. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Pressed.Arrow.Stroke}" />
  439. </Trigger>
  440. <Trigger Property="IsEnabled" Value="false">
  441. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Disabled.Circle.Stroke}" />
  442. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Disabled.Circle.Fill}" />
  443. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" />
  444. </Trigger>
  445. </ControlTemplate.Triggers>
  446. </ControlTemplate>
  447. </Setter.Value>
  448. </Setter>
  449. </Style>
  450. <Style x:Key="ExpanderLeftHeaderStyle" TargetType="{x:Type ToggleButton}">
  451. <Setter Property="Template">
  452. <Setter.Value>
  453. <ControlTemplate TargetType="{x:Type ToggleButton}">
  454. <Border Padding="{TemplateBinding Padding}">
  455. <Grid Background="Transparent" SnapsToDevicePixels="False">
  456. <Grid.RowDefinitions>
  457. <RowDefinition Height="19" />
  458. <RowDefinition Height="*" />
  459. </Grid.RowDefinitions>
  460. <Grid>
  461. <Grid.LayoutTransform>
  462. <TransformGroup>
  463. <TransformGroup.Children>
  464. <TransformCollection>
  465. <RotateTransform Angle="90" />
  466. </TransformCollection>
  467. </TransformGroup.Children>
  468. </TransformGroup>
  469. </Grid.LayoutTransform>
  470. <Ellipse
  471. x:Name="circle"
  472. Width="19"
  473. Height="19"
  474. HorizontalAlignment="Center"
  475. VerticalAlignment="Center"
  476. Fill="{StaticResource Expander.Static.Circle.Fill}"
  477. Stroke="{StaticResource Expander.Static.Circle.Stroke}" />
  478. <Path
  479. x:Name="arrow"
  480. HorizontalAlignment="Center"
  481. VerticalAlignment="Center"
  482. Data="M 1,1.5 L 4.5,5 L 8,1.5"
  483. SnapsToDevicePixels="false"
  484. Stroke="{StaticResource Expander.Static.Arrow.Stroke}"
  485. StrokeThickness="2" />
  486. </Grid>
  487. <ContentPresenter
  488. Grid.Row="1"
  489. Margin="0,4,0,0"
  490. HorizontalAlignment="Center"
  491. VerticalAlignment="Top"
  492. RecognizesAccessKey="True"
  493. SnapsToDevicePixels="True" />
  494. </Grid>
  495. </Border>
  496. <ControlTemplate.Triggers>
  497. <Trigger Property="IsChecked" Value="true">
  498. <Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
  499. </Trigger>
  500. <Trigger Property="IsMouseOver" Value="true">
  501. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.MouseOver.Circle.Stroke}" />
  502. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.MouseOver.Circle.Fill}" />
  503. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
  504. </Trigger>
  505. <Trigger Property="IsPressed" Value="true">
  506. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Pressed.Circle.Stroke}" />
  507. <Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
  508. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Pressed.Circle.Fill}" />
  509. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Pressed.Arrow.Stroke}" />
  510. </Trigger>
  511. <Trigger Property="IsEnabled" Value="false">
  512. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Disabled.Circle.Stroke}" />
  513. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Disabled.Circle.Fill}" />
  514. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" />
  515. </Trigger>
  516. </ControlTemplate.Triggers>
  517. </ControlTemplate>
  518. </Setter.Value>
  519. </Setter>
  520. </Style>
  521. <Style x:Key="ExpanderRightHeaderStyle" TargetType="{x:Type ToggleButton}">
  522. <Setter Property="Template">
  523. <Setter.Value>
  524. <ControlTemplate TargetType="{x:Type ToggleButton}">
  525. <Border Padding="{TemplateBinding Padding}">
  526. <Grid Background="Transparent" SnapsToDevicePixels="False">
  527. <Grid.RowDefinitions>
  528. <RowDefinition Height="19" />
  529. <RowDefinition Height="*" />
  530. </Grid.RowDefinitions>
  531. <Grid>
  532. <Grid.LayoutTransform>
  533. <TransformGroup>
  534. <TransformGroup.Children>
  535. <TransformCollection>
  536. <RotateTransform Angle="-90" />
  537. </TransformCollection>
  538. </TransformGroup.Children>
  539. </TransformGroup>
  540. </Grid.LayoutTransform>
  541. <Ellipse
  542. x:Name="circle"
  543. Width="19"
  544. Height="19"
  545. HorizontalAlignment="Center"
  546. VerticalAlignment="Center"
  547. Fill="{StaticResource Expander.Static.Circle.Fill}"
  548. Stroke="{StaticResource Expander.Static.Circle.Stroke}" />
  549. <Path
  550. x:Name="arrow"
  551. HorizontalAlignment="Center"
  552. VerticalAlignment="Center"
  553. Data="M 1,1.5 L 4.5,5 L 8,1.5"
  554. SnapsToDevicePixels="false"
  555. Stroke="{StaticResource Expander.Static.Arrow.Stroke}"
  556. StrokeThickness="2" />
  557. </Grid>
  558. <ContentPresenter
  559. Grid.Row="1"
  560. Margin="0,4,0,0"
  561. HorizontalAlignment="Center"
  562. VerticalAlignment="Top"
  563. RecognizesAccessKey="True"
  564. SnapsToDevicePixels="True" />
  565. </Grid>
  566. </Border>
  567. <ControlTemplate.Triggers>
  568. <Trigger Property="IsChecked" Value="true">
  569. <Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
  570. </Trigger>
  571. <Trigger Property="IsMouseOver" Value="true">
  572. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.MouseOver.Circle.Stroke}" />
  573. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.MouseOver.Circle.Fill}" />
  574. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
  575. </Trigger>
  576. <Trigger Property="IsPressed" Value="true">
  577. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Pressed.Circle.Stroke}" />
  578. <Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
  579. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Pressed.Circle.Fill}" />
  580. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Pressed.Arrow.Stroke}" />
  581. </Trigger>
  582. <Trigger Property="IsEnabled" Value="false">
  583. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Disabled.Circle.Stroke}" />
  584. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Disabled.Circle.Fill}" />
  585. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" />
  586. </Trigger>
  587. </ControlTemplate.Triggers>
  588. </ControlTemplate>
  589. </Setter.Value>
  590. </Setter>
  591. </Style>
  592. <Style TargetType="{x:Type Expander}">
  593. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  594. <Setter Property="Background" Value="Transparent" />
  595. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  596. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  597. <Setter Property="BorderBrush" Value="Transparent" />
  598. <Setter Property="BorderThickness" Value="1" />
  599. <Setter Property="Template">
  600. <Setter.Value>
  601. <ControlTemplate TargetType="{x:Type Expander}">
  602. <Border
  603. Background="{TemplateBinding Background}"
  604. BorderBrush="{TemplateBinding BorderBrush}"
  605. BorderThickness="{TemplateBinding BorderThickness}"
  606. CornerRadius="3"
  607. SnapsToDevicePixels="true">
  608. <DockPanel>
  609. <ToggleButton
  610. x:Name="HeaderSite"
  611. MinWidth="0"
  612. MinHeight="0"
  613. Margin="1"
  614. Padding="{TemplateBinding Padding}"
  615. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  616. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  617. Content="{TemplateBinding Header}"
  618. ContentTemplate="{TemplateBinding HeaderTemplate}"
  619. ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
  620. DockPanel.Dock="Top"
  621. FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}"
  622. FontFamily="{TemplateBinding FontFamily}"
  623. FontSize="{TemplateBinding FontSize}"
  624. FontStretch="{TemplateBinding FontStretch}"
  625. FontStyle="{TemplateBinding FontStyle}"
  626. FontWeight="{TemplateBinding FontWeight}"
  627. Foreground="{TemplateBinding Foreground}"
  628. IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  629. Style="{StaticResource ExpanderDownHeaderStyle}" />
  630. <ContentPresenter
  631. x:Name="ExpandSite"
  632. Margin="{TemplateBinding Padding}"
  633. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  634. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  635. DockPanel.Dock="Bottom"
  636. Focusable="false"
  637. Visibility="Collapsed" />
  638. </DockPanel>
  639. </Border>
  640. <ControlTemplate.Triggers>
  641. <Trigger Property="IsExpanded" Value="true">
  642. <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
  643. </Trigger>
  644. <Trigger Property="ExpandDirection" Value="Right">
  645. <Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Right" />
  646. <Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Left" />
  647. <Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource ExpanderRightHeaderStyle}" />
  648. </Trigger>
  649. <Trigger Property="ExpandDirection" Value="Up">
  650. <Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Top" />
  651. <Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Bottom" />
  652. <Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource ExpanderUpHeaderStyle}" />
  653. </Trigger>
  654. <Trigger Property="ExpandDirection" Value="Left">
  655. <Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Left" />
  656. <Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Right" />
  657. <Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource ExpanderLeftHeaderStyle}" />
  658. </Trigger>
  659. <Trigger Property="IsEnabled" Value="false">
  660. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  661. </Trigger>
  662. </ControlTemplate.Triggers>
  663. </ControlTemplate>
  664. </Setter.Value>
  665. </Setter>
  666. </Style>
  667. <Style TargetType="{x:Type Menu}">
  668. <Setter Property="Background" Value="Transparent" />
  669. <Setter Property="FontFamily" Value="{DynamicResource {x:Static SystemFonts.MenuFontFamilyKey}}" />
  670. <Setter Property="FontSize" Value="16" />
  671. <Setter Property="FontStyle" Value="{DynamicResource {x:Static SystemFonts.MenuFontStyleKey}}" />
  672. <Setter Property="FontWeight" Value="{DynamicResource {x:Static SystemFonts.MenuFontWeightKey}}" />
  673. <Setter Property="HorizontalAlignment" Value="Left" />
  674. <Setter Property="VerticalAlignment" Value="Top" />
  675. <Setter Property="Margin" Value="10,10,0,0" />
  676. <Setter Property="Template">
  677. <Setter.Value>
  678. <ControlTemplate TargetType="{x:Type Menu}">
  679. <Border
  680. Padding="{TemplateBinding Padding}"
  681. Background="{TemplateBinding Background}"
  682. BorderBrush="{TemplateBinding BorderBrush}"
  683. BorderThickness="{TemplateBinding BorderThickness}"
  684. SnapsToDevicePixels="true">
  685. <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  686. </Border>
  687. </ControlTemplate>
  688. </Setter.Value>
  689. </Setter>
  690. </Style>
  691. <!--#endregion-->
  692. <!--#region PasswordBox-->
  693. <Style TargetType="{x:Type PasswordBox}">
  694. <!-- ✹✬✮✭✱✷✸❆❊☯☧☬♆➵➶➷➸➻➼➫➬➩➪➭➯➱➽⊙◎▧▨◐◑▒◊▣●♒☺❤☻✿☢ -->
  695. <Setter Property="PasswordChar" Value="❤" />
  696. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
  697. <Setter Property="BorderBrush" Value="{StaticResource TextBox.Static.Border}" />
  698. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  699. <Setter Property="BorderThickness" Value="1" />
  700. <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
  701. <Setter Property="HorizontalContentAlignment" Value="Left" />
  702. <Setter Property="VerticalContentAlignment" Value="Center" />
  703. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  704. <Setter Property="AllowDrop" Value="true" />
  705. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  706. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  707. <Setter Property="CaretBrush" Value="White" />
  708. <Setter Property="Height" Value="24" />
  709. <Setter Property="Template">
  710. <Setter.Value>
  711. <ControlTemplate TargetType="{x:Type PasswordBox}">
  712. <Border
  713. x:Name="border"
  714. BorderBrush="{DynamicResource borderBrush}"
  715. BorderThickness="{TemplateBinding BorderThickness}"
  716. SnapsToDevicePixels="True">
  717. <ScrollViewer
  718. x:Name="PART_ContentHost"
  719. Focusable="false"
  720. HorizontalScrollBarVisibility="Hidden"
  721. VerticalScrollBarVisibility="Hidden" />
  722. </Border>
  723. <ControlTemplate.Triggers>
  724. <Trigger Property="IsEnabled" Value="false">
  725. <Setter TargetName="border" Property="Opacity" Value="0.56" />
  726. </Trigger>
  727. <Trigger Property="IsMouseOver" Value="true">
  728. <!--<Setter TargetName="border" Property="BorderBrush" Value="{StaticResource TextBox.MouseOver.Border}" />-->
  729. </Trigger>
  730. <Trigger Property="IsKeyboardFocused" Value="true">
  731. <!--<Setter TargetName="border" Property="BorderBrush" Value="{StaticResource TextBox.Focus.Border}" />-->
  732. </Trigger>
  733. </ControlTemplate.Triggers>
  734. </ControlTemplate>
  735. </Setter.Value>
  736. </Setter>
  737. <Style.Triggers>
  738. <MultiTrigger>
  739. <MultiTrigger.Conditions>
  740. <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
  741. <Condition Property="IsSelectionActive" Value="false" />
  742. </MultiTrigger.Conditions>
  743. <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
  744. </MultiTrigger>
  745. </Style.Triggers>
  746. </Style>
  747. <!--#endregion-->
  748. <!--#region DatePicker-->
  749. <Style x:Key="DatePickerCalendarStyle_1" TargetType="{x:Type Calendar}">
  750. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  751. <Setter Property="CalendarButtonStyle" Value="{DynamicResource ButtonStyle_Calendar}" />
  752. <Setter Property="CalendarDayButtonStyle" Value="{DynamicResource DayButtonStyle_Calendar}" />
  753. <Setter Property="Template">
  754. <Setter.Value>
  755. <ControlTemplate TargetType="{x:Type Calendar}">
  756. <StackPanel x:Name="PART_Root" HorizontalAlignment="Center">
  757. <CalendarItem
  758. x:Name="PART_CalendarItem"
  759. BorderBrush="#FF051532"
  760. BorderThickness="{TemplateBinding BorderThickness}"
  761. Style="{TemplateBinding CalendarItemStyle}"
  762. Template="{DynamicResource CalendarItemTemplate1}">
  763. <CalendarItem.Background>
  764. <ImageBrush />
  765. </CalendarItem.Background>
  766. </CalendarItem>
  767. </StackPanel>
  768. </ControlTemplate>
  769. </Setter.Value>
  770. </Setter>
  771. </Style>
  772. <Style TargetType="{x:Type DatePickerTextBox}">
  773. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
  774. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
  775. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  776. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  777. <Setter Property="Template">
  778. <Setter.Value>
  779. <ControlTemplate TargetType="{x:Type DatePickerTextBox}">
  780. <Grid>
  781. <Grid.Resources>
  782. <SolidColorBrush x:Key="WatermarkBrush" Color="#FFAAAAAA" />
  783. </Grid.Resources>
  784. <Border
  785. x:Name="Border"
  786. Padding="{TemplateBinding Padding}"
  787. HorizontalAlignment="Center"
  788. VerticalAlignment="Center"
  789. BorderBrush="{TemplateBinding BorderBrush}"
  790. BorderThickness="{TemplateBinding BorderThickness}"
  791. CornerRadius="1"
  792. Opacity="1">
  793. <Grid
  794. x:Name="WatermarkContent"
  795. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  796. VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
  797. <Border x:Name="ContentElement" BorderThickness="1" />
  798. <Border x:Name="watermark_decorator" BorderThickness="1">
  799. <ContentControl
  800. x:Name="PART_Watermark"
  801. Padding="2"
  802. Focusable="False"
  803. IsHitTestVisible="False"
  804. Opacity="0" />
  805. </Border>
  806. <ScrollViewer
  807. x:Name="PART_ContentHost"
  808. Margin="0"
  809. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  810. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
  811. <Border
  812. x:Name="FocusVisual"
  813. BorderBrush="#FF45D6FA"
  814. CornerRadius="1"
  815. IsHitTestVisible="False"
  816. Opacity="0" />
  817. </Grid>
  818. </Border>
  819. <VisualStateManager.VisualStateGroups>
  820. <VisualStateGroup x:Name="CommonStates">
  821. <VisualStateGroup.Transitions>
  822. <VisualTransition GeneratedDuration="0" />
  823. <VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
  824. </VisualStateGroup.Transitions>
  825. <VisualState x:Name="Normal" />
  826. <VisualState x:Name="MouseOver" />
  827. </VisualStateGroup>
  828. <VisualStateGroup x:Name="WatermarkStates">
  829. <VisualStateGroup.Transitions>
  830. <VisualTransition GeneratedDuration="0" />
  831. </VisualStateGroup.Transitions>
  832. <VisualState x:Name="Unwatermarked" />
  833. <VisualState x:Name="Watermarked">
  834. <Storyboard>
  835. <DoubleAnimation
  836. Storyboard.TargetName="ContentElement"
  837. Storyboard.TargetProperty="Opacity"
  838. To="0"
  839. Duration="0" />
  840. <DoubleAnimation
  841. Storyboard.TargetName="PART_Watermark"
  842. Storyboard.TargetProperty="Opacity"
  843. To="1"
  844. Duration="0" />
  845. </Storyboard>
  846. </VisualState>
  847. </VisualStateGroup>
  848. <VisualStateGroup x:Name="FocusStates">
  849. <VisualStateGroup.Transitions>
  850. <VisualTransition GeneratedDuration="0" />
  851. </VisualStateGroup.Transitions>
  852. <VisualState x:Name="Unfocused" />
  853. <VisualState x:Name="Focused">
  854. <Storyboard>
  855. <DoubleAnimation
  856. Storyboard.TargetName="FocusVisual"
  857. Storyboard.TargetProperty="Opacity"
  858. To="1"
  859. Duration="0" />
  860. </Storyboard>
  861. </VisualState>
  862. </VisualStateGroup>
  863. </VisualStateManager.VisualStateGroups>
  864. </Grid>
  865. </ControlTemplate>
  866. </Setter.Value>
  867. </Setter>
  868. </Style>
  869. <Style TargetType="{x:Type DatePicker}">
  870. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  871. <Setter Property="IsTodayHighlighted" Value="True" />
  872. <Setter Property="SelectedDateFormat" Value="Short" />
  873. <Setter Property="Background" Value="Transparent" />
  874. <Setter Property="Padding" Value="2" />
  875. <Setter Property="Height" Value="24" />
  876. <Setter Property="CalendarStyle" Value="{DynamicResource DatePickerCalendarStyle_1}" />
  877. <Setter Property="BorderBrush" Value="{DynamicResource borderBrush}" />
  878. <Setter Property="BorderThickness" Value="1" />
  879. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  880. <Setter Property="FontFamily" Value="../Fonts/#Quartz M" />
  881. <Setter Property="Template">
  882. <Setter.Value>
  883. <ControlTemplate TargetType="{x:Type DatePicker}">
  884. <Border
  885. Padding="{TemplateBinding Padding}"
  886. Background="{TemplateBinding Background}"
  887. BorderBrush="{TemplateBinding BorderBrush}"
  888. BorderThickness="{TemplateBinding BorderThickness}">
  889. <Grid
  890. x:Name="PART_Root"
  891. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  892. VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
  893. <Grid.Resources>
  894. <SolidColorBrush x:Key="DisabledBrush" Color="#A5FFFFFF" />
  895. <ControlTemplate x:Key="DropDownButtonTemplate" TargetType="{x:Type Button}">
  896. <Grid>
  897. <Grid
  898. Width="15"
  899. Height="15"
  900. Margin="0,2,0,0"
  901. HorizontalAlignment="Center"
  902. VerticalAlignment="Top"
  903. Background="#11FFFFFF"
  904. FlowDirection="LeftToRight">
  905. <Grid.ColumnDefinitions>
  906. <ColumnDefinition Width="20*" />
  907. <ColumnDefinition Width="20*" />
  908. <ColumnDefinition Width="20*" />
  909. <ColumnDefinition Width="20*" />
  910. </Grid.ColumnDefinitions>
  911. <Grid.RowDefinitions>
  912. <RowDefinition Height="23*" />
  913. <RowDefinition Height="19*" />
  914. <RowDefinition Height="19*" />
  915. <RowDefinition Height="19*" />
  916. </Grid.RowDefinitions>
  917. <Border
  918. x:Name="Highlight"
  919. Grid.Row="0"
  920. Grid.RowSpan="4"
  921. Grid.ColumnSpan="4"
  922. Margin="-1"
  923. BorderBrush="#FF45D6FA"
  924. BorderThickness="1"
  925. CornerRadius="0,0,1,1"
  926. Opacity="0"
  927. Visibility="Hidden" />
  928. <Border
  929. x:Name="Background"
  930. Grid.Row="1"
  931. Grid.RowSpan="3"
  932. Grid.ColumnSpan="4"
  933. Margin="0,-1,0,0"
  934. Background="#FF1F3B53"
  935. BorderBrush="#FFFFFFFF"
  936. BorderThickness="1"
  937. CornerRadius=".5"
  938. Opacity="1"
  939. Visibility="Hidden" />
  940. <Border
  941. x:Name="BackgroundGradient"
  942. Grid.Row="1"
  943. Grid.RowSpan="3"
  944. Grid.ColumnSpan="4"
  945. Margin="0,-1,0,0"
  946. BorderBrush="#BF000000"
  947. BorderThickness="1"
  948. CornerRadius=".5"
  949. Opacity="1"
  950. Visibility="Hidden">
  951. <Border.Background>
  952. <LinearGradientBrush StartPoint=".7,0" EndPoint=".7,1">
  953. <GradientStop Offset="0" Color="#FFFFFFFF" />
  954. <GradientStop Offset="0.375" Color="#F9FFFFFF" />
  955. <GradientStop Offset="0.625" Color="#E5FFFFFF" />
  956. <GradientStop Offset="1" Color="#C6FFFFFF" />
  957. </LinearGradientBrush>
  958. </Border.Background>
  959. </Border>
  960. <Rectangle
  961. Grid.RowSpan="1"
  962. Grid.ColumnSpan="4"
  963. StrokeThickness="1"
  964. Visibility="Hidden">
  965. <Rectangle.Fill>
  966. <LinearGradientBrush StartPoint="0.46,1.6" EndPoint="0.3,-1.1">
  967. <GradientStop Color="#FF4084BD" />
  968. <GradientStop Offset="1" Color="#FFAFCFEA" />
  969. </LinearGradientBrush>
  970. </Rectangle.Fill>
  971. <Rectangle.Stroke>
  972. <LinearGradientBrush StartPoint="0.48,1.25" EndPoint="0.48,-1">
  973. <GradientStop Color="#FF494949" />
  974. <GradientStop Offset="1" Color="#FF9F9F9F" />
  975. </LinearGradientBrush>
  976. </Rectangle.Stroke>
  977. </Rectangle>
  978. <Path
  979. Grid.Row="1"
  980. Grid.RowSpan="3"
  981. Grid.Column="0"
  982. Grid.ColumnSpan="4"
  983. Margin="4,3,4,3"
  984. HorizontalAlignment="Center"
  985. VerticalAlignment="Center"
  986. Data="M11.426758,8.4305077 L11.749023,8.4305077 L11.749023,16.331387 L10.674805,16.331387 L10.674805,10.299648 L9.0742188,11.298672 L9.0742188,10.294277 C9.4788408,10.090176 9.9094238,9.8090878 10.365967,9.4510155 C10.82251,9.0929432 11.176106,8.7527733 11.426758,8.4305077 z M14.65086,8.4305077 L18.566387,8.4305077 L18.566387,9.3435936 L15.671368,9.3435936 L15.671368,11.255703 C15.936341,11.058764 16.27293,10.960293 16.681133,10.960293 C17.411602,10.960293 17.969301,11.178717 18.354229,11.615566 C18.739157,12.052416 18.931622,12.673672 18.931622,13.479336 C18.931622,15.452317 18.052553,16.438808 16.294415,16.438808 C15.560365,16.438808 14.951641,16.234707 14.468243,15.826504 L14.881817,14.929531 C15.368796,15.326992 15.837872,15.525723 16.289043,15.525723 C17.298809,15.525723 17.803692,14.895514 17.803692,13.635098 C17.803692,12.460618 17.305971,11.873379 16.310528,11.873379 C15.83071,11.873379 15.399232,12.079271 15.016094,12.491055 L14.65086,12.238613 z"
  987. Fill="#FF2F2F2F"
  988. RenderTransformOrigin="0.5,0.5"
  989. Stretch="Fill"
  990. Visibility="Hidden" />
  991. <Ellipse
  992. Grid.ColumnSpan="4"
  993. Width="3"
  994. Height="3"
  995. HorizontalAlignment="Center"
  996. VerticalAlignment="Center"
  997. Fill="#FFFFFFFF"
  998. StrokeThickness="0"
  999. Visibility="Hidden" />
  1000. <Border
  1001. x:Name="DisabledVisual"
  1002. Grid.Row="0"
  1003. Grid.RowSpan="4"
  1004. Grid.ColumnSpan="4"
  1005. BorderBrush="#B2FFFFFF"
  1006. BorderThickness="1"
  1007. CornerRadius="0,0,.5,.5"
  1008. Opacity="0"
  1009. Visibility="Hidden" />
  1010. <Image
  1011. Grid.RowSpan="10"
  1012. Grid.Column="0"
  1013. Grid.ColumnSpan="10"
  1014. Source="/BPASmartClient.CustomResource;component/Image/日历.png" />
  1015. </Grid>
  1016. <VisualStateManager.VisualStateGroups>
  1017. <VisualStateGroup x:Name="CommonStates">
  1018. <VisualStateGroup.Transitions>
  1019. <VisualTransition GeneratedDuration="0" />
  1020. <VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
  1021. <VisualTransition GeneratedDuration="0:0:0.1" To="Pressed" />
  1022. </VisualStateGroup.Transitions>
  1023. <VisualState x:Name="Normal" />
  1024. <VisualState x:Name="MouseOver">
  1025. <Storyboard>
  1026. <ColorAnimation
  1027. Storyboard.TargetName="Background"
  1028. Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
  1029. To="#FF448DCA"
  1030. Duration="0" />
  1031. <ColorAnimationUsingKeyFrames
  1032. BeginTime="0"
  1033. Storyboard.TargetName="BackgroundGradient"
  1034. Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)"
  1035. Duration="00:00:00.001">
  1036. <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF" />
  1037. </ColorAnimationUsingKeyFrames>
  1038. <ColorAnimationUsingKeyFrames
  1039. BeginTime="0"
  1040. Storyboard.TargetName="BackgroundGradient"
  1041. Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)"
  1042. Duration="00:00:00.001">
  1043. <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF" />
  1044. </ColorAnimationUsingKeyFrames>
  1045. <ColorAnimationUsingKeyFrames
  1046. BeginTime="0"
  1047. Storyboard.TargetName="BackgroundGradient"
  1048. Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
  1049. Duration="00:00:00.001">
  1050. <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF" />
  1051. </ColorAnimationUsingKeyFrames>
  1052. </Storyboard>
  1053. </VisualState>
  1054. <VisualState x:Name="Pressed">
  1055. <Storyboard>
  1056. <ColorAnimationUsingKeyFrames
  1057. BeginTime="0"
  1058. Storyboard.TargetName="Background"
  1059. Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
  1060. Duration="00:00:00.001">
  1061. <SplineColorKeyFrame KeyTime="0" Value="#FF448DCA" />
  1062. </ColorAnimationUsingKeyFrames>
  1063. <DoubleAnimationUsingKeyFrames
  1064. BeginTime="0"
  1065. Storyboard.TargetName="Highlight"
  1066. Storyboard.TargetProperty="(UIElement.Opacity)"
  1067. Duration="00:00:00.001">
  1068. <SplineDoubleKeyFrame KeyTime="0" Value="1" />
  1069. </DoubleAnimationUsingKeyFrames>
  1070. <ColorAnimationUsingKeyFrames
  1071. BeginTime="0"
  1072. Storyboard.TargetName="BackgroundGradient"
  1073. Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
  1074. Duration="00:00:00.001">
  1075. <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF" />
  1076. </ColorAnimationUsingKeyFrames>
  1077. <ColorAnimationUsingKeyFrames
  1078. BeginTime="0"
  1079. Storyboard.TargetName="BackgroundGradient"
  1080. Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)"
  1081. Duration="00:00:00.001">
  1082. <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF" />
  1083. </ColorAnimationUsingKeyFrames>
  1084. <ColorAnimationUsingKeyFrames
  1085. BeginTime="0"
  1086. Storyboard.TargetName="BackgroundGradient"
  1087. Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)"
  1088. Duration="00:00:00.001">
  1089. <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF" />
  1090. </ColorAnimationUsingKeyFrames>
  1091. <ColorAnimationUsingKeyFrames
  1092. BeginTime="0"
  1093. Storyboard.TargetName="BackgroundGradient"
  1094. Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)"
  1095. Duration="00:00:00.001">
  1096. <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF" />
  1097. </ColorAnimationUsingKeyFrames>
  1098. </Storyboard>
  1099. </VisualState>
  1100. <VisualState x:Name="Disabled" />
  1101. </VisualStateGroup>
  1102. </VisualStateManager.VisualStateGroups>
  1103. </Grid>
  1104. </ControlTemplate>
  1105. </Grid.Resources>
  1106. <Grid.ColumnDefinitions>
  1107. <ColumnDefinition Width="*" />
  1108. <ColumnDefinition Width="Auto" />
  1109. </Grid.ColumnDefinitions>
  1110. <Button
  1111. x:Name="PART_Button"
  1112. Grid.Row="0"
  1113. Grid.Column="1"
  1114. Width="20"
  1115. Margin="3,0,3,0"
  1116. HorizontalAlignment="Left"
  1117. VerticalAlignment="Top"
  1118. Focusable="False"
  1119. Foreground="{TemplateBinding Foreground}"
  1120. Template="{StaticResource DropDownButtonTemplate}" />
  1121. <DatePickerTextBox
  1122. x:Name="PART_TextBox"
  1123. Grid.Row="0"
  1124. Grid.Column="0"
  1125. HorizontalContentAlignment="Stretch"
  1126. VerticalContentAlignment="Stretch"
  1127. Focusable="{TemplateBinding Focusable}" />
  1128. <Grid
  1129. x:Name="PART_DisabledVisual"
  1130. Grid.Row="0"
  1131. Grid.Column="0"
  1132. Grid.ColumnSpan="2"
  1133. IsHitTestVisible="False"
  1134. Opacity="0">
  1135. <Grid.ColumnDefinitions>
  1136. <ColumnDefinition Width="*" />
  1137. <ColumnDefinition Width="Auto" />
  1138. </Grid.ColumnDefinitions>
  1139. <Rectangle
  1140. Grid.Row="0"
  1141. Grid.Column="0"
  1142. RadiusX="1"
  1143. RadiusY="1" />
  1144. <Rectangle
  1145. Grid.Row="0"
  1146. Grid.Column="1"
  1147. Width="19"
  1148. Height="18"
  1149. Margin="3,0,3,0"
  1150. Fill="#A5FFFFFF"
  1151. RadiusX="1"
  1152. RadiusY="1" />
  1153. <Popup
  1154. x:Name="PART_Popup"
  1155. AllowsTransparency="True"
  1156. Placement="Bottom"
  1157. PlacementTarget="{Binding ElementName=PART_TextBox}"
  1158. StaysOpen="False" />
  1159. </Grid>
  1160. </Grid>
  1161. <VisualStateManager.VisualStateGroups>
  1162. <VisualStateGroup x:Name="CommonStates">
  1163. <VisualState x:Name="Normal" />
  1164. <VisualState x:Name="Disabled">
  1165. <Storyboard>
  1166. <DoubleAnimation
  1167. Storyboard.TargetName="PART_DisabledVisual"
  1168. Storyboard.TargetProperty="Opacity"
  1169. To="1"
  1170. Duration="0" />
  1171. </Storyboard>
  1172. </VisualState>
  1173. </VisualStateGroup>
  1174. </VisualStateManager.VisualStateGroups>
  1175. </Border>
  1176. <ControlTemplate.Triggers>
  1177. <DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="false">
  1178. <Setter TargetName="PART_TextBox" Property="Foreground" Value="{Binding Foreground, RelativeSource={RelativeSource TemplatedParent}}" />
  1179. </DataTrigger>
  1180. </ControlTemplate.Triggers>
  1181. </ControlTemplate>
  1182. </Setter.Value>
  1183. </Setter>
  1184. </Style>
  1185. <Style x:Key="arrowPath" TargetType="Path">
  1186. <Setter Property="Data" Value="M5.5555,8.4319998 L0.5,0.5 L10.611,0.5 z" />
  1187. <Setter Property="Fill" Value="Gray" />
  1188. <Setter Property="Stretch" Value="Fill" />
  1189. <Setter Property="StrokeThickness" Value="1" />
  1190. <Setter Property="Stroke" Value="Black" />
  1191. <Setter Property="Width" Value="8" />
  1192. <Setter Property="Height" Value="5" />
  1193. <Setter Property="SnapsToDevicePixels" Value="True" />
  1194. <Setter Property="Cursor" Value="Hand" />
  1195. </Style>
  1196. <Style x:Key="DayButtonStyle_Calendar" TargetType="CalendarDayButton">
  1197. <Setter Property="Background" Value="#063172" />
  1198. <Setter Property="BorderBrush" Value="Transparent" />
  1199. <Setter Property="FontSize" Value="12" />
  1200. <Setter Property="Template">
  1201. <Setter.Value>
  1202. <ControlTemplate TargetType="{x:Type CalendarDayButton}">
  1203. <Grid x:Name="Grid" Margin="0">
  1204. <Border
  1205. x:Name="Bg"
  1206. Background="{TemplateBinding Background}"
  1207. BorderBrush="{TemplateBinding BorderBrush}"
  1208. BorderThickness="1" />
  1209. <ContentPresenter
  1210. x:Name="NormalText"
  1211. Margin="5,2,5,2"
  1212. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1213. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1214. TextElement.Foreground="{TemplateBinding Foreground}" />
  1215. </Grid>
  1216. <ControlTemplate.Triggers>
  1217. <!-- 不在当月的日期 -->
  1218. <Trigger Property="IsInactive" Value="True">
  1219. <Setter TargetName="Grid" Property="Opacity" Value="0.4" />
  1220. </Trigger>
  1221. <Trigger Property="IsSelected" Value="True">
  1222. <Setter Property="Foreground" Value="Lime" />
  1223. <Setter Property="Background">
  1224. <Setter.Value>
  1225. <RadialGradientBrush>
  1226. <GradientStop Color="#04214e" />
  1227. <GradientStop Offset="0.9" Color="#3051a6" />
  1228. </RadialGradientBrush>
  1229. </Setter.Value>
  1230. </Setter>
  1231. <Setter Property="BorderBrush" Value="#0765f7" />
  1232. </Trigger>
  1233. <Trigger Property="IsToday" Value="True">
  1234. <Setter Property="Foreground" Value="White" />
  1235. <Setter Property="Background">
  1236. <Setter.Value>
  1237. <RadialGradientBrush>
  1238. <GradientStop Color="#04214e" />
  1239. <GradientStop Offset="0.9" Color="#3051a6" />
  1240. </RadialGradientBrush>
  1241. </Setter.Value>
  1242. </Setter>
  1243. <Setter Property="BorderBrush" Value="#0765f7" />
  1244. </Trigger>
  1245. <Trigger Property="IsMouseOver" Value="True">
  1246. <Setter Property="Foreground" Value="Yellow" />
  1247. <Setter Property="Background">
  1248. <Setter.Value>
  1249. <RadialGradientBrush>
  1250. <GradientStop Color="#04214e" />
  1251. <GradientStop Offset="0.9" Color="#3051a6" />
  1252. </RadialGradientBrush>
  1253. </Setter.Value>
  1254. </Setter>
  1255. <Setter Property="BorderBrush" Value="#0765f7" />
  1256. </Trigger>
  1257. </ControlTemplate.Triggers>
  1258. </ControlTemplate>
  1259. </Setter.Value>
  1260. </Setter>
  1261. </Style>
  1262. <Style x:Key="ButtonStyle_Calendar" TargetType="Button">
  1263. <Setter Property="Foreground" Value="{DynamicResource Titleforeground}" />
  1264. <Setter Property="FontSize" Value="12" />
  1265. <Setter Property="HorizontalAlignment" Value="Center" />
  1266. <Setter Property="VerticalAlignment" Value="Center" />
  1267. <Setter Property="Template">
  1268. <Setter.Value>
  1269. <ControlTemplate TargetType="Button">
  1270. <Border
  1271. Name="TitleBarBr"
  1272. Margin="5"
  1273. Background="Transparent"
  1274. BorderBrush="#0a60e6"
  1275. BorderThickness="0.5"
  1276. CornerRadius="4">
  1277. <ContentPresenter
  1278. Margin="{TemplateBinding Margin}"
  1279. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1280. VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  1281. </Border>
  1282. <ControlTemplate.Triggers>
  1283. <Trigger Property="IsMouseOver" Value="False">
  1284. <Setter TargetName="TitleBarBr" Property="Background">
  1285. <Setter.Value>
  1286. <RadialGradientBrush>
  1287. <GradientStop Color="#04214e" />
  1288. <GradientStop Offset="0.9" Color="#023051A6" />
  1289. </RadialGradientBrush>
  1290. </Setter.Value>
  1291. </Setter>
  1292. <Setter TargetName="TitleBarBr" Property="BorderThickness" Value="0.7" />
  1293. </Trigger>
  1294. <Trigger Property="IsMouseOver" Value="False">
  1295. <Setter TargetName="TitleBarBr" Property="Background" Value="Transparent" />
  1296. <Setter TargetName="TitleBarBr" Property="BorderThickness" Value="0" />
  1297. </Trigger>
  1298. </ControlTemplate.Triggers>
  1299. </ControlTemplate>
  1300. </Setter.Value>
  1301. </Setter>
  1302. </Style>
  1303. <ControlTemplate x:Key="CalendarItemTemplate1" TargetType="{x:Type CalendarItem}">
  1304. <ControlTemplate.Resources>
  1305. <DataTemplate x:Key="{x:Static CalendarItem.DayTitleTemplateResourceKey}">
  1306. <TextBlock
  1307. Margin="0,6,0,6"
  1308. HorizontalAlignment="Center"
  1309. VerticalAlignment="Center"
  1310. FontFamily="Verdana"
  1311. FontSize="14"
  1312. FontWeight="Normal"
  1313. Foreground="{DynamicResource foreground}"
  1314. Text="{Binding}" />
  1315. </DataTemplate>
  1316. </ControlTemplate.Resources>
  1317. <Grid x:Name="PART_Root">
  1318. <Grid.Resources>
  1319. <SolidColorBrush x:Key="DisabledColor" Color="#A5FFFFFF" />
  1320. </Grid.Resources>
  1321. <Border
  1322. Background="{TemplateBinding Background}"
  1323. BorderBrush="{TemplateBinding BorderBrush}"
  1324. BorderThickness="{TemplateBinding BorderThickness}"
  1325. CornerRadius="1">
  1326. <Border
  1327. Background="#FF04214E"
  1328. BorderBrush="#FF00499D"
  1329. BorderThickness="1,1,1,1"
  1330. CornerRadius="1,1,1,1">
  1331. <Grid>
  1332. <Grid.Resources>
  1333. <ControlTemplate x:Key="PreviousButtonTemplate" TargetType="{x:Type Button}">
  1334. <Grid Cursor="Hand">
  1335. <Rectangle Opacity="1" Stretch="Fill" />
  1336. <Grid>
  1337. <Path
  1338. x:Name="path"
  1339. Width="6"
  1340. Height="10"
  1341. Margin="14,-6,0,0"
  1342. HorizontalAlignment="Left"
  1343. VerticalAlignment="Center"
  1344. Data="M288.75,232.25 L288.75,240.625 L283,236.625 z"
  1345. Fill="#FF1473E6"
  1346. Stretch="Fill" />
  1347. </Grid>
  1348. <VisualStateManager.VisualStateGroups>
  1349. <VisualStateGroup x:Name="CommonStates">
  1350. <VisualState x:Name="Normal" />
  1351. <VisualState x:Name="MouseOver" />
  1352. <VisualState x:Name="Disabled" />
  1353. </VisualStateGroup>
  1354. </VisualStateManager.VisualStateGroups>
  1355. </Grid>
  1356. </ControlTemplate>
  1357. <ControlTemplate x:Key="NextButtonTemplate" TargetType="{x:Type Button}">
  1358. <Grid Cursor="Hand">
  1359. <Rectangle Opacity="1" Stretch="Fill" />
  1360. <Grid>
  1361. <Path
  1362. x:Name="path"
  1363. Width="6"
  1364. Height="10"
  1365. Margin="0,-6,14,0"
  1366. HorizontalAlignment="Right"
  1367. VerticalAlignment="Center"
  1368. Data="M282.875,231.875 L282.875,240.375 L288.625,236 z"
  1369. Fill="#FF1473E6"
  1370. Stretch="Fill" />
  1371. </Grid>
  1372. <VisualStateManager.VisualStateGroups>
  1373. <VisualStateGroup x:Name="CommonStates">
  1374. <VisualState x:Name="Normal" />
  1375. <VisualState x:Name="MouseOver" />
  1376. <VisualState x:Name="Disabled" />
  1377. </VisualStateGroup>
  1378. </VisualStateManager.VisualStateGroups>
  1379. </Grid>
  1380. </ControlTemplate>
  1381. <ControlTemplate x:Key="HeaderButtonTemplate" TargetType="{x:Type Button}">
  1382. <Grid Cursor="Hand">
  1383. <ContentPresenter
  1384. x:Name="buttonContent"
  1385. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1386. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1387. Content="{TemplateBinding Content}"
  1388. ContentTemplate="{TemplateBinding ContentTemplate}"
  1389. TextElement.FontSize="14"
  1390. TextElement.FontWeight="Normal"
  1391. TextElement.Foreground="{DynamicResource Titleforeground}" />
  1392. <VisualStateManager.VisualStateGroups>
  1393. <VisualStateGroup x:Name="CommonStates">
  1394. <VisualState x:Name="Normal" />
  1395. <VisualState x:Name="MouseOver">
  1396. <Storyboard>
  1397. <ColorAnimation
  1398. Storyboard.TargetName="buttonContent"
  1399. Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)"
  1400. To="#FF73A9D8"
  1401. Duration="0" />
  1402. </Storyboard>
  1403. </VisualState>
  1404. <VisualState x:Name="Disabled">
  1405. <Storyboard>
  1406. <DoubleAnimation
  1407. Storyboard.TargetName="buttonContent"
  1408. Storyboard.TargetProperty="Opacity"
  1409. To=".5"
  1410. Duration="0" />
  1411. </Storyboard>
  1412. </VisualState>
  1413. </VisualStateGroup>
  1414. </VisualStateManager.VisualStateGroups>
  1415. </Grid>
  1416. </ControlTemplate>
  1417. </Grid.Resources>
  1418. <Grid.ColumnDefinitions>
  1419. <ColumnDefinition Width="Auto" />
  1420. <ColumnDefinition Width="Auto" />
  1421. <ColumnDefinition Width="Auto" />
  1422. </Grid.ColumnDefinitions>
  1423. <Grid.RowDefinitions>
  1424. <RowDefinition Height="Auto" />
  1425. <RowDefinition Height="*" />
  1426. </Grid.RowDefinitions>
  1427. <Button
  1428. x:Name="PART_PreviousButton"
  1429. Grid.Row="0"
  1430. Grid.Column="0"
  1431. Width="28"
  1432. Height="20"
  1433. HorizontalAlignment="Left"
  1434. Focusable="False"
  1435. Template="{StaticResource PreviousButtonTemplate}" />
  1436. <Button
  1437. x:Name="PART_HeaderButton"
  1438. Grid.Row="0"
  1439. Grid.Column="1"
  1440. HorizontalAlignment="Center"
  1441. VerticalAlignment="Center"
  1442. Cursor="Hand"
  1443. Focusable="False"
  1444. FontSize="10.5"
  1445. FontWeight="Bold"
  1446. Template="{StaticResource HeaderButtonTemplate}" />
  1447. <Button
  1448. x:Name="PART_NextButton"
  1449. Grid.Row="0"
  1450. Grid.Column="2"
  1451. Width="28"
  1452. Height="20"
  1453. HorizontalAlignment="Right"
  1454. Focusable="False"
  1455. Template="{StaticResource NextButtonTemplate}" />
  1456. <Grid
  1457. x:Name="PART_MonthView"
  1458. Grid.Row="1"
  1459. Grid.ColumnSpan="3"
  1460. Margin="6,-1,6,6"
  1461. HorizontalAlignment="Stretch"
  1462. VerticalAlignment="Stretch"
  1463. Visibility="Visible">
  1464. <Grid.ColumnDefinitions>
  1465. <ColumnDefinition Width="Auto" />
  1466. <ColumnDefinition Width="Auto" />
  1467. <ColumnDefinition Width="Auto" />
  1468. <ColumnDefinition Width="Auto" />
  1469. <ColumnDefinition Width="Auto" />
  1470. <ColumnDefinition Width="Auto" />
  1471. <ColumnDefinition Width="Auto" />
  1472. </Grid.ColumnDefinitions>
  1473. <Grid.RowDefinitions>
  1474. <RowDefinition Height="Auto" />
  1475. <RowDefinition Height="Auto" />
  1476. <RowDefinition Height="Auto" />
  1477. <RowDefinition Height="Auto" />
  1478. <RowDefinition Height="Auto" />
  1479. <RowDefinition Height="Auto" />
  1480. <RowDefinition Height="Auto" />
  1481. </Grid.RowDefinitions>
  1482. </Grid>
  1483. <Grid
  1484. x:Name="PART_YearView"
  1485. Grid.Row="1"
  1486. Grid.ColumnSpan="3"
  1487. Margin="6,-3,7,6"
  1488. HorizontalAlignment="Center"
  1489. Visibility="Hidden">
  1490. <Grid.ColumnDefinitions>
  1491. <ColumnDefinition Width="Auto" />
  1492. <ColumnDefinition Width="Auto" />
  1493. <ColumnDefinition Width="Auto" />
  1494. <ColumnDefinition Width="Auto" />
  1495. </Grid.ColumnDefinitions>
  1496. <Grid.RowDefinitions>
  1497. <RowDefinition Height="Auto" />
  1498. <RowDefinition Height="Auto" />
  1499. <RowDefinition Height="Auto" />
  1500. </Grid.RowDefinitions>
  1501. </Grid>
  1502. </Grid>
  1503. </Border>
  1504. </Border>
  1505. <Rectangle
  1506. x:Name="PART_DisabledVisual"
  1507. Fill="{StaticResource DisabledColor}"
  1508. Opacity="0"
  1509. RadiusX="2"
  1510. RadiusY="2"
  1511. Stretch="Fill"
  1512. Stroke="{StaticResource DisabledColor}"
  1513. StrokeThickness="1"
  1514. Visibility="Collapsed" />
  1515. <VisualStateManager.VisualStateGroups>
  1516. <VisualStateGroup x:Name="CommonStates">
  1517. <VisualState x:Name="Normal" />
  1518. <VisualState x:Name="Disabled">
  1519. <Storyboard>
  1520. <DoubleAnimation
  1521. Storyboard.TargetName="PART_DisabledVisual"
  1522. Storyboard.TargetProperty="Opacity"
  1523. To="1"
  1524. Duration="0" />
  1525. </Storyboard>
  1526. </VisualState>
  1527. </VisualStateGroup>
  1528. </VisualStateManager.VisualStateGroups>
  1529. </Grid>
  1530. <ControlTemplate.Triggers>
  1531. <Trigger Property="IsEnabled" Value="False">
  1532. <Setter TargetName="PART_DisabledVisual" Property="Visibility" Value="Visible" />
  1533. </Trigger>
  1534. <DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" Value="Year">
  1535. <Setter TargetName="PART_MonthView" Property="Visibility" Value="Hidden" />
  1536. <Setter TargetName="PART_YearView" Property="Visibility" Value="Visible" />
  1537. </DataTrigger>
  1538. <DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" Value="Decade">
  1539. <Setter TargetName="PART_MonthView" Property="Visibility" Value="Hidden" />
  1540. <Setter TargetName="PART_YearView" Property="Visibility" Value="Visible" />
  1541. </DataTrigger>
  1542. </ControlTemplate.Triggers>
  1543. </ControlTemplate>
  1544. <Style TargetType="{x:Type Calendar}">
  1545. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  1546. <Setter Property="CalendarButtonStyle" Value="{DynamicResource ButtonStyle_Calendar}" />
  1547. <Setter Property="CalendarDayButtonStyle" Value="{DynamicResource DayButtonStyle_Calendar}" />
  1548. <Setter Property="FontFamily" Value="../Fonts/#Quartz M" />
  1549. <Setter Property="Background">
  1550. <Setter.Value>
  1551. <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
  1552. <GradientStop Offset="0" Color="#FFE4EAF0" />
  1553. <GradientStop Offset="0.16" Color="#FFECF0F4" />
  1554. <GradientStop Offset="0.16" Color="#FFFCFCFD" />
  1555. <GradientStop Offset="1" Color="#FFFFFFFF" />
  1556. </LinearGradientBrush>
  1557. </Setter.Value>
  1558. </Setter>
  1559. <Setter Property="BorderBrush">
  1560. <Setter.Value>
  1561. <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
  1562. <GradientStop Offset="0" Color="#FFA3AEB9" />
  1563. <GradientStop Offset="0.375" Color="#FF8399A9" />
  1564. <GradientStop Offset="0.375" Color="#FF718597" />
  1565. <GradientStop Offset="1" Color="#FF617584" />
  1566. </LinearGradientBrush>
  1567. </Setter.Value>
  1568. </Setter>
  1569. <Setter Property="BorderThickness" Value="1" />
  1570. <Setter Property="Template">
  1571. <Setter.Value>
  1572. <ControlTemplate TargetType="{x:Type Calendar}">
  1573. <StackPanel x:Name="PART_Root" HorizontalAlignment="Center">
  1574. <CalendarItem
  1575. x:Name="PART_CalendarItem"
  1576. BorderBrush="#FF051532"
  1577. BorderThickness="{TemplateBinding BorderThickness}"
  1578. Cursor="Hand"
  1579. Style="{TemplateBinding CalendarItemStyle}"
  1580. Template="{DynamicResource CalendarItemTemplate1}">
  1581. <CalendarItem.Background>
  1582. <ImageBrush />
  1583. </CalendarItem.Background>
  1584. </CalendarItem>
  1585. </StackPanel>
  1586. </ControlTemplate>
  1587. </Setter.Value>
  1588. </Setter>
  1589. </Style>
  1590. <!--#endregion-->
  1591. <!--#region DataGrid-->
  1592. <Style TargetType="{x:Type GridSplitter}">
  1593. <Setter Property="Width" Value="1" />
  1594. <Setter Property="Background" Value="#175c86" />
  1595. <Setter Property="Cursor" Value="SizeWE" />
  1596. <Setter Property="Margin" Value="0,0,0,0" />
  1597. <Setter Property="Template">
  1598. <Setter.Value>
  1599. <ControlTemplate TargetType="{x:Type Thumb}">
  1600. <Border
  1601. Width="{TemplateBinding Width}"
  1602. Margin="{TemplateBinding Margin}"
  1603. Background="{TemplateBinding Background}"
  1604. Opacity="0.4" />
  1605. </ControlTemplate>
  1606. </Setter.Value>
  1607. </Setter>
  1608. </Style>
  1609. <Style x:Key="ColumnHeaderGripperStyle" TargetType="{x:Type Thumb}">
  1610. <Setter Property="Width" Value="1" />
  1611. <Setter Property="Background" Value="#175c86" />
  1612. <Setter Property="Cursor" Value="SizeWE" />
  1613. <Setter Property="Margin" Value="0,0,0,0" />
  1614. <Setter Property="Template">
  1615. <Setter.Value>
  1616. <ControlTemplate TargetType="{x:Type Thumb}">
  1617. <Border
  1618. Width="{TemplateBinding Width}"
  1619. Margin="{TemplateBinding Margin}"
  1620. Background="{TemplateBinding Background}"
  1621. Opacity="0.4" />
  1622. </ControlTemplate>
  1623. </Setter.Value>
  1624. </Setter>
  1625. </Style>
  1626. <Style TargetType="{x:Type DataGridColumnHeader}">
  1627. <Setter Property="HorizontalContentAlignment" Value="Center" />
  1628. <Setter Property="VerticalContentAlignment" Value="Center" />
  1629. <Setter Property="Height" Value="30" />
  1630. <Setter Property="Background">
  1631. <Setter.Value>
  1632. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/表格标题背景2.png" Opacity="0.2" />
  1633. <!--<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/datagrid/data_标题栏背景.png" Opacity="0.3"/>-->
  1634. </Setter.Value>
  1635. </Setter>
  1636. <Setter Property="BorderThickness" Value="0" />
  1637. <Setter Property="Foreground" Value="{DynamicResource DataGridColumnHeaderColor}" />
  1638. <Setter Property="FontSize" Value="14" />
  1639. <Setter Property="Template">
  1640. <Setter.Value>
  1641. <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
  1642. <Grid>
  1643. <Border
  1644. Padding="{TemplateBinding Padding}"
  1645. Background="{TemplateBinding Background}"
  1646. BorderBrush="{TemplateBinding BorderBrush}"
  1647. BorderThickness="{TemplateBinding BorderThickness}">
  1648. <ContentPresenter
  1649. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1650. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1651. RecognizesAccessKey="True"
  1652. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1653. </Border>
  1654. <GridSplitter
  1655. HorizontalAlignment="Right"
  1656. Background="#FF0BAE3F"
  1657. BorderBrush="#FFBD2A2A" />
  1658. <Thumb
  1659. x:Name="PART_RightHeaderGripper"
  1660. Width="2"
  1661. HorizontalAlignment="Right"
  1662. Background="#FF1D9B9E"
  1663. Style="{StaticResource ColumnHeaderGripperStyle}" />
  1664. </Grid>
  1665. </ControlTemplate>
  1666. </Setter.Value>
  1667. </Setter>
  1668. </Style>
  1669. <Style x:Key="DataGridColumnHeader" TargetType="{x:Type DataGridColumnHeader}">
  1670. <Setter Property="HorizontalContentAlignment" Value="Center" />
  1671. <Setter Property="VerticalContentAlignment" Value="Center" />
  1672. <Setter Property="Height" Value="30" />
  1673. <Setter Property="Background">
  1674. <Setter.Value>
  1675. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/datagrid/data_标题栏背景.png" />
  1676. </Setter.Value>
  1677. </Setter>
  1678. <Setter Property="BorderThickness" Value="0" />
  1679. <Setter Property="Foreground" Value="White" />
  1680. <Setter Property="FontSize" Value="10" />
  1681. <Setter Property="Template">
  1682. <Setter.Value>
  1683. <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
  1684. <Grid>
  1685. <Border
  1686. Padding="{TemplateBinding Padding}"
  1687. Background="{TemplateBinding Background}"
  1688. BorderBrush="{TemplateBinding BorderBrush}"
  1689. BorderThickness="{TemplateBinding BorderThickness}">
  1690. <ContentPresenter
  1691. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1692. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1693. RecognizesAccessKey="True"
  1694. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1695. </Border>
  1696. <Thumb
  1697. x:Name="PART_RightHeaderGripper"
  1698. HorizontalAlignment="Right"
  1699. Style="{StaticResource ColumnHeaderGripperStyle}" />
  1700. </Grid>
  1701. </ControlTemplate>
  1702. </Setter.Value>
  1703. </Setter>
  1704. </Style>
  1705. <Style TargetType="{x:Type DataGridRow}">
  1706. <Setter Property="Background" Value="Transparent" />
  1707. <Setter Property="HorizontalContentAlignment" Value="Center" />
  1708. <Setter Property="SnapsToDevicePixels" Value="true" />
  1709. <Setter Property="Foreground" Value="#abf4ff" />
  1710. <Setter Property="BorderBrush" Value="#abf4ff" />
  1711. <Setter Property="FontSize" Value="10" />
  1712. <Setter Property="Template">
  1713. <Setter.Value>
  1714. <ControlTemplate TargetType="{x:Type DataGridRow}">
  1715. <Border
  1716. x:Name="DGR_Border"
  1717. BorderThickness="{TemplateBinding BorderThickness}"
  1718. SnapsToDevicePixels="True">
  1719. <SelectiveScrollingGrid x:Name="selectiveScrollingGrid">
  1720. <SelectiveScrollingGrid.ColumnDefinitions>
  1721. <ColumnDefinition Width="Auto" />
  1722. <ColumnDefinition Width="*" />
  1723. </SelectiveScrollingGrid.ColumnDefinitions>
  1724. <SelectiveScrollingGrid.RowDefinitions>
  1725. <RowDefinition Height="*" />
  1726. <RowDefinition Height="Auto" />
  1727. </SelectiveScrollingGrid.RowDefinitions>
  1728. <DataGridCellsPresenter
  1729. Grid.Column="1"
  1730. ItemsPanel="{TemplateBinding ItemsPanel}"
  1731. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1732. <DataGridDetailsPresenter
  1733. Grid.Row="1"
  1734. Grid.Column="1"
  1735. SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding AreRowDetailsFrozen, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
  1736. Visibility="{TemplateBinding DetailsVisibility}" />
  1737. <DataGridRowHeader
  1738. Grid.RowSpan="2"
  1739. SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
  1740. Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
  1741. </SelectiveScrollingGrid>
  1742. <VisualStateManager.VisualStateGroups>
  1743. <VisualStateGroup x:Name="CommonStates">
  1744. <VisualState x:Name="Normal" />
  1745. <VisualState x:Name="MouseOver">
  1746. <Storyboard>
  1747. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DGR_Border" Storyboard.TargetProperty="(Panel.Background)">
  1748. <DiscreteObjectKeyFrame KeyTime="0">
  1749. <DiscreteObjectKeyFrame.Value>
  1750. <SolidColorBrush Color="#230077BC" />
  1751. </DiscreteObjectKeyFrame.Value>
  1752. </DiscreteObjectKeyFrame>
  1753. </ObjectAnimationUsingKeyFrames>
  1754. </Storyboard>
  1755. </VisualState>
  1756. <VisualState x:Name="Normal_Selected">
  1757. <Storyboard>
  1758. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DGR_Border" Storyboard.TargetProperty="(Panel.Background)">
  1759. <DiscreteObjectKeyFrame KeyTime="0">
  1760. <DiscreteObjectKeyFrame.Value>
  1761. <SolidColorBrush Color="#3D0077BC" />
  1762. </DiscreteObjectKeyFrame.Value>
  1763. </DiscreteObjectKeyFrame>
  1764. </ObjectAnimationUsingKeyFrames>
  1765. </Storyboard>
  1766. </VisualState>
  1767. </VisualStateGroup>
  1768. <VisualStateGroup x:Name="ValidationStates">
  1769. <VisualState x:Name="Valid" />
  1770. <VisualState x:Name="InvalidFocused" />
  1771. <VisualState x:Name="InvalidUnfocused" />
  1772. </VisualStateGroup>
  1773. </VisualStateManager.VisualStateGroups>
  1774. </Border>
  1775. </ControlTemplate>
  1776. </Setter.Value>
  1777. </Setter>
  1778. </Style>
  1779. <Style TargetType="{x:Type DataGridCell}">
  1780. <Setter Property="Background" Value="Transparent" />
  1781. <Setter Property="BorderBrush" Value="#FF31879E" />
  1782. <Setter Property="BorderThickness" Value="0" />
  1783. <Setter Property="Template">
  1784. <Setter.Value>
  1785. <ControlTemplate TargetType="{x:Type DataGridCell}">
  1786. <Border
  1787. Background="{TemplateBinding Background}"
  1788. BorderBrush="{TemplateBinding BorderBrush}"
  1789. BorderThickness="{TemplateBinding BorderThickness}"
  1790. SnapsToDevicePixels="True">
  1791. <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1792. </Border>
  1793. </ControlTemplate>
  1794. </Setter.Value>
  1795. </Setter>
  1796. <Style.Triggers>
  1797. <Trigger Property="IsSelected" Value="True">
  1798. <!--<Setter Property="Background" Value="#FF2281EC"/>-->
  1799. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
  1800. <!--<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>-->
  1801. </Trigger>
  1802. <!--<Trigger Property="IsKeyboardFocusWithin" Value="True">
  1803. <Setter Property="BorderBrush" Value="{DynamicResource {x:Static DataGrid.FocusBorderBrushKey}}"/>
  1804. </Trigger>-->
  1805. <Trigger Property="IsEnabled" Value="false">
  1806. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  1807. </Trigger>
  1808. </Style.Triggers>
  1809. </Style>
  1810. <Style TargetType="{x:Type DataGrid}">
  1811. <Setter Property="AutoGenerateColumns" Value="False" />
  1812. <Setter Property="Background" Value="Transparent" />
  1813. <Setter Property="CanUserAddRows" Value="False" />
  1814. <Setter Property="CanUserDeleteRows" Value="False" />
  1815. <Setter Property="BorderThickness" Value="0" />
  1816. <Setter Property="HeadersVisibility" Value="Column" />
  1817. <Setter Property="GridLinesVisibility" Value="None" />
  1818. <Setter Property="SelectionMode" Value="Single" />
  1819. <!--<Setter Property="Template">
  1820. <Setter.Value>
  1821. <ControlTemplate TargetType="DataGrid">
  1822. <Border BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
  1823. <ScrollViewer x:Name="DG_ScrollViewer" Focusable="False">
  1824. <ScrollViewer.Template>
  1825. <ControlTemplate TargetType="{x:Type ScrollViewer}">
  1826. <Grid>
  1827. <Grid.ColumnDefinitions>
  1828. <ColumnDefinition Width="Auto"/>
  1829. <ColumnDefinition Width="*"/>
  1830. <ColumnDefinition Width="Auto"/>
  1831. </Grid.ColumnDefinitions>
  1832. <Grid.RowDefinitions>
  1833. <RowDefinition Height="Auto"/>
  1834. <RowDefinition Height="*"/>
  1835. <RowDefinition Height="Auto"/>
  1836. </Grid.RowDefinitions>
  1837. <Button Command="ApplicationCommands.SelectAll" Focusable="False" Style="{DynamicResource {ComponentResourceKey ResourceId=DataGridSelectAllButtonStyle, TypeInTargetAssembly={x:Type DataGrid}}}" Width="{Binding CellsPanelHorizontalOffset, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type DataGrid}}}">
  1838. <Button.Visibility>
  1839. <Binding Path="HeadersVisibility" RelativeSource="{RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type DataGrid}}">
  1840. <Binding.ConverterParameter>
  1841. <DataGridHeadersVisibility>All</DataGridHeadersVisibility>
  1842. </Binding.ConverterParameter>
  1843. </Binding>
  1844. </Button.Visibility>
  1845. </Button>
  1846. <DataGridColumnHeadersPresenter x:Name="PART_ColumnHeadersPresenter" Grid.Column="1">
  1847. <DataGridColumnHeadersPresenter.Visibility>
  1848. <Binding Path="HeadersVisibility" RelativeSource="{RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type DataGrid}}">
  1849. <Binding.ConverterParameter>
  1850. <DataGridHeadersVisibility>Column</DataGridHeadersVisibility>
  1851. </Binding.ConverterParameter>
  1852. </Binding>
  1853. </DataGridColumnHeadersPresenter.Visibility>
  1854. </DataGridColumnHeadersPresenter>
  1855. <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" Grid.ColumnSpan="2" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Grid.Row="1"/>
  1856. <ScrollBar x:Name="PART_VerticalScrollBar" Grid.Column="2" Maximum="{TemplateBinding ScrollableHeight}" Orientation="Vertical" Grid.Row="1" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"/>
  1857. <Grid Grid.Column="1" Grid.Row="2" >
  1858. <Grid.ColumnDefinitions>
  1859. <ColumnDefinition Width="{Binding NonFrozenColumnsViewportHorizontalOffset, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type DataGrid}}}"/>
  1860. <ColumnDefinition Width="*"/>
  1861. </Grid.ColumnDefinitions>
  1862. <ScrollBar x:Name="PART_HorizontalScrollBar" Grid.Column="1" Maximum="{TemplateBinding ScrollableWidth}" Orientation="Horizontal" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}"/>
  1863. </Grid>
  1864. </Grid>
  1865. </ControlTemplate>
  1866. </ScrollViewer.Template>
  1867. <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  1868. </ScrollViewer>
  1869. </Border>
  1870. </ControlTemplate>
  1871. </Setter.Value>
  1872. </Setter>-->
  1873. <!--<Style.Triggers>
  1874. <DataTrigger Binding="{Binding PZItems.Count}" Value="0">
  1875. <Setter Property="Visibility" Value="Collapsed"></Setter>
  1876. </DataTrigger>
  1877. </Style.Triggers>-->
  1878. </Style>
  1879. <!--#endregion-->
  1880. <!--#region ListBox-->
  1881. <SolidColorBrush x:Key="ListBorder" Color="#828790" />
  1882. <Style TargetType="{x:Type ListBox}">
  1883. <!--<Setter Property="Background" >
  1884. <Setter.Value>
  1885. <ImageBrush ImageSource="Images/Pop_bg.png" Stretch="Fill" />
  1886. </Setter.Value>
  1887. </Setter>-->
  1888. <Setter Property="Background" Value="Transparent" />
  1889. <Setter Property="BorderBrush" Value="{StaticResource ListBorder}" />
  1890. <Setter Property="BorderThickness" Value="0" />
  1891. <Setter Property="Padding" Value="10" />
  1892. <Setter Property="Foreground" Value="White" />
  1893. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
  1894. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
  1895. <Setter Property="ScrollViewer.PanningMode" Value="Both" />
  1896. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  1897. <Setter Property="VerticalContentAlignment" Value="Center" />
  1898. </Style>
  1899. <!--#endregion-->
  1900. <!--#region ListBoxItem-->
  1901. <Style x:Key="baseListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
  1902. <Setter Property="Background" Value="Transparent" />
  1903. <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
  1904. <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
  1905. <Setter Property="Padding" Value="2,0,0,0" />
  1906. <Setter Property="Foreground" Value="#FF90C390" />
  1907. <Setter Property="Template">
  1908. <Setter.Value>
  1909. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  1910. <Border
  1911. x:Name="Bd"
  1912. Padding="{TemplateBinding Padding}"
  1913. Background="{TemplateBinding Background}"
  1914. BorderBrush="{TemplateBinding BorderBrush}"
  1915. BorderThickness="{TemplateBinding BorderThickness}"
  1916. SnapsToDevicePixels="true">
  1917. <ContentPresenter
  1918. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1919. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1920. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1921. </Border>
  1922. <ControlTemplate.Triggers>
  1923. <Trigger Property="IsSelected" Value="true">
  1924. <Setter TargetName="Bd" Property="Background" Value="#230077BC" />
  1925. <Setter TargetName="Bd" Property="Opacity" Value="0.8" />
  1926. <Setter Property="Foreground" Value="Snow" />
  1927. </Trigger>
  1928. <!--<MultiTrigger>
  1929. <MultiTrigger.Conditions>
  1930. <Condition Property="IsSelected" Value="True"/>
  1931. <Condition Property="Selector.IsSelectionActive" Value="False"/>
  1932. </MultiTrigger.Conditions>
  1933. <Setter Property="Background" TargetName="Bd" Value="#FFA7BB24"/>
  1934. <Setter Property="Foreground" Value="Snow"/>
  1935. </MultiTrigger>-->
  1936. <!--<MultiTrigger>
  1937. <MultiTrigger.Conditions>
  1938. <Condition Binding="{Binding }" Value="true"/>
  1939. <Condition Property="Selector.IsSelectionActive" Value="false"/>
  1940. </MultiTrigger.Conditions>
  1941. <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.InactiveCaptionTextColor}}"/>
  1942. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}}"/>
  1943. </MultiTrigger>
  1944. <Trigger Property="IsEnabled" Value="true">
  1945. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  1946. </Trigger>-->
  1947. </ControlTemplate.Triggers>
  1948. </ControlTemplate>
  1949. </Setter.Value>
  1950. </Setter>
  1951. </Style>
  1952. <Style x:Key="baseListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
  1953. <Setter Property="Background" Value="Transparent" />
  1954. <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
  1955. <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
  1956. <Setter Property="Padding" Value="2,0,0,0" />
  1957. <Setter Property="Foreground" Value="#FF90C390" />
  1958. <Setter Property="Template">
  1959. <Setter.Value>
  1960. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  1961. <Border
  1962. x:Name="Bd"
  1963. Padding="{TemplateBinding Padding}"
  1964. Background="{TemplateBinding Background}"
  1965. BorderBrush="{TemplateBinding BorderBrush}"
  1966. BorderThickness="{TemplateBinding BorderThickness}"
  1967. SnapsToDevicePixels="true">
  1968. <ContentPresenter
  1969. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1970. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1971. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1972. </Border>
  1973. <ControlTemplate.Triggers>
  1974. <MultiTrigger>
  1975. <MultiTrigger.Conditions>
  1976. <Condition Property="IsSelected" Value="True" />
  1977. <Condition Property="Selector.IsSelectionActive" Value="True" />
  1978. </MultiTrigger.Conditions>
  1979. <Setter TargetName="Bd" Property="Opacity" Value="0.6" />
  1980. </MultiTrigger>
  1981. </ControlTemplate.Triggers>
  1982. </ControlTemplate>
  1983. </Setter.Value>
  1984. </Setter>
  1985. </Style>
  1986. <Style BasedOn="{StaticResource baseListBoxItemStyle}" TargetType="{x:Type ListBoxItem}" />
  1987. <Style
  1988. x:Key="ListBoxItemStyle1"
  1989. BasedOn="{StaticResource baseListBoxItemStyle}"
  1990. TargetType="{x:Type ListBoxItem}">
  1991. <Style.Triggers>
  1992. <MultiDataTrigger>
  1993. <MultiDataTrigger.Conditions>
  1994. <Condition Binding="{Binding DataContext.IsNotDeal, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}" Value="false" />
  1995. <Condition Binding="{Binding IsDeal}" Value="0" />
  1996. </MultiDataTrigger.Conditions>
  1997. <Setter Property="Visibility" Value="Collapsed" />
  1998. </MultiDataTrigger>
  1999. <MultiDataTrigger>
  2000. <MultiDataTrigger.Conditions>
  2001. <Condition Binding="{Binding DataContext.IsRecive, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}" Value="false" />
  2002. <Condition Binding="{Binding IsDeal}" Value="1" />
  2003. </MultiDataTrigger.Conditions>
  2004. <Setter Property="Visibility" Value="Collapsed" />
  2005. </MultiDataTrigger>
  2006. <MultiDataTrigger>
  2007. <MultiDataTrigger.Conditions>
  2008. <Condition Binding="{Binding DataContext.IsRefuse, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}" Value="false" />
  2009. <Condition Binding="{Binding IsDeal}" Value="2" />
  2010. </MultiDataTrigger.Conditions>
  2011. <Setter Property="Visibility" Value="Collapsed" />
  2012. </MultiDataTrigger>
  2013. </Style.Triggers>
  2014. </Style>
  2015. <!--#endregion-->
  2016. <!--#region TabControl-->
  2017. <Style x:Key="borderTab4_No" TargetType="Border">
  2018. <Style.Setters>
  2019. <Setter Property="Background">
  2020. <Setter.Value>
  2021. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
  2022. </Setter.Value>
  2023. </Setter>
  2024. </Style.Setters>
  2025. </Style>
  2026. <Style x:Key="borderTab4_Select" TargetType="Border">
  2027. <Style.Setters>
  2028. <Setter Property="Background">
  2029. <Setter.Value>
  2030. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
  2031. </Setter.Value>
  2032. </Setter>
  2033. </Style.Setters>
  2034. </Style>
  2035. <Style x:Key="TabItemFocusVisual">
  2036. <Setter Property="Control.Template">
  2037. <Setter.Value>
  2038. <ControlTemplate>
  2039. <Rectangle
  2040. Margin="4,4,4,2"
  2041. SnapsToDevicePixels="true"
  2042. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  2043. StrokeDashArray="1 2"
  2044. StrokeThickness="1" />
  2045. </ControlTemplate>
  2046. </Setter.Value>
  2047. </Setter>
  2048. </Style>
  2049. <Style TargetType="{x:Type TabControl}">
  2050. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  2051. <Setter Property="HorizontalContentAlignment" Value="Center" />
  2052. <Setter Property="VerticalContentAlignment" Value="Center" />
  2053. <Setter Property="Template">
  2054. <Setter.Value>
  2055. <ControlTemplate TargetType="{x:Type TabControl}">
  2056. <Grid
  2057. ClipToBounds="true"
  2058. KeyboardNavigation.TabNavigation="Local"
  2059. SnapsToDevicePixels="true">
  2060. <Grid.ColumnDefinitions>
  2061. <ColumnDefinition x:Name="ColumnDefinition0" />
  2062. <ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
  2063. </Grid.ColumnDefinitions>
  2064. <Grid.RowDefinitions>
  2065. <RowDefinition x:Name="RowDefinition0" Height="Auto" />
  2066. <RowDefinition x:Name="RowDefinition1" Height="*" />
  2067. </Grid.RowDefinitions>
  2068. <TabPanel
  2069. x:Name="HeaderPanel"
  2070. Grid.Row="0"
  2071. Grid.Column="0"
  2072. Margin="2,2,2,0"
  2073. Panel.ZIndex="1"
  2074. IsItemsHost="true"
  2075. KeyboardNavigation.TabIndex="1" />
  2076. <Border
  2077. x:Name="ContentPanel"
  2078. Grid.Row="1"
  2079. Grid.Column="0"
  2080. BorderBrush="{x:Null}"
  2081. BorderThickness="{TemplateBinding BorderThickness}"
  2082. KeyboardNavigation.DirectionalNavigation="Contained"
  2083. KeyboardNavigation.TabIndex="2"
  2084. KeyboardNavigation.TabNavigation="Local">
  2085. <ContentPresenter
  2086. x:Name="PART_SelectedContentHost"
  2087. Margin="{TemplateBinding Padding}"
  2088. ContentSource="SelectedContent"
  2089. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  2090. </Border>
  2091. </Grid>
  2092. <ControlTemplate.Triggers>
  2093. <Trigger Property="TabStripPlacement" Value="Bottom">
  2094. <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="1" />
  2095. <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
  2096. <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
  2097. <Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
  2098. <Setter TargetName="HeaderPanel" Property="Margin" Value="2,0,2,2" />
  2099. </Trigger>
  2100. <Trigger Property="TabStripPlacement" Value="Left">
  2101. <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="0" />
  2102. <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
  2103. <Setter TargetName="HeaderPanel" Property="Grid.Column" Value="0" />
  2104. <Setter TargetName="ContentPanel" Property="Grid.Column" Value="1" />
  2105. <Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
  2106. <Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
  2107. <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
  2108. <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
  2109. <Setter TargetName="HeaderPanel" Property="Margin" Value="2,2,0,2" />
  2110. </Trigger>
  2111. <Trigger Property="TabStripPlacement" Value="Right">
  2112. <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="0" />
  2113. <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
  2114. <Setter TargetName="HeaderPanel" Property="Grid.Column" Value="1" />
  2115. <Setter TargetName="ContentPanel" Property="Grid.Column" Value="0" />
  2116. <Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
  2117. <Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
  2118. <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
  2119. <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
  2120. <Setter TargetName="HeaderPanel" Property="Margin" Value="0,2,2,2" />
  2121. </Trigger>
  2122. <Trigger Property="IsEnabled" Value="false">
  2123. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  2124. </Trigger>
  2125. </ControlTemplate.Triggers>
  2126. </ControlTemplate>
  2127. </Setter.Value>
  2128. </Setter>
  2129. </Style>
  2130. <Style TargetType="{x:Type TabItem}">
  2131. <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}" />
  2132. <Setter Property="Foreground">
  2133. <Setter.Value>
  2134. #A5FFFFFF
  2135. </Setter.Value>
  2136. </Setter>
  2137. <Setter Property="Padding" Value="6,1,6,1" />
  2138. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  2139. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  2140. <Setter Property="Cursor" Value="Hand" />
  2141. <Setter Property="Template">
  2142. <Setter.Value>
  2143. <ControlTemplate TargetType="{x:Type TabItem}">
  2144. <Border
  2145. x:Name="Bd"
  2146. Height="35"
  2147. Margin="5"
  2148. Padding="{TemplateBinding Padding}"
  2149. BorderThickness="1"
  2150. CornerRadius="2">
  2151. <ContentPresenter
  2152. x:Name="Content"
  2153. HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  2154. VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  2155. ContentSource="Header"
  2156. Cursor="Hand"
  2157. RecognizesAccessKey="True"
  2158. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  2159. </Border>
  2160. <ControlTemplate.Triggers>
  2161. <Trigger Property="IsSelected" Value="true">
  2162. <Setter Property="Foreground" Value="{DynamicResource MeunSelectForeground}" />
  2163. <Setter TargetName="Bd" Property="Background">
  2164. <Setter.Value>
  2165. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
  2166. </Setter.Value>
  2167. </Setter>
  2168. </Trigger>
  2169. <Trigger Property="IsSelected" Value="False">
  2170. <Setter Property="Foreground" Value="{DynamicResource MeunUnSelectForeground}" />
  2171. <Setter TargetName="Bd" Property="Background">
  2172. <Setter.Value>
  2173. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
  2174. </Setter.Value>
  2175. </Setter>
  2176. </Trigger>
  2177. <Trigger Property="IsMouseOver" Value="True">
  2178. <Setter Property="Foreground" Value="#8f723c" />
  2179. <Setter TargetName="Bd" Property="Background">
  2180. <Setter.Value>
  2181. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
  2182. </Setter.Value>
  2183. </Setter>
  2184. </Trigger>
  2185. </ControlTemplate.Triggers>
  2186. </ControlTemplate>
  2187. </Setter.Value>
  2188. </Setter>
  2189. </Style>
  2190. <Style x:Key="TabItem样式1" TargetType="{x:Type TabItem}">
  2191. <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}" />
  2192. <Setter Property="Foreground" Value="#A5FFFFFF" />
  2193. <Setter Property="Padding" Value="6,1,6,1" />
  2194. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  2195. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  2196. <Setter Property="Template">
  2197. <Setter.Value>
  2198. <ControlTemplate TargetType="{x:Type TabItem}">
  2199. <Border
  2200. x:Name="Bd"
  2201. Height="60"
  2202. Margin="2"
  2203. Padding="{TemplateBinding Padding}"
  2204. BorderThickness="1"
  2205. CornerRadius="2">
  2206. <ContentPresenter
  2207. x:Name="Content"
  2208. HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  2209. VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  2210. ContentSource="Header"
  2211. Cursor="Hand"
  2212. RecognizesAccessKey="True"
  2213. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  2214. </Border>
  2215. <ControlTemplate.Triggers>
  2216. <Trigger Property="IsSelected" Value="true">
  2217. <Setter Property="Foreground" Value="#8f723c" />
  2218. <Setter TargetName="Bd" Property="Background">
  2219. <Setter.Value>
  2220. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab3_Select.png" />
  2221. </Setter.Value>
  2222. </Setter>
  2223. </Trigger>
  2224. <Trigger Property="IsSelected" Value="False">
  2225. <Setter Property="Foreground" Value="#134278" />
  2226. <Setter TargetName="Bd" Property="Background">
  2227. <Setter.Value>
  2228. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab3_No.png" />
  2229. </Setter.Value>
  2230. </Setter>
  2231. </Trigger>
  2232. </ControlTemplate.Triggers>
  2233. </ControlTemplate>
  2234. </Setter.Value>
  2235. </Setter>
  2236. </Style>
  2237. <Style x:Key="TabItem样式2" TargetType="{x:Type TabItem}">
  2238. <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}" />
  2239. <Setter Property="Foreground">
  2240. <Setter.Value>
  2241. #A5FFFFFF
  2242. </Setter.Value>
  2243. </Setter>
  2244. <Setter Property="Padding" Value="6,1,6,1" />
  2245. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  2246. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  2247. <Setter Property="Template">
  2248. <Setter.Value>
  2249. <ControlTemplate TargetType="{x:Type TabItem}">
  2250. <Border
  2251. x:Name="Bd"
  2252. Height="60"
  2253. Margin="2"
  2254. Padding="{TemplateBinding Padding}"
  2255. BorderThickness="1"
  2256. CornerRadius="2">
  2257. <ContentPresenter
  2258. x:Name="Content"
  2259. HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  2260. VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  2261. ContentSource="Header"
  2262. Cursor="Hand"
  2263. RecognizesAccessKey="True"
  2264. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  2265. </Border>
  2266. <ControlTemplate.Triggers>
  2267. <Trigger Property="IsSelected" Value="true">
  2268. <Setter Property="Foreground" Value="#8f723c" />
  2269. <Setter TargetName="Bd" Property="Background">
  2270. <Setter.Value>
  2271. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab_SelectBJ.png" />
  2272. </Setter.Value>
  2273. </Setter>
  2274. </Trigger>
  2275. <Trigger Property="IsSelected" Value="False">
  2276. <Setter Property="Foreground" Value="#134278" />
  2277. <Setter TargetName="Bd" Property="Background">
  2278. <Setter.Value>
  2279. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab_NoBJ.png" />
  2280. </Setter.Value>
  2281. </Setter>
  2282. </Trigger>
  2283. </ControlTemplate.Triggers>
  2284. </ControlTemplate>
  2285. </Setter.Value>
  2286. </Setter>
  2287. </Style>
  2288. <!--#endregion-->
  2289. <!--#region ProgressBar圆形统计图-->
  2290. <SolidColorBrush x:Key="ProgressBar.Progress.圆形蓝.Text" Color="#FF0089E6" />
  2291. <SolidColorBrush x:Key="ProgressBar.Progress.圆形蓝.UnSelect" Color="#330089E6" />
  2292. <SolidColorBrush x:Key="ProgressBar.Progress.圆形蓝.Select" Color="#FF0089E6" />
  2293. <LinearGradientBrush x:Key="ProgressBar.Progress.动画蓝" StartPoint="1,0" EndPoint="0,0">
  2294. <GradientStop Offset="0" Color="#00000000" />
  2295. <GradientStop Offset="0.4" Color="#4C57B9FB" />
  2296. <GradientStop Offset="0.6" Color="#FF57B9FB" />
  2297. <GradientStop Offset="0.8" Color="#4C57B9FB" />
  2298. <GradientStop Offset="1" Color="#00000000" />
  2299. </LinearGradientBrush>
  2300. <SolidColorBrush x:Key="ProgressBar.Progress.圆形绿.Text" Color="#FF00DC00" />
  2301. <SolidColorBrush x:Key="ProgressBar.Progress.圆形绿.UnSelect" Color="#3300DC00" />
  2302. <SolidColorBrush x:Key="ProgressBar.Progress.圆形绿.Select" Color="#FF00DC00" />
  2303. <LinearGradientBrush x:Key="ProgressBar.Progress.动画绿" StartPoint="1,0" EndPoint="0,0">
  2304. <GradientStop Offset="0" Color="#00000000" />
  2305. <GradientStop Offset="0.4" Color="#4C72F972" />
  2306. <GradientStop Offset="0.6" Color="#FF72F972" />
  2307. <GradientStop Offset="0.8" Color="#4C72F972" />
  2308. <GradientStop Offset="1" Color="#00000000" />
  2309. </LinearGradientBrush>
  2310. <SolidColorBrush x:Key="ProgressBar.Progress.圆形红.Text" Color="#FFF10000" />
  2311. <SolidColorBrush x:Key="ProgressBar.Progress.圆形红.UnSelect" Color="#33F10000" />
  2312. <SolidColorBrush x:Key="ProgressBar.Progress.圆形红.Select" Color="#FFF10000" />
  2313. <LinearGradientBrush x:Key="ProgressBar.Progress.动画红" StartPoint="1,0" EndPoint="0,0">
  2314. <GradientStop Offset="0" Color="#00000000" />
  2315. <GradientStop Offset="0.4" Color="#4CFF5858" />
  2316. <GradientStop Offset="0.6" Color="#FFFF5858" />
  2317. <GradientStop Offset="0.8" Color="#4CFF5858" />
  2318. <GradientStop Offset="1" Color="#00000000" />
  2319. </LinearGradientBrush>
  2320. <LinearGradientBrush x:Key="ProgressBar.动画" StartPoint="1,0" EndPoint="0,0">
  2321. <GradientStop Offset="0" Color="#00000000" />
  2322. <GradientStop Offset="0.4" Color="#6F06F11F" />
  2323. <GradientStop Offset="0.6" Color="LightBlue" />
  2324. <GradientStop Offset="0.8" Color="#6F06F11F" />
  2325. <GradientStop Offset="1" Color="#00000000" />
  2326. </LinearGradientBrush>
  2327. <LinearGradientBrush x:Key="ProgressBar.Progress" StartPoint="0,0" EndPoint="1,0">
  2328. <GradientStop Offset="0" Color="#4F05CE10" />
  2329. <GradientStop Offset="1" Color="#6F06F11F" />
  2330. </LinearGradientBrush>
  2331. <SolidColorBrush x:Key="ProgressBar.Background" Color="#072a56" />
  2332. <SolidColorBrush x:Key="ProgressBar.Border" Color="#072a56" />
  2333. <local:Style3DashConverter x:Key="Style3Dash" />
  2334. <local:Style3ArcConverter x:Key="Style3Arc" />
  2335. <Style x:Key="CircleProgressBar蓝" TargetType="{x:Type ProgressBar}">
  2336. <Setter Property="Width" Value="100" />
  2337. <Setter Property="Height" Value="100" />
  2338. <Setter Property="Template">
  2339. <Setter.Value>
  2340. <ControlTemplate TargetType="{x:Type ProgressBar}">
  2341. <ControlTemplate.Resources>
  2342. <Storyboard x:Key="maindh" RepeatBehavior="Forever">
  2343. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ell动画" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)">
  2344. <EasingDoubleKeyFrame KeyTime="0" Value="-90" />
  2345. <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
  2346. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="90" />
  2347. </DoubleAnimationUsingKeyFrames>
  2348. </Storyboard>
  2349. </ControlTemplate.Resources>
  2350. <Grid>
  2351. <Rectangle
  2352. Fill="#ef426f"
  2353. RadiusX="5"
  2354. RadiusY="5"
  2355. Visibility="Collapsed" />
  2356. <Ellipse
  2357. x:Name="ell动画"
  2358. Width="80"
  2359. Height="80"
  2360. RenderTransformOrigin="0.5,0.5"
  2361. Stroke="{DynamicResource ProgressBar.Progress.动画蓝}"
  2362. StrokeDashCap="Flat"
  2363. StrokeThickness="10">
  2364. <Ellipse.RenderTransform>
  2365. <TransformGroup>
  2366. <!-- 旋转变换 -->
  2367. <RotateTransform Angle="-90" />
  2368. <!-- 缩放变换 -->
  2369. <ScaleTransform ScaleX="1" ScaleY="1" />
  2370. <!-- 倾斜变换 -->
  2371. <SkewTransform AngleX="0" AngleY="0" />
  2372. <!-- 移动变换 -->
  2373. <TranslateTransform X="0" Y="0" />
  2374. </TransformGroup>
  2375. </Ellipse.RenderTransform>
  2376. <Ellipse.StrokeDashArray>
  2377. <MultiBinding Converter="{StaticResource Style3Arc}">
  2378. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  2379. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  2380. </MultiBinding>
  2381. </Ellipse.StrokeDashArray>
  2382. </Ellipse>
  2383. <Ellipse
  2384. Width="80"
  2385. Height="80"
  2386. Stroke="{DynamicResource ProgressBar.Progress.圆形蓝.UnSelect}"
  2387. StrokeThickness="10" />
  2388. <Ellipse
  2389. Width="80"
  2390. Height="80"
  2391. RenderTransformOrigin="0.5,0.5"
  2392. Stroke="{DynamicResource ProgressBar.Progress.圆形蓝.Select}"
  2393. StrokeDashCap="Flat"
  2394. StrokeThickness="10">
  2395. <Ellipse.RenderTransform>
  2396. <RotateTransform Angle="-90" />
  2397. </Ellipse.RenderTransform>
  2398. <Ellipse.StrokeDashArray>
  2399. <MultiBinding Converter="{StaticResource Style3Arc}">
  2400. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  2401. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  2402. </MultiBinding>
  2403. </Ellipse.StrokeDashArray>
  2404. </Ellipse>
  2405. <TextBlock
  2406. HorizontalAlignment="Center"
  2407. VerticalAlignment="Center"
  2408. FontFamily="../Fonts/#Quartz M"
  2409. FontSize="20"
  2410. Foreground="{DynamicResource ProgressBar.Progress.圆形蓝.Text}"
  2411. Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat=\{0\}%}" />
  2412. </Grid>
  2413. <ControlTemplate.Triggers>
  2414. <EventTrigger RoutedEvent="Loaded">
  2415. <BeginStoryboard Storyboard="{StaticResource maindh}" />
  2416. </EventTrigger>
  2417. </ControlTemplate.Triggers>
  2418. </ControlTemplate>
  2419. </Setter.Value>
  2420. </Setter>
  2421. </Style>
  2422. <Style x:Key="CircleProgressBar绿" TargetType="{x:Type ProgressBar}">
  2423. <Setter Property="Width" Value="100" />
  2424. <Setter Property="Height" Value="100" />
  2425. <Setter Property="Template">
  2426. <Setter.Value>
  2427. <ControlTemplate TargetType="{x:Type ProgressBar}">
  2428. <ControlTemplate.Resources>
  2429. <Storyboard x:Key="maindh" RepeatBehavior="Forever">
  2430. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ell动画" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)">
  2431. <EasingDoubleKeyFrame KeyTime="0" Value="-90" />
  2432. <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
  2433. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="90" />
  2434. </DoubleAnimationUsingKeyFrames>
  2435. </Storyboard>
  2436. </ControlTemplate.Resources>
  2437. <Grid>
  2438. <Rectangle
  2439. Fill="#ef426f"
  2440. RadiusX="5"
  2441. RadiusY="5"
  2442. Visibility="Collapsed" />
  2443. <Ellipse
  2444. x:Name="ell动画"
  2445. Width="80"
  2446. Height="80"
  2447. RenderTransformOrigin="0.5,0.5"
  2448. Stroke="{DynamicResource ProgressBar.Progress.动画绿}"
  2449. StrokeDashCap="Flat"
  2450. StrokeThickness="10">
  2451. <Ellipse.RenderTransform>
  2452. <TransformGroup>
  2453. <!-- 旋转变换 -->
  2454. <RotateTransform Angle="-90" />
  2455. <!-- 缩放变换 -->
  2456. <ScaleTransform ScaleX="1" ScaleY="1" />
  2457. <!-- 倾斜变换 -->
  2458. <SkewTransform AngleX="0" AngleY="0" />
  2459. <!-- 移动变换 -->
  2460. <TranslateTransform X="0" Y="0" />
  2461. </TransformGroup>
  2462. </Ellipse.RenderTransform>
  2463. <Ellipse.StrokeDashArray>
  2464. <MultiBinding Converter="{StaticResource Style3Arc}">
  2465. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  2466. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  2467. </MultiBinding>
  2468. </Ellipse.StrokeDashArray>
  2469. </Ellipse>
  2470. <Ellipse
  2471. Width="80"
  2472. Height="80"
  2473. Stroke="{DynamicResource ProgressBar.Progress.圆形绿.UnSelect}"
  2474. StrokeThickness="10" />
  2475. <Ellipse
  2476. Width="80"
  2477. Height="80"
  2478. RenderTransformOrigin="0.5,0.5"
  2479. Stroke="{DynamicResource ProgressBar.Progress.圆形绿.Select}"
  2480. StrokeDashCap="Flat"
  2481. StrokeThickness="10">
  2482. <Ellipse.RenderTransform>
  2483. <RotateTransform Angle="-90" />
  2484. </Ellipse.RenderTransform>
  2485. <Ellipse.StrokeDashArray>
  2486. <MultiBinding Converter="{StaticResource Style3Arc}">
  2487. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  2488. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  2489. </MultiBinding>
  2490. </Ellipse.StrokeDashArray>
  2491. </Ellipse>
  2492. <TextBlock
  2493. HorizontalAlignment="Center"
  2494. VerticalAlignment="Center"
  2495. FontFamily="../Fonts/#Quartz M"
  2496. FontSize="20"
  2497. Foreground="{DynamicResource ProgressBar.Progress.圆形绿.Text}"
  2498. Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat=\{0\}%}" />
  2499. </Grid>
  2500. <ControlTemplate.Triggers>
  2501. <EventTrigger RoutedEvent="Loaded">
  2502. <BeginStoryboard Storyboard="{StaticResource maindh}" />
  2503. </EventTrigger>
  2504. </ControlTemplate.Triggers>
  2505. </ControlTemplate>
  2506. </Setter.Value>
  2507. </Setter>
  2508. </Style>
  2509. <Style x:Key="CircleProgressBar红" TargetType="{x:Type ProgressBar}">
  2510. <Setter Property="Width" Value="100" />
  2511. <Setter Property="Height" Value="100" />
  2512. <Setter Property="Template">
  2513. <Setter.Value>
  2514. <ControlTemplate TargetType="{x:Type ProgressBar}">
  2515. <ControlTemplate.Resources>
  2516. <Storyboard x:Key="maindh" RepeatBehavior="Forever">
  2517. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ell动画" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)">
  2518. <EasingDoubleKeyFrame KeyTime="0" Value="-90" />
  2519. <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
  2520. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="90" />
  2521. </DoubleAnimationUsingKeyFrames>
  2522. </Storyboard>
  2523. </ControlTemplate.Resources>
  2524. <Grid>
  2525. <Rectangle
  2526. Fill="#ef426f"
  2527. RadiusX="5"
  2528. RadiusY="5"
  2529. Visibility="Collapsed" />
  2530. <Ellipse
  2531. x:Name="ell动画"
  2532. Width="80"
  2533. Height="80"
  2534. RenderTransformOrigin="0.5,0.5"
  2535. Stroke="{DynamicResource ProgressBar.Progress.动画红}"
  2536. StrokeDashCap="Flat"
  2537. StrokeThickness="10">
  2538. <Ellipse.RenderTransform>
  2539. <TransformGroup>
  2540. <!-- 旋转变换 -->
  2541. <RotateTransform Angle="-90" />
  2542. <!-- 缩放变换 -->
  2543. <ScaleTransform ScaleX="1" ScaleY="1" />
  2544. <!-- 倾斜变换 -->
  2545. <SkewTransform AngleX="0" AngleY="0" />
  2546. <!-- 移动变换 -->
  2547. <TranslateTransform X="0" Y="0" />
  2548. </TransformGroup>
  2549. </Ellipse.RenderTransform>
  2550. <Ellipse.StrokeDashArray>
  2551. <MultiBinding Converter="{StaticResource Style3Arc}">
  2552. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  2553. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  2554. </MultiBinding>
  2555. </Ellipse.StrokeDashArray>
  2556. </Ellipse>
  2557. <Ellipse
  2558. Width="80"
  2559. Height="80"
  2560. Stroke="{DynamicResource ProgressBar.Progress.圆形红.UnSelect}"
  2561. StrokeThickness="10" />
  2562. <Ellipse
  2563. Width="80"
  2564. Height="80"
  2565. RenderTransformOrigin="0.5,0.5"
  2566. Stroke="{DynamicResource ProgressBar.Progress.圆形红.Select}"
  2567. StrokeDashCap="Flat"
  2568. StrokeThickness="10">
  2569. <Ellipse.RenderTransform>
  2570. <RotateTransform Angle="-90" />
  2571. </Ellipse.RenderTransform>
  2572. <Ellipse.StrokeDashArray>
  2573. <MultiBinding Converter="{StaticResource Style3Arc}">
  2574. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  2575. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  2576. </MultiBinding>
  2577. </Ellipse.StrokeDashArray>
  2578. </Ellipse>
  2579. <TextBlock
  2580. HorizontalAlignment="Center"
  2581. VerticalAlignment="Center"
  2582. FontFamily="../Fonts/#Quartz M"
  2583. FontSize="20"
  2584. Foreground="{DynamicResource ProgressBar.Progress.圆形红.Text}"
  2585. Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat=\{0\}%}" />
  2586. </Grid>
  2587. <ControlTemplate.Triggers>
  2588. <EventTrigger RoutedEvent="Loaded">
  2589. <BeginStoryboard Storyboard="{StaticResource maindh}" />
  2590. </EventTrigger>
  2591. </ControlTemplate.Triggers>
  2592. </ControlTemplate>
  2593. </Setter.Value>
  2594. </Setter>
  2595. </Style>
  2596. <Style TargetType="{x:Type ProgressBar}">
  2597. <Setter Property="Foreground" Value="{StaticResource ProgressBar.Progress}" />
  2598. <Setter Property="Background" Value="{StaticResource ProgressBar.Background}" />
  2599. <Setter Property="BorderBrush" Value="{StaticResource ProgressBar.Border}" />
  2600. <Setter Property="BorderThickness" Value="1" />
  2601. <Setter Property="Height" Value="16" />
  2602. <Setter Property="Template">
  2603. <Setter.Value>
  2604. <ControlTemplate TargetType="{x:Type ProgressBar}">
  2605. <ControlTemplate.Resources>
  2606. <Storyboard x:Key="maindh" RepeatBehavior="Forever">
  2607. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="dh" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
  2608. <EasingDoubleKeyFrame KeyTime="0" Value="0.25" />
  2609. <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.25" />
  2610. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="0.25" />
  2611. </DoubleAnimationUsingKeyFrames>
  2612. <PointAnimationUsingKeyFrames Storyboard.TargetName="dh" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)">
  2613. <EasingPointKeyFrame KeyTime="0" Value="-0.5,0.5" />
  2614. <EasingPointKeyFrame KeyTime="0:0:1" Value="0.5,0.5" />
  2615. <EasingPointKeyFrame KeyTime="0:0:2" Value="1.5,0.5" />
  2616. </PointAnimationUsingKeyFrames>
  2617. </Storyboard>
  2618. </ControlTemplate.Resources>
  2619. <Grid x:Name="TemplateRoot">
  2620. <Border
  2621. Background="{TemplateBinding Background}"
  2622. BorderBrush="{TemplateBinding BorderBrush}"
  2623. BorderThickness="{TemplateBinding BorderThickness}"
  2624. Opacity="0.3" />
  2625. <Rectangle x:Name="PART_Track" />
  2626. <Grid
  2627. x:Name="PART_Indicator"
  2628. HorizontalAlignment="Left"
  2629. ClipToBounds="true">
  2630. <Rectangle x:Name="dh" Fill="{DynamicResource ProgressBar.动画}">
  2631. <Rectangle.RenderTransform>
  2632. <TransformGroup>
  2633. <!-- 缩放变换 -->
  2634. <ScaleTransform ScaleX="1" ScaleY="1" />
  2635. <!-- 倾斜变换 -->
  2636. <SkewTransform AngleX="-45" AngleY="0" />
  2637. <!-- 旋转变换 -->
  2638. <RotateTransform Angle="0" />
  2639. <!-- 移动变换 -->
  2640. <TranslateTransform X="0" Y="0" />
  2641. </TransformGroup>
  2642. </Rectangle.RenderTransform>
  2643. </Rectangle>
  2644. <Rectangle
  2645. x:Name="Indicator"
  2646. Fill="{TemplateBinding Foreground}"
  2647. Visibility="Collapsed" />
  2648. <Rectangle
  2649. x:Name="Animation"
  2650. Fill="{DynamicResource ProgressBar.动画}"
  2651. RenderTransformOrigin="0.5,0.5">
  2652. <Rectangle.RenderTransform>
  2653. <TransformGroup>
  2654. <!-- 缩放变换 -->
  2655. <ScaleTransform ScaleX="1" ScaleY="1" />
  2656. <!-- 倾斜变换 -->
  2657. <SkewTransform AngleX="-45" AngleY="0" />
  2658. <!-- 旋转变换 -->
  2659. <RotateTransform Angle="0" />
  2660. <!-- 移动变换 -->
  2661. <TranslateTransform X="0" Y="0" />
  2662. </TransformGroup>
  2663. </Rectangle.RenderTransform>
  2664. </Rectangle>
  2665. </Grid>
  2666. <TextBlock
  2667. x:Name="textBlock"
  2668. HorizontalAlignment="Center"
  2669. VerticalAlignment="Center"
  2670. FontFamily="../Fonts/#Quartz M"
  2671. FontSize="12"
  2672. Foreground="{DynamicResource Titleforeground}"
  2673. Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Value, StringFormat={}百分比: {0} %}"
  2674. Visibility="Visible" />
  2675. <VisualStateManager.VisualStateGroups>
  2676. <VisualStateGroup x:Name="CommonStates">
  2677. <VisualState x:Name="Determinate" />
  2678. <VisualState x:Name="Indeterminate">
  2679. <Storyboard RepeatBehavior="Forever">
  2680. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Animation" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
  2681. <EasingDoubleKeyFrame KeyTime="0" Value="0.25" />
  2682. <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.25" />
  2683. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="0.25" />
  2684. </DoubleAnimationUsingKeyFrames>
  2685. <PointAnimationUsingKeyFrames Storyboard.TargetName="Animation" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)">
  2686. <EasingPointKeyFrame KeyTime="0" Value="-0.5,0.5" />
  2687. <EasingPointKeyFrame KeyTime="0:0:1" Value="0.5,0.5" />
  2688. <EasingPointKeyFrame KeyTime="0:0:2" Value="1.5,0.5" />
  2689. </PointAnimationUsingKeyFrames>
  2690. </Storyboard>
  2691. </VisualState>
  2692. </VisualStateGroup>
  2693. </VisualStateManager.VisualStateGroups>
  2694. </Grid>
  2695. <ControlTemplate.Triggers>
  2696. <Trigger Property="Orientation" Value="Vertical">
  2697. <Setter TargetName="TemplateRoot" Property="LayoutTransform">
  2698. <Setter.Value>
  2699. <RotateTransform Angle="90" />
  2700. </Setter.Value>
  2701. </Setter>
  2702. </Trigger>
  2703. <Trigger Property="IsIndeterminate" Value="true">
  2704. <Setter TargetName="Indicator" Property="Visibility" Value="Collapsed" />
  2705. <Setter TargetName="dh" Property="Visibility" Value="Collapsed" />
  2706. <Setter TargetName="Animation" Property="Visibility" Value="Visible" />
  2707. </Trigger>
  2708. <Trigger Property="IsIndeterminate" Value="False">
  2709. <Setter TargetName="Indicator" Property="Visibility" Value="Visible" />
  2710. <Setter TargetName="dh" Property="Visibility" Value="Visible" />
  2711. <Setter TargetName="Animation" Property="Visibility" Value="Collapsed" />
  2712. </Trigger>
  2713. <EventTrigger RoutedEvent="Loaded">
  2714. <BeginStoryboard Storyboard="{StaticResource maindh}" />
  2715. </EventTrigger>
  2716. </ControlTemplate.Triggers>
  2717. </ControlTemplate>
  2718. </Setter.Value>
  2719. </Setter>
  2720. </Style>
  2721. <!--#endregion-->
  2722. <!--#region Expander-->
  2723. <ImageBrush x:Key="leftImage" ImageSource="/BPASmartClient.CustomResource;component/Image/leftImage.png" />
  2724. <ImageBrush x:Key="leftImageSub" ImageSource="/BPASmartClient.CustomResource;component/Image/leftImageSub.png" />
  2725. <ImageBrush x:Key="topImage" ImageSource="/BPASmartClient.CustomResource;component/Image/topImage.png" />
  2726. <Style x:Key="ToggleButtonStyle" TargetType="{x:Type ToggleButton}">
  2727. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  2728. <Setter Property="Height" Value="80" />
  2729. <Setter Property="HorizontalContentAlignment" Value="Right" />
  2730. <Setter Property="VerticalContentAlignment" Value="Center" />
  2731. <Setter Property="Padding" Value="10,10" />
  2732. <Setter Property="Template">
  2733. <Setter.Value>
  2734. <ControlTemplate TargetType="{x:Type ToggleButton}">
  2735. <Grid>
  2736. <Border
  2737. x:Name="border2"
  2738. Margin="{TemplateBinding Padding}"
  2739. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  2740. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  2741. Background="{TemplateBinding Background}">
  2742. <ContentPresenter
  2743. Margin="{TemplateBinding Padding}"
  2744. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  2745. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  2746. RecognizesAccessKey="True"
  2747. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  2748. </Border>
  2749. </Grid>
  2750. <ControlTemplate.Triggers>
  2751. <Trigger Property="IsPressed" Value="true">
  2752. <Setter Property="Background" Value="#FFd2e7f4" />
  2753. </Trigger>
  2754. <Trigger Property="IsChecked" Value="true">
  2755. <Setter TargetName="border2" Property="Background" Value="{StaticResource ResourceKey=leftImage}" />
  2756. </Trigger>
  2757. <Trigger Property="IsChecked" Value="false">
  2758. <Setter TargetName="border2" Property="Background">
  2759. <Setter.Value>
  2760. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/矩形样式.png" />
  2761. </Setter.Value>
  2762. </Setter>
  2763. </Trigger>
  2764. <Trigger Property="IsEnabled" Value="false">
  2765. <Setter Property="Foreground" Value="White" />
  2766. </Trigger>
  2767. <MultiTrigger>
  2768. <MultiTrigger.Conditions>
  2769. <Condition Property="IsChecked" Value="false" />
  2770. <Condition Property="IsMouseOver" Value="True" />
  2771. </MultiTrigger.Conditions>
  2772. <MultiTrigger.Setters>
  2773. <Setter TargetName="border2" Property="Background">
  2774. <Setter.Value>
  2775. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
  2776. </Setter.Value>
  2777. </Setter>
  2778. </MultiTrigger.Setters>
  2779. </MultiTrigger>
  2780. </ControlTemplate.Triggers>
  2781. </ControlTemplate>
  2782. </Setter.Value>
  2783. </Setter>
  2784. </Style>
  2785. <Style x:Key="ExpanderStyle" TargetType="{x:Type Expander}">
  2786. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  2787. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  2788. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  2789. <Setter Property="BorderBrush" Value="Transparent" />
  2790. <Setter Property="BorderThickness" Value="1" />
  2791. <Setter Property="Template">
  2792. <Setter.Value>
  2793. <ControlTemplate TargetType="{x:Type Expander}">
  2794. <DockPanel Cursor="Hand">
  2795. <ToggleButton
  2796. x:Name="HeaderSite"
  2797. Height="60"
  2798. MinWidth="0"
  2799. MinHeight="0"
  2800. Margin="1"
  2801. Padding="{TemplateBinding Padding}"
  2802. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  2803. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  2804. Content="{TemplateBinding Header}"
  2805. ContentTemplate="{TemplateBinding HeaderTemplate}"
  2806. ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
  2807. DockPanel.Dock="Top"
  2808. FontFamily="{TemplateBinding FontFamily}"
  2809. FontSize="{TemplateBinding FontSize}"
  2810. FontStretch="{TemplateBinding FontStretch}"
  2811. FontStyle="{TemplateBinding FontStyle}"
  2812. FontWeight="{TemplateBinding FontWeight}"
  2813. Foreground="{TemplateBinding Foreground}"
  2814. IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  2815. Style="{StaticResource ToggleButtonStyle}" />
  2816. <ContentPresenter
  2817. x:Name="ExpandSite"
  2818. Margin="{TemplateBinding Padding}"
  2819. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  2820. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  2821. DockPanel.Dock="Left"
  2822. Focusable="false"
  2823. Visibility="Collapsed" />
  2824. </DockPanel>
  2825. <ControlTemplate.Triggers>
  2826. <Trigger Property="IsExpanded" Value="true">
  2827. <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
  2828. </Trigger>
  2829. </ControlTemplate.Triggers>
  2830. </ControlTemplate>
  2831. </Setter.Value>
  2832. </Setter>
  2833. </Style>
  2834. <!--#endregion-->
  2835. <!--#region RadioButton-->
  2836. <Style x:Key="RadioMiniButtonStyle" TargetType="{x:Type RadioButton}">
  2837. <Setter Property="Margin" Value="5,10,1,0" />
  2838. <Setter Property="Width" Value="160" />
  2839. <Setter Property="Height" Value="30" />
  2840. <Setter Property="Cursor" Value="Hand" />
  2841. <Setter Property="FontSize" Value="14" />
  2842. <Setter Property="FontFamily" Value="粗体" />
  2843. <Setter Property="Foreground" Value="#DDD" />
  2844. <Setter Property="VerticalContentAlignment" Value="Center" />
  2845. <Setter Property="HorizontalContentAlignment" Value="Center" />
  2846. <Setter Property="BorderBrush" Value="Transparent" />
  2847. <Setter Property="BorderThickness" Value="0" />
  2848. <Setter Property="Background" Value="#DDD" />
  2849. <Setter Property="HorizontalAlignment" Value="Right" />
  2850. <Setter Property="Template">
  2851. <Setter.Value>
  2852. <ControlTemplate TargetType="{x:Type RadioButton}">
  2853. <Grid
  2854. x:Name="templateRoot"
  2855. Background="Transparent"
  2856. SnapsToDevicePixels="True">
  2857. <Border x:Name="border2" />
  2858. <ContentPresenter
  2859. x:Name="contentPresenter"
  2860. Margin="{TemplateBinding Padding}"
  2861. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  2862. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  2863. Content="{TemplateBinding Content}"
  2864. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  2865. ContentTemplate="{TemplateBinding ContentTemplate}"
  2866. Focusable="False"
  2867. RecognizesAccessKey="True"
  2868. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  2869. </Grid>
  2870. <ControlTemplate.Triggers>
  2871. <Trigger Property="HasContent" Value="True">
  2872. <Setter Property="FocusVisualStyle">
  2873. <Setter.Value>
  2874. <Style>
  2875. <Setter Property="Control.Template">
  2876. <Setter.Value>
  2877. <ControlTemplate>
  2878. <Rectangle
  2879. Margin="14,0,0,0"
  2880. SnapsToDevicePixels="True"
  2881. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  2882. StrokeDashArray="1 2"
  2883. StrokeThickness="1" />
  2884. </ControlTemplate>
  2885. </Setter.Value>
  2886. </Setter>
  2887. </Style>
  2888. </Setter.Value>
  2889. </Setter>
  2890. <Setter Property="Padding" Value="4,-1,0,0" />
  2891. </Trigger>
  2892. <Trigger Property="IsChecked" Value="{x:Null}" />
  2893. <Trigger Property="IsChecked" Value="true">
  2894. <Setter Property="Foreground" Value="White" />
  2895. <Setter TargetName="border2" Property="Background" Value="{StaticResource ResourceKey=leftImageSub}" />
  2896. </Trigger>
  2897. <Trigger Property="IsChecked" Value="false">
  2898. <Setter TargetName="border2" Property="Background">
  2899. <Setter.Value>
  2900. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/矩形样式.png" />
  2901. </Setter.Value>
  2902. </Setter>
  2903. <Setter Property="Foreground" Value="#4B8EC4" />
  2904. </Trigger>
  2905. <MultiTrigger>
  2906. <MultiTrigger.Conditions>
  2907. <Condition Property="IsChecked" Value="false" />
  2908. <Condition Property="IsMouseOver" Value="True" />
  2909. </MultiTrigger.Conditions>
  2910. <MultiTrigger.Setters>
  2911. <Setter TargetName="border2" Property="Background">
  2912. <Setter.Value>
  2913. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/leftImageSub.png" />
  2914. </Setter.Value>
  2915. </Setter>
  2916. </MultiTrigger.Setters>
  2917. </MultiTrigger>
  2918. </ControlTemplate.Triggers>
  2919. </ControlTemplate>
  2920. </Setter.Value>
  2921. </Setter>
  2922. </Style>
  2923. <!--#endregion-->
  2924. <!--#region ContextMenu-->
  2925. <!-- 自定义ContextMenu的外观样式 -->
  2926. <Style TargetType="{x:Type ContextMenu}">
  2927. <Setter Property="SnapsToDevicePixels" Value="True" />
  2928. <Setter Property="OverridesDefaultStyle" Value="True" />
  2929. <Setter Property="Grid.IsSharedSizeScope" Value="True" />
  2930. <Setter Property="Focusable" Value="False" />
  2931. <Setter Property="HasDropShadow" Value="True" />
  2932. <Setter Property="Template">
  2933. <Setter.Value>
  2934. <ControlTemplate TargetType="{x:Type ContextMenu}">
  2935. <Border
  2936. Name="Border"
  2937. Background="#6EA0B0"
  2938. BorderBrush="#888888"
  2939. BorderThickness="1">
  2940. <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
  2941. </Border>
  2942. <ControlTemplate.Triggers>
  2943. <Trigger Property="HasDropShadow" Value="true">
  2944. <Setter TargetName="Border" Property="Padding" Value="0,3,0,3" />
  2945. <Setter TargetName="Border" Property="CornerRadius" Value="4" />
  2946. </Trigger>
  2947. </ControlTemplate.Triggers>
  2948. </ControlTemplate>
  2949. </Setter.Value>
  2950. </Setter>
  2951. </Style>
  2952. <!-- 自定义菜单项之间的分隔符的样式 -->
  2953. <Style x:Key="{x:Static MenuItem.SeparatorStyleKey}" TargetType="{x:Type Separator}">
  2954. <Setter Property="Height" Value="1" />
  2955. <Setter Property="Margin" Value="0,4,0,4" />
  2956. <Setter Property="Template">
  2957. <Setter.Value>
  2958. <ControlTemplate TargetType="{x:Type Separator}">
  2959. <Border>
  2960. <Border.Background>
  2961. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/顶部线条.png" />
  2962. </Border.Background>
  2963. </Border>
  2964. </ControlTemplate>
  2965. </Setter.Value>
  2966. </Setter>
  2967. </Style>
  2968. <Style x:Key="Separator1" TargetType="{x:Type Separator}">
  2969. <Setter Property="Height" Value="1" />
  2970. <Setter Property="Margin" Value="0,4,0,4" />
  2971. <Setter Property="Template">
  2972. <Setter.Value>
  2973. <ControlTemplate TargetType="{x:Type Separator}">
  2974. <Border>
  2975. <Border.Background>
  2976. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/顶部线条.png" />
  2977. </Border.Background>
  2978. </Border>
  2979. </ControlTemplate>
  2980. </Setter.Value>
  2981. </Setter>
  2982. </Style>
  2983. <!-- TopLevelHeader -->
  2984. <ControlTemplate x:Key="{x:Static MenuItem.TopLevelHeaderTemplateKey}" TargetType="{x:Type MenuItem}">
  2985. <Border Name="Border" Cursor="Hand">
  2986. <Grid Margin="30,10,30,5">
  2987. <ContentPresenter
  2988. HorizontalAlignment="Center"
  2989. VerticalAlignment="Center"
  2990. ContentSource="Header"
  2991. RecognizesAccessKey="True" />
  2992. <Popup
  2993. Name="Popup"
  2994. AllowsTransparency="True"
  2995. Focusable="False"
  2996. HorizontalOffset="-30"
  2997. IsOpen="{TemplateBinding IsSubmenuOpen}"
  2998. Placement="Bottom"
  2999. PopupAnimation="Slide"
  3000. VerticalOffset="10">
  3001. <Border
  3002. Name="SubmenuBorder"
  3003. Background="#7F0E4E8D"
  3004. BorderBrush="Transparent"
  3005. BorderThickness="1"
  3006. SnapsToDevicePixels="True">
  3007. <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
  3008. </Border>
  3009. </Popup>
  3010. </Grid>
  3011. </Border>
  3012. <ControlTemplate.Triggers>
  3013. <Trigger Property="IsSuspendingPopupAnimation" Value="true">
  3014. <Setter TargetName="Popup" Property="PopupAnimation" Value="None" />
  3015. </Trigger>
  3016. <Trigger Property="IsHighlighted" Value="true">
  3017. <Setter TargetName="Border" Property="Background">
  3018. <Setter.Value>
  3019. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
  3020. </Setter.Value>
  3021. </Setter>
  3022. <Setter Property="Foreground" Value="{DynamicResource MeunSelectForeground}" />
  3023. <Setter TargetName="Border" Property="BorderBrush" Value="Transparent" />
  3024. <Setter TargetName="SubmenuBorder" Property="Background">
  3025. <Setter.Value>
  3026. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png" />
  3027. </Setter.Value>
  3028. </Setter>
  3029. </Trigger>
  3030. <Trigger Property="IsHighlighted" Value="false">
  3031. <Setter TargetName="Border" Property="Background">
  3032. <Setter.Value>
  3033. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
  3034. </Setter.Value>
  3035. </Setter>
  3036. <Setter Property="Foreground" Value="{DynamicResource MeunUnSelectForeground}" />
  3037. <Setter TargetName="Border" Property="BorderBrush" Value="Transparent" />
  3038. <Setter TargetName="SubmenuBorder" Property="Background">
  3039. <Setter.Value>
  3040. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png" />
  3041. </Setter.Value>
  3042. </Setter>
  3043. </Trigger>
  3044. <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="True">
  3045. <Setter TargetName="SubmenuBorder" Property="CornerRadius" Value="0" />
  3046. <Setter TargetName="SubmenuBorder" Property="Padding" Value="5" />
  3047. </Trigger>
  3048. <Trigger Property="IsEnabled" Value="False">
  3049. <Setter Property="Foreground" Value="#ffffffff" />
  3050. </Trigger>
  3051. </ControlTemplate.Triggers>
  3052. </ControlTemplate>
  3053. <!-- TopLevelItem -->
  3054. <ControlTemplate x:Key="{x:Static MenuItem.TopLevelItemTemplateKey}" TargetType="{x:Type MenuItem}">
  3055. <Border Name="Border" Margin="30,0,0,0">
  3056. <Grid>
  3057. <ContentPresenter
  3058. HorizontalAlignment="Center"
  3059. VerticalAlignment="Center"
  3060. ContentSource="Header"
  3061. RecognizesAccessKey="True" />
  3062. </Grid>
  3063. </Border>
  3064. <ControlTemplate.Triggers>
  3065. <Trigger Property="IsHighlighted" Value="true">
  3066. <Setter TargetName="Border" Property="Background">
  3067. <Setter.Value>
  3068. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/leftImage.png" />
  3069. </Setter.Value>
  3070. </Setter>
  3071. <Setter TargetName="Border" Property="BorderBrush" Value="Transparent" />
  3072. </Trigger>
  3073. <Trigger Property="IsEnabled" Value="False">
  3074. <Setter Property="Foreground" Value="#ffffffff" />
  3075. </Trigger>
  3076. </ControlTemplate.Triggers>
  3077. </ControlTemplate>
  3078. <!-- SubmenuItem 自定义菜单项的外观样式 -->
  3079. <ControlTemplate x:Key="{x:Static MenuItem.SubmenuItemTemplateKey}" TargetType="{x:Type MenuItem}">
  3080. <Border
  3081. Name="Border"
  3082. Margin="5"
  3083. Cursor="Hand">
  3084. <Grid Margin="5">
  3085. <Grid.ColumnDefinitions>
  3086. <ColumnDefinition Width="Auto" SharedSizeGroup="Icon" />
  3087. <ColumnDefinition Width="*" />
  3088. <ColumnDefinition Width="Auto" SharedSizeGroup="Shortcut" />
  3089. <ColumnDefinition Width="13" />
  3090. </Grid.ColumnDefinitions>
  3091. <ContentPresenter
  3092. Name="Icon"
  3093. Margin="6,2,6,2"
  3094. HorizontalAlignment="Stretch"
  3095. VerticalAlignment="Stretch"
  3096. ContentSource="Icon" />
  3097. <Border
  3098. Name="Check"
  3099. Width="13"
  3100. Height="13"
  3101. Margin="6,0,6,0"
  3102. Background="#331068A3"
  3103. BorderBrush="#331068A3"
  3104. BorderThickness="1"
  3105. Visibility="Hidden">
  3106. <Path
  3107. Name="CheckMark"
  3108. Width="7"
  3109. Height="7"
  3110. Data="M 0 0 L 7 7 M 0 7 L 7 0"
  3111. SnapsToDevicePixels="False"
  3112. Stroke="#331068A3"
  3113. StrokeThickness="1"
  3114. Visibility="Visible" />
  3115. </Border>
  3116. <ContentPresenter
  3117. Name="HeaderHost"
  3118. Grid.Column="1"
  3119. ContentSource="Header"
  3120. RecognizesAccessKey="True" />
  3121. <TextBlock
  3122. x:Name="InputGestureText"
  3123. Grid.Column="2"
  3124. Margin="5,2,0,-5"
  3125. HorizontalAlignment="Center"
  3126. VerticalAlignment="Bottom"
  3127. Background="Transparent"
  3128. Cursor="Hand"
  3129. DockPanel.Dock="Right"
  3130. Text="{TemplateBinding InputGestureText}" />
  3131. </Grid>
  3132. </Border>
  3133. <ControlTemplate.Triggers>
  3134. <Trigger Property="Icon" Value="{x:Null}">
  3135. <Setter TargetName="Icon" Property="Visibility" Value="Hidden" />
  3136. </Trigger>
  3137. <Trigger Property="IsChecked" Value="true">
  3138. <Setter TargetName="CheckMark" Property="Visibility" Value="Visible" />
  3139. </Trigger>
  3140. <Trigger Property="IsCheckable" Value="true">
  3141. <Setter TargetName="Check" Property="Visibility" Value="Hidden" />
  3142. <Setter TargetName="Icon" Property="Visibility" Value="Hidden" />
  3143. </Trigger>
  3144. <!-- 选中菜单项时的高亮颜色的trigger设置 -->
  3145. <Trigger Property="IsHighlighted" Value="true">
  3146. <Setter TargetName="Border" Property="Background">
  3147. <Setter.Value>
  3148. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
  3149. </Setter.Value>
  3150. </Setter>
  3151. <Setter Property="Foreground" Value="{DynamicResource MeunSelectForeground}" />
  3152. </Trigger>
  3153. <Trigger Property="IsHighlighted" Value="false">
  3154. <Setter TargetName="Border" Property="Background">
  3155. <Setter.Value>
  3156. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
  3157. </Setter.Value>
  3158. </Setter>
  3159. <Setter Property="Foreground" Value="{DynamicResource MeunUnSelectForeground}" />
  3160. </Trigger>
  3161. <!--<Trigger Property="IsEnabled" Value="false">
  3162. <Setter Property="Foreground" Value="Yellow"/>
  3163. </Trigger>-->
  3164. </ControlTemplate.Triggers>
  3165. </ControlTemplate>
  3166. <!-- SubmenuHeader -->
  3167. <ControlTemplate x:Key="{x:Static MenuItem.SubmenuHeaderTemplateKey}" TargetType="{x:Type MenuItem}">
  3168. <Border Name="Border">
  3169. <Grid>
  3170. <Grid.ColumnDefinitions>
  3171. <ColumnDefinition Width="Auto" SharedSizeGroup="Icon" />
  3172. <ColumnDefinition Width="*" />
  3173. <ColumnDefinition Width="Auto" SharedSizeGroup="Shortcut" />
  3174. <ColumnDefinition Width="13" />
  3175. </Grid.ColumnDefinitions>
  3176. <ContentPresenter
  3177. Name="Icon"
  3178. Margin="6,0,6,0"
  3179. HorizontalAlignment="Stretch"
  3180. VerticalAlignment="Stretch"
  3181. ContentSource="Icon" />
  3182. <ContentPresenter
  3183. Name="HeaderHost"
  3184. Grid.Column="1"
  3185. ContentSource="Header"
  3186. RecognizesAccessKey="True" />
  3187. <TextBlock
  3188. x:Name="InputGestureText"
  3189. Grid.Column="2"
  3190. Margin="5,2,2,2"
  3191. DockPanel.Dock="Right"
  3192. Text="{TemplateBinding InputGestureText}" />
  3193. <Path
  3194. Grid.Column="3"
  3195. HorizontalAlignment="Center"
  3196. VerticalAlignment="Center"
  3197. Data="M 0 0 L 0 7 L 4 3.5 Z"
  3198. Fill="#331068A3" />
  3199. <Popup
  3200. Name="Popup"
  3201. AllowsTransparency="True"
  3202. Focusable="False"
  3203. HorizontalOffset="-4"
  3204. IsOpen="{TemplateBinding IsSubmenuOpen}"
  3205. Placement="Left"
  3206. PopupAnimation="Slide">
  3207. <Border
  3208. Name="SubmenuBorder"
  3209. BorderBrush="Transparent"
  3210. BorderThickness="1"
  3211. SnapsToDevicePixels="True">
  3212. <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
  3213. </Border>
  3214. </Popup>
  3215. </Grid>
  3216. </Border>
  3217. <ControlTemplate.Triggers>
  3218. <Trigger Property="Icon" Value="{x:Null}">
  3219. <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
  3220. </Trigger>
  3221. <Trigger Property="IsHighlighted" Value="true">
  3222. <Setter TargetName="Border" Property="Background">
  3223. <Setter.Value>
  3224. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
  3225. </Setter.Value>
  3226. </Setter>
  3227. </Trigger>
  3228. <Trigger Property="IsHighlighted" Value="false">
  3229. <Setter TargetName="Border" Property="Background">
  3230. <Setter.Value>
  3231. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
  3232. </Setter.Value>
  3233. </Setter>
  3234. </Trigger>
  3235. <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="True">
  3236. <Setter TargetName="SubmenuBorder" Property="CornerRadius" Value="4" />
  3237. <Setter TargetName="SubmenuBorder" Property="Padding" Value="0,3,0,3" />
  3238. </Trigger>
  3239. <Trigger Property="IsEnabled" Value="false">
  3240. <Setter Property="Foreground" Value="#ffffffff" />
  3241. </Trigger>
  3242. </ControlTemplate.Triggers>
  3243. </ControlTemplate>
  3244. <!-- MenuItem Style -->
  3245. <Style x:Key="{x:Type MenuItem}" TargetType="{x:Type MenuItem}">
  3246. <Setter Property="OverridesDefaultStyle" Value="True" />
  3247. <Style.Triggers>
  3248. <Trigger Property="Role" Value="TopLevelHeader">
  3249. <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.TopLevelHeaderTemplateKey}}" />
  3250. <Setter Property="Grid.IsSharedSizeScope" Value="true" />
  3251. </Trigger>
  3252. <Trigger Property="Role" Value="TopLevelItem">
  3253. <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.TopLevelItemTemplateKey}}" />
  3254. </Trigger>
  3255. <!--<Trigger Property="Role" Value="SubmenuHeader">
  3256. <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.SubmenuHeaderTemplateKey}}"/>
  3257. </Trigger>-->
  3258. <Trigger Property="Role" Value="SubmenuItem">
  3259. <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.SubmenuItemTemplateKey}}" />
  3260. </Trigger>
  3261. </Style.Triggers>
  3262. </Style>
  3263. <!--#endregion-->
  3264. <!--#region RadioButton-->
  3265. <Style x:Key="CheckRadioFocusVisual">
  3266. <Setter Property="Control.Template">
  3267. <Setter.Value>
  3268. <ControlTemplate>
  3269. <Rectangle
  3270. Margin="14,0,0,0"
  3271. SnapsToDevicePixels="true"
  3272. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  3273. StrokeDashArray="1 2"
  3274. StrokeThickness="1" />
  3275. </ControlTemplate>
  3276. </Setter.Value>
  3277. </Setter>
  3278. </Style>
  3279. <Style TargetType="{x:Type RadioButton}">
  3280. <Setter Property="FocusVisualStyle" Value="{StaticResource CheckRadioFocusVisual}" />
  3281. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  3282. <Setter Property="VerticalContentAlignment" Value="Center" />
  3283. <Setter Property="Background">
  3284. <Setter.Value>
  3285. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/btn_normal.png" />
  3286. </Setter.Value>
  3287. </Setter>
  3288. <Setter Property="Padding" Value="2,0,0,0" />
  3289. <Setter Property="Template">
  3290. <Setter.Value>
  3291. <ControlTemplate TargetType="{x:Type RadioButton}">
  3292. <BulletDecorator VerticalAlignment="Center" Background="Transparent">
  3293. <BulletDecorator.Bullet>
  3294. <Grid>
  3295. <Ellipse
  3296. x:Name="Border"
  3297. Width="10"
  3298. Height="10"
  3299. Fill="{TemplateBinding Background}" />
  3300. <Ellipse
  3301. x:Name="Dot"
  3302. Width="5"
  3303. Height="5"
  3304. Fill="#ff8a03"
  3305. Visibility="Hidden" />
  3306. </Grid>
  3307. </BulletDecorator.Bullet>
  3308. <ContentPresenter
  3309. Margin="{TemplateBinding Padding}"
  3310. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  3311. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  3312. RecognizesAccessKey="True" />
  3313. </BulletDecorator>
  3314. <ControlTemplate.Triggers>
  3315. <Trigger Property="IsChecked" Value="true">
  3316. <Setter TargetName="Dot" Property="Visibility" Value="Visible" />
  3317. </Trigger>
  3318. <Trigger Property="IsChecked" Value="False">
  3319. <Setter TargetName="Dot" Property="Visibility" Value="Collapsed" />
  3320. </Trigger>
  3321. <Trigger Property="IsChecked" Value="{x:Null}">
  3322. <Setter TargetName="Dot" Property="Visibility" Value="Collapsed" />
  3323. </Trigger>
  3324. <Trigger Property="IsPressed" Value="true">
  3325. <Setter TargetName="Border" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  3326. </Trigger>
  3327. <Trigger Property="IsEnabled" Value="false">
  3328. <Setter TargetName="Border" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  3329. <Setter TargetName="Dot" Property="Fill" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  3330. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  3331. </Trigger>
  3332. </ControlTemplate.Triggers>
  3333. </ControlTemplate>
  3334. </Setter.Value>
  3335. </Setter>
  3336. </Style>
  3337. <!--#endregion-->
  3338. <!--#region CheckBox-->
  3339. <Style TargetType="{x:Type CheckBox}">
  3340. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  3341. <Setter Property="VerticalContentAlignment" Value="Center" />
  3342. <Setter Property="FocusVisualStyle">
  3343. <Setter.Value>
  3344. <Style>
  3345. <Setter Property="Control.Template">
  3346. <Setter.Value>
  3347. <ControlTemplate>
  3348. <Rectangle
  3349. Margin="1"
  3350. SnapsToDevicePixels="True"
  3351. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  3352. StrokeDashArray="1 2"
  3353. StrokeThickness="1" />
  3354. </ControlTemplate>
  3355. </Setter.Value>
  3356. </Setter>
  3357. </Style>
  3358. </Setter.Value>
  3359. </Setter>
  3360. <Setter Property="Template">
  3361. <Setter.Value>
  3362. <ControlTemplate TargetType="{x:Type CheckBox}">
  3363. <StackPanel
  3364. Background="Transparent"
  3365. Orientation="Horizontal"
  3366. SnapsToDevicePixels="True">
  3367. <Grid>
  3368. <Image
  3369. Width="12"
  3370. Height="14"
  3371. Source="/BPASmartClient.CustomResource;component/Image/Cb_HalfChecked.png" />
  3372. <Image
  3373. x:Name="image1"
  3374. Width="12"
  3375. Height="14"
  3376. Source="/BPASmartClient.CustomResource;component/Image/Cb_HalfChecked.png" />
  3377. </Grid>
  3378. <ContentPresenter
  3379. Margin="{TemplateBinding Padding}"
  3380. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  3381. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  3382. Content="{TemplateBinding Content}"
  3383. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  3384. RecognizesAccessKey="True"
  3385. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  3386. </StackPanel>
  3387. <ControlTemplate.Triggers>
  3388. <Trigger Property="HasContent" Value="True">
  3389. <Setter Property="FocusVisualStyle">
  3390. <Setter.Value>
  3391. <Style>
  3392. <Setter Property="Control.Template">
  3393. <Setter.Value>
  3394. <ControlTemplate>
  3395. <Rectangle
  3396. Margin="14,0,0,0"
  3397. SnapsToDevicePixels="True"
  3398. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  3399. StrokeDashArray="1 2"
  3400. StrokeThickness="1" />
  3401. </ControlTemplate>
  3402. </Setter.Value>
  3403. </Setter>
  3404. </Style>
  3405. </Setter.Value>
  3406. </Setter>
  3407. <Setter Property="Padding" Value="4,0,0,0" />
  3408. </Trigger>
  3409. <Trigger Property="IsEnabled" Value="False">
  3410. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  3411. </Trigger>
  3412. <Trigger Property="IsChecked" Value="true">
  3413. <Setter TargetName="image1" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/Cb_Checked.png" />
  3414. </Trigger>
  3415. <Trigger Property="IsChecked" Value="{x:Null}">
  3416. <Setter TargetName="image1" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/Cb_HalfChecked.png" />
  3417. </Trigger>
  3418. </ControlTemplate.Triggers>
  3419. </ControlTemplate>
  3420. </Setter.Value>
  3421. </Setter>
  3422. </Style>
  3423. <!--#endregion-->
  3424. <!--#region TextBox-->
  3425. <Style TargetType="{x:Type TextBox}">
  3426. <Setter Property="BorderBrush" Value="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" />
  3427. <Setter Property="BorderThickness" Value="1" />
  3428. <Setter Property="Padding" Value="0" />
  3429. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  3430. <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
  3431. <Setter Property="VerticalContentAlignment" Value="Center" />
  3432. <Setter Property="Height" Value="24" />
  3433. <Setter Property="CaretBrush" Value="White" />
  3434. <Setter Property="Padding" Value="0" />
  3435. <Setter Property="HorizontalContentAlignment" Value="Left" />
  3436. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  3437. <Setter Property="AllowDrop" Value="true" />
  3438. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  3439. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  3440. <Setter Property="Template">
  3441. <Setter.Value>
  3442. <ControlTemplate TargetType="{x:Type TextBox}">
  3443. <Themes1:ClassicBorderDecorator
  3444. x:Name="Bd"
  3445. BorderBrush="{DynamicResource borderBrush}"
  3446. BorderStyle="None"
  3447. BorderThickness="1">
  3448. <ScrollViewer x:Name="PART_ContentHost" />
  3449. </Themes1:ClassicBorderDecorator>
  3450. <ControlTemplate.Triggers>
  3451. <Trigger Property="IsEnabled" Value="false">
  3452. <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  3453. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  3454. </Trigger>
  3455. </ControlTemplate.Triggers>
  3456. </ControlTemplate>
  3457. </Setter.Value>
  3458. </Setter>
  3459. <Style.Triggers>
  3460. <MultiTrigger>
  3461. <MultiTrigger.Conditions>
  3462. <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
  3463. <Condition Property="IsSelectionActive" Value="false" />
  3464. </MultiTrigger.Conditions>
  3465. <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
  3466. </MultiTrigger>
  3467. </Style.Triggers>
  3468. </Style>
  3469. <!--#endregion-->
  3470. <!--#region ComboBox-->
  3471. <Style x:Key="ComboBoxFocusVisual">
  3472. <Setter Property="Control.Template">
  3473. <Setter.Value>
  3474. <ControlTemplate>
  3475. <Rectangle
  3476. Margin="4,4,21,4"
  3477. SnapsToDevicePixels="true"
  3478. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  3479. StrokeDashArray="1 2"
  3480. StrokeThickness="1" />
  3481. </ControlTemplate>
  3482. </Setter.Value>
  3483. </Setter>
  3484. </Style>
  3485. <Geometry x:Key="DownArrowGeometry">M 0 0 L 3.5 4 L 7 0 Z</Geometry>
  3486. <Style x:Key="ComboBoxTransparentButtonStyle" TargetType="{x:Type ToggleButton}">
  3487. <Setter Property="MinWidth" Value="0" />
  3488. <Setter Property="MinHeight" Value="0" />
  3489. <Setter Property="Width" Value="Auto" />
  3490. <Setter Property="Height" Value="Auto" />
  3491. <Setter Property="Background" Value="Transparent" />
  3492. <Setter Property="Foreground" Value="White" />
  3493. <Setter Property="BorderBrush" Value="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" />
  3494. <Setter Property="BorderThickness" Value="2" />
  3495. <Setter Property="Template">
  3496. <Setter.Value>
  3497. <ControlTemplate TargetType="{x:Type ToggleButton}">
  3498. <DockPanel
  3499. Background="{TemplateBinding Background}"
  3500. LastChildFill="false"
  3501. SnapsToDevicePixels="true">
  3502. <Themes1:ClassicBorderDecorator
  3503. x:Name="Border"
  3504. Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
  3505. BorderBrush="{TemplateBinding BorderBrush}"
  3506. BorderStyle="None"
  3507. BorderThickness="{TemplateBinding BorderThickness}"
  3508. DockPanel.Dock="Right">
  3509. <Path
  3510. HorizontalAlignment="Center"
  3511. VerticalAlignment="Center"
  3512. Data="{StaticResource DownArrowGeometry}"
  3513. Fill="{TemplateBinding Foreground}" />
  3514. </Themes1:ClassicBorderDecorator>
  3515. </DockPanel>
  3516. <ControlTemplate.Triggers>
  3517. <Trigger Property="IsChecked" Value="true">
  3518. <Setter TargetName="Border" Property="BorderStyle" Value="AltPressed" />
  3519. </Trigger>
  3520. </ControlTemplate.Triggers>
  3521. </ControlTemplate>
  3522. </Setter.Value>
  3523. </Setter>
  3524. <Style.Triggers>
  3525. <Trigger Property="IsEnabled" Value="false">
  3526. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" />
  3527. </Trigger>
  3528. </Style.Triggers>
  3529. </Style>
  3530. <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
  3531. <Setter Property="OverridesDefaultStyle" Value="true" />
  3532. <Setter Property="AllowDrop" Value="true" />
  3533. <Setter Property="MinWidth" Value="0" />
  3534. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  3535. <Setter Property="MinHeight" Value="0" />
  3536. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  3537. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  3538. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  3539. <Setter Property="Template">
  3540. <Setter.Value>
  3541. <ControlTemplate TargetType="{x:Type TextBox}">
  3542. <ScrollViewer
  3543. x:Name="PART_ContentHost"
  3544. Background="Transparent"
  3545. Focusable="false"
  3546. HorizontalScrollBarVisibility="Hidden"
  3547. VerticalScrollBarVisibility="Hidden" />
  3548. </ControlTemplate>
  3549. </Setter.Value>
  3550. </Setter>
  3551. </Style>
  3552. <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
  3553. <Border
  3554. Background="{TemplateBinding Background}"
  3555. BorderBrush="{TemplateBinding BorderBrush}"
  3556. BorderThickness="{TemplateBinding BorderThickness}"
  3557. SnapsToDevicePixels="true">
  3558. <Grid>
  3559. <Themes1:ClassicBorderDecorator
  3560. x:Name="Border"
  3561. BorderBrush="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}"
  3562. BorderStyle="None"
  3563. BorderThickness="2">
  3564. <Popup
  3565. x:Name="PART_Popup"
  3566. AllowsTransparency="true"
  3567. Focusable="False"
  3568. IsOpen="{TemplateBinding IsDropDownOpen}"
  3569. Placement="Bottom"
  3570. PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
  3571. <Themes1:SystemDropShadowChrome
  3572. x:Name="Shdw"
  3573. MinWidth="{Binding ActualWidth, ElementName=Border}"
  3574. MaxHeight="{TemplateBinding MaxDropDownHeight}"
  3575. Color="Transparent">
  3576. <Border
  3577. x:Name="DropDownBorder"
  3578. BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
  3579. BorderThickness="1">
  3580. <Border.Background>
  3581. <ImageBrush
  3582. ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png"
  3583. Opacity="0.5"
  3584. Stretch="Fill" />
  3585. </Border.Background>
  3586. <ScrollViewer x:Name="DropDownScrollViewer">
  3587. <Grid RenderOptions.ClearTypeHint="Enabled">
  3588. <Canvas
  3589. Width="0"
  3590. Height="0"
  3591. HorizontalAlignment="Left"
  3592. VerticalAlignment="Top">
  3593. <Rectangle
  3594. x:Name="OpaqueRect"
  3595. Width="{Binding ActualWidth, ElementName=DropDownBorder}"
  3596. Height="{Binding ActualHeight, ElementName=DropDownBorder}"
  3597. Fill="{Binding Background, ElementName=DropDownBorder}" />
  3598. </Canvas>
  3599. <ItemsPresenter
  3600. x:Name="ItemsPresenter"
  3601. KeyboardNavigation.DirectionalNavigation="Contained"
  3602. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  3603. </Grid>
  3604. </ScrollViewer>
  3605. </Border>
  3606. </Themes1:SystemDropShadowChrome>
  3607. </Popup>
  3608. </Themes1:ClassicBorderDecorator>
  3609. <ToggleButton
  3610. Width="Auto"
  3611. MinWidth="0"
  3612. MinHeight="0"
  3613. ClickMode="Press"
  3614. Focusable="false"
  3615. IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  3616. Style="{StaticResource ComboBoxTransparentButtonStyle}" />
  3617. <DockPanel>
  3618. <FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right" />
  3619. <TextBox
  3620. x:Name="PART_EditableTextBox"
  3621. Margin="{TemplateBinding Padding}"
  3622. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  3623. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  3624. CaretBrush="White"
  3625. IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
  3626. Style="{StaticResource ComboBoxEditableTextBox}" />
  3627. </DockPanel>
  3628. </Grid>
  3629. </Border>
  3630. <ControlTemplate.Triggers>
  3631. <Trigger Property="HasItems" Value="false">
  3632. <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
  3633. </Trigger>
  3634. <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
  3635. <Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
  3636. <Setter TargetName="Shdw" Property="Color" Value="#71000000" />
  3637. </Trigger>
  3638. <Trigger Property="IsEnabled" Value="false">
  3639. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  3640. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  3641. </Trigger>
  3642. <MultiTrigger>
  3643. <MultiTrigger.Conditions>
  3644. <Condition Property="IsGrouping" Value="true" />
  3645. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
  3646. </MultiTrigger.Conditions>
  3647. <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
  3648. </MultiTrigger>
  3649. <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
  3650. <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
  3651. <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
  3652. </Trigger>
  3653. </ControlTemplate.Triggers>
  3654. </ControlTemplate>
  3655. <Style x:Key="BaseComboBoxStyle" TargetType="{x:Type ComboBox}">
  3656. <Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}" />
  3657. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  3658. <Setter Property="Background" Value="Transparent" />
  3659. <Setter Property="BorderBrush" Value="{DynamicResource borderBrush}" />
  3660. <Setter Property="BorderThickness" Value="1" />
  3661. <Setter Property="Margin" Value="0,0,0,0" />
  3662. <Setter Property="Padding" Value="0" />
  3663. <Setter Property="Height" Value="24" />
  3664. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
  3665. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
  3666. <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
  3667. <Setter Property="ScrollViewer.PanningMode" Value="Both" />
  3668. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  3669. <Setter Property="VerticalContentAlignment" Value="Center" />
  3670. <Setter Property="IsTextSearchCaseSensitive" Value="true" />
  3671. <Setter Property="IsEditable" Value="true" />
  3672. <Setter Property="StaysOpenOnEdit" Value="true" />
  3673. <Setter Property="Template">
  3674. <Setter.Value>
  3675. <ControlTemplate TargetType="{x:Type ComboBox}">
  3676. <Border
  3677. Background="{TemplateBinding Background}"
  3678. BorderBrush="{TemplateBinding BorderBrush}"
  3679. BorderThickness="{TemplateBinding BorderThickness}"
  3680. SnapsToDevicePixels="true">
  3681. <Grid>
  3682. <Themes1:ClassicBorderDecorator
  3683. x:Name="Border"
  3684. BorderBrush="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}"
  3685. BorderStyle="None"
  3686. BorderThickness="2">
  3687. <Popup
  3688. x:Name="PART_Popup"
  3689. AllowsTransparency="true"
  3690. Focusable="False"
  3691. IsOpen="{TemplateBinding IsDropDownOpen}"
  3692. Placement="Bottom"
  3693. PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
  3694. <Themes1:SystemDropShadowChrome
  3695. x:Name="Shdw"
  3696. MinWidth="{Binding ActualWidth, ElementName=Border}"
  3697. MaxHeight="{TemplateBinding MaxDropDownHeight}"
  3698. Color="Transparent">
  3699. <Border
  3700. x:Name="DropDownBorder"
  3701. BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
  3702. BorderThickness="1">
  3703. <Border.Background>
  3704. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png" />
  3705. </Border.Background>
  3706. <ScrollViewer x:Name="DropDownScrollViewer">
  3707. <Grid RenderOptions.ClearTypeHint="Enabled">
  3708. <Canvas
  3709. Width="0"
  3710. Height="0"
  3711. HorizontalAlignment="Left"
  3712. VerticalAlignment="Top">
  3713. <Rectangle
  3714. x:Name="OpaqueRect"
  3715. Width="{Binding ActualWidth, ElementName=DropDownBorder}"
  3716. Height="{Binding ActualHeight, ElementName=DropDownBorder}"
  3717. Fill="{Binding Background, ElementName=DropDownBorder}" />
  3718. </Canvas>
  3719. <ItemsPresenter
  3720. x:Name="ItemsPresenter"
  3721. KeyboardNavigation.DirectionalNavigation="Contained"
  3722. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  3723. </Grid>
  3724. </ScrollViewer>
  3725. </Border>
  3726. </Themes1:SystemDropShadowChrome>
  3727. </Popup>
  3728. </Themes1:ClassicBorderDecorator>
  3729. <DockPanel Margin="2">
  3730. <FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right" />
  3731. <Border x:Name="SelectedItemBorder" Margin="{TemplateBinding Padding}">
  3732. <ContentPresenter
  3733. Margin="1,1,1,1"
  3734. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  3735. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  3736. Content="{TemplateBinding SelectionBoxItem}"
  3737. ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
  3738. ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
  3739. ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
  3740. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  3741. </Border>
  3742. </DockPanel>
  3743. <ToggleButton
  3744. Width="Auto"
  3745. MinWidth="0"
  3746. MinHeight="0"
  3747. Margin="2"
  3748. ClickMode="Press"
  3749. Focusable="false"
  3750. IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  3751. Style="{StaticResource ComboBoxTransparentButtonStyle}" />
  3752. </Grid>
  3753. </Border>
  3754. <ControlTemplate.Triggers>
  3755. <MultiTrigger>
  3756. <MultiTrigger.Conditions>
  3757. <!--<Condition Property="IsSelectionBoxHighlighted" Value="true"/>-->
  3758. <Condition Property="IsDropDownOpen" Value="false" />
  3759. </MultiTrigger.Conditions>
  3760. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
  3761. </MultiTrigger>
  3762. <!--<Trigger Property="IsSelectionBoxHighlighted" Value="true">
  3763. <Setter Property="Background" TargetName="SelectedItemBorder" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
  3764. </Trigger>-->
  3765. <Trigger Property="HasItems" Value="false">
  3766. <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
  3767. </Trigger>
  3768. <Trigger Property="IsEnabled" Value="false">
  3769. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  3770. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  3771. </Trigger>
  3772. <MultiTrigger>
  3773. <MultiTrigger.Conditions>
  3774. <Condition Property="IsGrouping" Value="true" />
  3775. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
  3776. </MultiTrigger.Conditions>
  3777. <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
  3778. </MultiTrigger>
  3779. <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
  3780. <Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
  3781. <Setter TargetName="Shdw" Property="Color" Value="#71000000" />
  3782. </Trigger>
  3783. <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
  3784. <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
  3785. <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
  3786. </Trigger>
  3787. </ControlTemplate.Triggers>
  3788. </ControlTemplate>
  3789. </Setter.Value>
  3790. </Setter>
  3791. <Style.Triggers>
  3792. <Trigger Property="IsEditable" Value="true">
  3793. <Setter Property="IsTabStop" Value="false" />
  3794. <Setter Property="Padding" Value="1" />
  3795. <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
  3796. </Trigger>
  3797. </Style.Triggers>
  3798. </Style>
  3799. <Style BasedOn="{StaticResource BaseComboBoxStyle}" TargetType="ComboBox" />
  3800. <!--#endregion-->
  3801. <!--#region ColorCommboxStyle-->
  3802. <ObjectDataProvider
  3803. x:Key="colorPropertieOdp"
  3804. MethodName="GetProperties"
  3805. ObjectInstance="{x:Type Colors}" />
  3806. <Style
  3807. x:Key="ColorCommboxStyle"
  3808. BasedOn="{StaticResource BaseComboBoxStyle}"
  3809. TargetType="ComboBox">
  3810. <Setter Property="IsTextSearchCaseSensitive" Value="False" />
  3811. <Setter Property="IsEditable" Value="False" />
  3812. <Setter Property="StaysOpenOnEdit" Value="False" />
  3813. <Setter Property="ItemsSource" Value="{Binding Source={StaticResource colorPropertieOdp}}" />
  3814. <Setter Property="ItemTemplate">
  3815. <Setter.Value>
  3816. <DataTemplate>
  3817. <StackPanel Orientation="Horizontal">
  3818. <Rectangle
  3819. Width="40"
  3820. Height="10"
  3821. Fill="{Binding Name}" />
  3822. <TextBlock Text="{Binding Name}" />
  3823. </StackPanel>
  3824. </DataTemplate>
  3825. </Setter.Value>
  3826. </Setter>
  3827. </Style>
  3828. <!--#endregion-->
  3829. </ResourceDictionary>