终端一体化运控平台
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

3159 linhas
181 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. <!--<ResourceDictionary.MergedDictionaries>
  10. <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
  11. <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
  12. </ResourceDictionary.MergedDictionaries>-->
  13. <!--#region Color-->
  14. <SolidColorBrush x:Key="foreground" Color="#FFA2C2E8" />
  15. <!--#endregion-->
  16. <!--#region ScrollBar-->
  17. <LinearGradientBrush x:Key="VerticalScrollBarBackground" StartPoint="0,0" EndPoint="1,0">
  18. <GradientStop Offset="0" Color="#E1E1E1" />
  19. <GradientStop Offset="0.20" Color="#EDEDED" />
  20. <GradientStop Offset="0.80" Color="#EDEDED" />
  21. <GradientStop Offset="1" Color="#E3E3E3" />
  22. </LinearGradientBrush>
  23. <SolidColorBrush x:Key="Menu.Static.Background" Color="#FFF0F0F0" />
  24. <SolidColorBrush x:Key="Expander.Static.Circle.Stroke" Color="#FF333333" />
  25. <SolidColorBrush x:Key="Expander.Static.Circle.Fill" Color="#FFFFFFFF" />
  26. <SolidColorBrush x:Key="Expander.Static.Arrow.Stroke" Color="#FF333333" />
  27. <SolidColorBrush x:Key="Expander.MouseOver.Circle.Stroke" Color="#FF5593FF" />
  28. <SolidColorBrush x:Key="Expander.MouseOver.Circle.Fill" Color="#FFF3F9FF" />
  29. <SolidColorBrush x:Key="Expander.MouseOver.Arrow.Stroke" Color="#FF000000" />
  30. <SolidColorBrush x:Key="Expander.Pressed.Circle.Stroke" Color="#FF3C77DD" />
  31. <SolidColorBrush x:Key="Expander.Pressed.Circle.Fill" Color="#FFD9ECFF" />
  32. <SolidColorBrush x:Key="Expander.Pressed.Arrow.Stroke" Color="#FF000000" />
  33. <SolidColorBrush x:Key="Expander.Disabled.Circle.Stroke" Color="#FFBCBCBC" />
  34. <SolidColorBrush x:Key="Expander.Disabled.Circle.Fill" Color="#FFE6E6E6" />
  35. <SolidColorBrush x:Key="Expander.Disabled.Arrow.Stroke" Color="#FF707070" />
  36. <Style x:Key="ExpanderHeaderFocusVisual">
  37. <Setter Property="Control.Template">
  38. <Setter.Value>
  39. <ControlTemplate>
  40. <Border>
  41. <Rectangle
  42. Margin="0"
  43. SnapsToDevicePixels="true"
  44. Stroke="Black"
  45. StrokeDashArray="1 2"
  46. StrokeThickness="1" />
  47. </Border>
  48. </ControlTemplate>
  49. </Setter.Value>
  50. </Setter>
  51. </Style>
  52. <Style x:Key="ExpanderDownHeaderStyle" TargetType="{x:Type ToggleButton}">
  53. <Setter Property="Template">
  54. <Setter.Value>
  55. <ControlTemplate TargetType="{x:Type ToggleButton}">
  56. <Border Padding="{TemplateBinding Padding}" Cursor="Hand">
  57. <Grid
  58. Height="35"
  59. Margin="5"
  60. SnapsToDevicePixels="False">
  61. <Grid.Background>
  62. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/Exp.png" />
  63. </Grid.Background>
  64. <Grid.ColumnDefinitions>
  65. <ColumnDefinition Width="35" />
  66. <ColumnDefinition Width="*" />
  67. </Grid.ColumnDefinitions>
  68. <Image
  69. Width="15"
  70. Margin="10,0,0,0"
  71. Source="/BPASmartClient.CustomResource;component/Image/上箭头.png" />
  72. <Ellipse
  73. x:Name="circle"
  74. Width="19"
  75. Height="19"
  76. HorizontalAlignment="Center"
  77. VerticalAlignment="Center"
  78. Fill="{StaticResource Expander.Static.Circle.Fill}"
  79. Stroke="{StaticResource Expander.Static.Circle.Stroke}"
  80. Visibility="Collapsed" />
  81. <Path
  82. x:Name="arrow"
  83. HorizontalAlignment="Center"
  84. VerticalAlignment="Center"
  85. Data="M 1,1.5 L 4.5,5 L 8,1.5"
  86. SnapsToDevicePixels="false"
  87. Stroke="{StaticResource Expander.Static.Arrow.Stroke}"
  88. StrokeThickness="2"
  89. Visibility="Collapsed" />
  90. <ContentPresenter
  91. Grid.Column="1"
  92. Margin="4,0,0,0"
  93. HorizontalAlignment="Left"
  94. VerticalAlignment="Center"
  95. RecognizesAccessKey="True"
  96. SnapsToDevicePixels="True" />
  97. </Grid>
  98. </Border>
  99. <ControlTemplate.Triggers>
  100. <Trigger Property="IsChecked" Value="true">
  101. <Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
  102. </Trigger>
  103. <Trigger Property="IsMouseOver" Value="true">
  104. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.MouseOver.Circle.Stroke}" />
  105. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.MouseOver.Circle.Fill}" />
  106. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
  107. </Trigger>
  108. <Trigger Property="IsPressed" Value="true">
  109. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Pressed.Circle.Stroke}" />
  110. <Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
  111. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Pressed.Circle.Fill}" />
  112. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Pressed.Arrow.Stroke}" />
  113. </Trigger>
  114. <Trigger Property="IsEnabled" Value="false">
  115. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Disabled.Circle.Stroke}" />
  116. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Disabled.Circle.Fill}" />
  117. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" />
  118. </Trigger>
  119. </ControlTemplate.Triggers>
  120. </ControlTemplate>
  121. </Setter.Value>
  122. </Setter>
  123. </Style>
  124. <SolidColorBrush x:Key="TextBox.Static.Border" Color="#FFABAdB3" />
  125. <SolidColorBrush x:Key="TextBox.MouseOver.Border" Color="#FF7EB4EA" />
  126. <SolidColorBrush x:Key="TextBox.Focus.Border" Color="#FF569DE5" />
  127. <Style TargetType="{x:Type PasswordBox}">
  128. <Setter Property="PasswordChar" Value="●" />
  129. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
  130. <Setter Property="BorderBrush" Value="{StaticResource TextBox.Static.Border}" />
  131. <Setter Property="Foreground" Value="#FF02C9FD" />
  132. <Setter Property="BorderThickness" Value="1" />
  133. <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
  134. <Setter Property="HorizontalContentAlignment" Value="Left" />
  135. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  136. <Setter Property="AllowDrop" Value="true" />
  137. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  138. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  139. <Setter Property="CaretBrush" Value="White" />
  140. <Setter Property="Template">
  141. <Setter.Value>
  142. <ControlTemplate TargetType="{x:Type PasswordBox}">
  143. <Border
  144. x:Name="border"
  145. BorderBrush="#FF08335F"
  146. BorderThickness="{TemplateBinding BorderThickness}"
  147. SnapsToDevicePixels="True">
  148. <ScrollViewer
  149. x:Name="PART_ContentHost"
  150. Focusable="false"
  151. HorizontalScrollBarVisibility="Hidden"
  152. VerticalScrollBarVisibility="Hidden" />
  153. </Border>
  154. <ControlTemplate.Triggers>
  155. <Trigger Property="IsEnabled" Value="false">
  156. <Setter TargetName="border" Property="Opacity" Value="0.56" />
  157. </Trigger>
  158. <Trigger Property="IsMouseOver" Value="true">
  159. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource TextBox.MouseOver.Border}" />
  160. </Trigger>
  161. <Trigger Property="IsKeyboardFocused" Value="true">
  162. <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource TextBox.Focus.Border}" />
  163. </Trigger>
  164. </ControlTemplate.Triggers>
  165. </ControlTemplate>
  166. </Setter.Value>
  167. </Setter>
  168. <Style.Triggers>
  169. <MultiTrigger>
  170. <MultiTrigger.Conditions>
  171. <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
  172. <Condition Property="IsSelectionActive" Value="false" />
  173. </MultiTrigger.Conditions>
  174. <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
  175. </MultiTrigger>
  176. </Style.Triggers>
  177. </Style>
  178. <Style x:Key="ExpanderUpHeaderStyle" TargetType="{x:Type ToggleButton}">
  179. <Setter Property="Template">
  180. <Setter.Value>
  181. <ControlTemplate TargetType="{x:Type ToggleButton}">
  182. <Border Padding="{TemplateBinding Padding}">
  183. <Grid Background="Transparent" SnapsToDevicePixels="False">
  184. <Grid.ColumnDefinitions>
  185. <ColumnDefinition Width="19" />
  186. <ColumnDefinition Width="*" />
  187. </Grid.ColumnDefinitions>
  188. <Grid>
  189. <Grid.LayoutTransform>
  190. <TransformGroup>
  191. <TransformGroup.Children>
  192. <TransformCollection>
  193. <RotateTransform Angle="180" />
  194. </TransformCollection>
  195. </TransformGroup.Children>
  196. </TransformGroup>
  197. </Grid.LayoutTransform>
  198. <Ellipse
  199. x:Name="circle"
  200. Width="19"
  201. Height="19"
  202. HorizontalAlignment="Center"
  203. VerticalAlignment="Center"
  204. Fill="{StaticResource Expander.Static.Circle.Fill}"
  205. Stroke="{StaticResource Expander.Static.Circle.Stroke}" />
  206. <Path
  207. x:Name="arrow"
  208. HorizontalAlignment="Center"
  209. VerticalAlignment="Center"
  210. Data="M 1,1.5 L 4.5,5 L 8,1.5"
  211. SnapsToDevicePixels="false"
  212. Stroke="{StaticResource Expander.Static.Arrow.Stroke}"
  213. StrokeThickness="2" />
  214. </Grid>
  215. <ContentPresenter
  216. Grid.Column="1"
  217. Margin="4,0,0,0"
  218. HorizontalAlignment="Left"
  219. VerticalAlignment="Center"
  220. RecognizesAccessKey="True"
  221. SnapsToDevicePixels="True" />
  222. </Grid>
  223. </Border>
  224. <ControlTemplate.Triggers>
  225. <Trigger Property="IsChecked" Value="true">
  226. <Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
  227. </Trigger>
  228. <Trigger Property="IsMouseOver" Value="true">
  229. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.MouseOver.Circle.Stroke}" />
  230. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.MouseOver.Circle.Fill}" />
  231. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
  232. </Trigger>
  233. <Trigger Property="IsPressed" Value="true">
  234. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Pressed.Circle.Stroke}" />
  235. <Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
  236. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Pressed.Circle.Fill}" />
  237. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Pressed.Arrow.Stroke}" />
  238. </Trigger>
  239. <Trigger Property="IsEnabled" Value="false">
  240. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Disabled.Circle.Stroke}" />
  241. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Disabled.Circle.Fill}" />
  242. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" />
  243. </Trigger>
  244. </ControlTemplate.Triggers>
  245. </ControlTemplate>
  246. </Setter.Value>
  247. </Setter>
  248. </Style>
  249. <Style x:Key="ExpanderLeftHeaderStyle" TargetType="{x:Type ToggleButton}">
  250. <Setter Property="Template">
  251. <Setter.Value>
  252. <ControlTemplate TargetType="{x:Type ToggleButton}">
  253. <Border Padding="{TemplateBinding Padding}">
  254. <Grid Background="Transparent" SnapsToDevicePixels="False">
  255. <Grid.RowDefinitions>
  256. <RowDefinition Height="19" />
  257. <RowDefinition Height="*" />
  258. </Grid.RowDefinitions>
  259. <Grid>
  260. <Grid.LayoutTransform>
  261. <TransformGroup>
  262. <TransformGroup.Children>
  263. <TransformCollection>
  264. <RotateTransform Angle="90" />
  265. </TransformCollection>
  266. </TransformGroup.Children>
  267. </TransformGroup>
  268. </Grid.LayoutTransform>
  269. <Ellipse
  270. x:Name="circle"
  271. Width="19"
  272. Height="19"
  273. HorizontalAlignment="Center"
  274. VerticalAlignment="Center"
  275. Fill="{StaticResource Expander.Static.Circle.Fill}"
  276. Stroke="{StaticResource Expander.Static.Circle.Stroke}" />
  277. <Path
  278. x:Name="arrow"
  279. HorizontalAlignment="Center"
  280. VerticalAlignment="Center"
  281. Data="M 1,1.5 L 4.5,5 L 8,1.5"
  282. SnapsToDevicePixels="false"
  283. Stroke="{StaticResource Expander.Static.Arrow.Stroke}"
  284. StrokeThickness="2" />
  285. </Grid>
  286. <ContentPresenter
  287. Grid.Row="1"
  288. Margin="0,4,0,0"
  289. HorizontalAlignment="Center"
  290. VerticalAlignment="Top"
  291. RecognizesAccessKey="True"
  292. SnapsToDevicePixels="True" />
  293. </Grid>
  294. </Border>
  295. <ControlTemplate.Triggers>
  296. <Trigger Property="IsChecked" Value="true">
  297. <Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
  298. </Trigger>
  299. <Trigger Property="IsMouseOver" Value="true">
  300. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.MouseOver.Circle.Stroke}" />
  301. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.MouseOver.Circle.Fill}" />
  302. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
  303. </Trigger>
  304. <Trigger Property="IsPressed" Value="true">
  305. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Pressed.Circle.Stroke}" />
  306. <Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
  307. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Pressed.Circle.Fill}" />
  308. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Pressed.Arrow.Stroke}" />
  309. </Trigger>
  310. <Trigger Property="IsEnabled" Value="false">
  311. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Disabled.Circle.Stroke}" />
  312. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Disabled.Circle.Fill}" />
  313. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" />
  314. </Trigger>
  315. </ControlTemplate.Triggers>
  316. </ControlTemplate>
  317. </Setter.Value>
  318. </Setter>
  319. </Style>
  320. <Style x:Key="ExpanderRightHeaderStyle" TargetType="{x:Type ToggleButton}">
  321. <Setter Property="Template">
  322. <Setter.Value>
  323. <ControlTemplate TargetType="{x:Type ToggleButton}">
  324. <Border Padding="{TemplateBinding Padding}">
  325. <Grid Background="Transparent" SnapsToDevicePixels="False">
  326. <Grid.RowDefinitions>
  327. <RowDefinition Height="19" />
  328. <RowDefinition Height="*" />
  329. </Grid.RowDefinitions>
  330. <Grid>
  331. <Grid.LayoutTransform>
  332. <TransformGroup>
  333. <TransformGroup.Children>
  334. <TransformCollection>
  335. <RotateTransform Angle="-90" />
  336. </TransformCollection>
  337. </TransformGroup.Children>
  338. </TransformGroup>
  339. </Grid.LayoutTransform>
  340. <Ellipse
  341. x:Name="circle"
  342. Width="19"
  343. Height="19"
  344. HorizontalAlignment="Center"
  345. VerticalAlignment="Center"
  346. Fill="{StaticResource Expander.Static.Circle.Fill}"
  347. Stroke="{StaticResource Expander.Static.Circle.Stroke}" />
  348. <Path
  349. x:Name="arrow"
  350. HorizontalAlignment="Center"
  351. VerticalAlignment="Center"
  352. Data="M 1,1.5 L 4.5,5 L 8,1.5"
  353. SnapsToDevicePixels="false"
  354. Stroke="{StaticResource Expander.Static.Arrow.Stroke}"
  355. StrokeThickness="2" />
  356. </Grid>
  357. <ContentPresenter
  358. Grid.Row="1"
  359. Margin="0,4,0,0"
  360. HorizontalAlignment="Center"
  361. VerticalAlignment="Top"
  362. RecognizesAccessKey="True"
  363. SnapsToDevicePixels="True" />
  364. </Grid>
  365. </Border>
  366. <ControlTemplate.Triggers>
  367. <Trigger Property="IsChecked" Value="true">
  368. <Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
  369. </Trigger>
  370. <Trigger Property="IsMouseOver" Value="true">
  371. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.MouseOver.Circle.Stroke}" />
  372. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.MouseOver.Circle.Fill}" />
  373. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
  374. </Trigger>
  375. <Trigger Property="IsPressed" Value="true">
  376. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Pressed.Circle.Stroke}" />
  377. <Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
  378. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Pressed.Circle.Fill}" />
  379. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Pressed.Arrow.Stroke}" />
  380. </Trigger>
  381. <Trigger Property="IsEnabled" Value="false">
  382. <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Disabled.Circle.Stroke}" />
  383. <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Disabled.Circle.Fill}" />
  384. <Setter TargetName="arrow" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" />
  385. </Trigger>
  386. </ControlTemplate.Triggers>
  387. </ControlTemplate>
  388. </Setter.Value>
  389. </Setter>
  390. </Style>
  391. <Style TargetType="{x:Type Expander}">
  392. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  393. <Setter Property="Background" Value="Transparent" />
  394. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  395. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  396. <Setter Property="BorderBrush" Value="Transparent" />
  397. <Setter Property="BorderThickness" Value="1" />
  398. <Setter Property="Template">
  399. <Setter.Value>
  400. <ControlTemplate TargetType="{x:Type Expander}">
  401. <Border
  402. Background="{TemplateBinding Background}"
  403. BorderBrush="{TemplateBinding BorderBrush}"
  404. BorderThickness="{TemplateBinding BorderThickness}"
  405. CornerRadius="3"
  406. SnapsToDevicePixels="true">
  407. <DockPanel>
  408. <ToggleButton
  409. x:Name="HeaderSite"
  410. MinWidth="0"
  411. MinHeight="0"
  412. Margin="1"
  413. Padding="{TemplateBinding Padding}"
  414. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  415. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  416. Content="{TemplateBinding Header}"
  417. ContentTemplate="{TemplateBinding HeaderTemplate}"
  418. ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
  419. DockPanel.Dock="Top"
  420. FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}"
  421. FontFamily="{TemplateBinding FontFamily}"
  422. FontSize="{TemplateBinding FontSize}"
  423. FontStretch="{TemplateBinding FontStretch}"
  424. FontStyle="{TemplateBinding FontStyle}"
  425. FontWeight="{TemplateBinding FontWeight}"
  426. Foreground="{TemplateBinding Foreground}"
  427. IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  428. Style="{StaticResource ExpanderDownHeaderStyle}" />
  429. <ContentPresenter
  430. x:Name="ExpandSite"
  431. Margin="{TemplateBinding Padding}"
  432. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  433. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  434. DockPanel.Dock="Bottom"
  435. Focusable="false"
  436. Visibility="Collapsed" />
  437. </DockPanel>
  438. </Border>
  439. <ControlTemplate.Triggers>
  440. <Trigger Property="IsExpanded" Value="true">
  441. <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
  442. </Trigger>
  443. <Trigger Property="ExpandDirection" Value="Right">
  444. <Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Right" />
  445. <Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Left" />
  446. <Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource ExpanderRightHeaderStyle}" />
  447. </Trigger>
  448. <Trigger Property="ExpandDirection" Value="Up">
  449. <Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Top" />
  450. <Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Bottom" />
  451. <Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource ExpanderUpHeaderStyle}" />
  452. </Trigger>
  453. <Trigger Property="ExpandDirection" Value="Left">
  454. <Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Left" />
  455. <Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Right" />
  456. <Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource ExpanderLeftHeaderStyle}" />
  457. </Trigger>
  458. <Trigger Property="IsEnabled" Value="false">
  459. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  460. </Trigger>
  461. </ControlTemplate.Triggers>
  462. </ControlTemplate>
  463. </Setter.Value>
  464. </Setter>
  465. </Style>
  466. <Style TargetType="{x:Type Menu}">
  467. <Setter Property="Background" Value="Transparent" />
  468. <Setter Property="FontFamily" Value="{DynamicResource {x:Static SystemFonts.MenuFontFamilyKey}}" />
  469. <Setter Property="FontSize" Value="16" />
  470. <Setter Property="FontStyle" Value="{DynamicResource {x:Static SystemFonts.MenuFontStyleKey}}" />
  471. <Setter Property="FontWeight" Value="{DynamicResource {x:Static SystemFonts.MenuFontWeightKey}}" />
  472. <Setter Property="HorizontalAlignment" Value="Left" />
  473. <Setter Property="VerticalAlignment" Value="Top" />
  474. <Setter Property="Margin" Value="10,10,0,0" />
  475. <Setter Property="Template">
  476. <Setter.Value>
  477. <ControlTemplate TargetType="{x:Type Menu}">
  478. <Border
  479. Padding="{TemplateBinding Padding}"
  480. Background="{TemplateBinding Background}"
  481. BorderBrush="{TemplateBinding BorderBrush}"
  482. BorderThickness="{TemplateBinding BorderThickness}"
  483. SnapsToDevicePixels="true">
  484. <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  485. </Border>
  486. </ControlTemplate>
  487. </Setter.Value>
  488. </Setter>
  489. </Style>
  490. <Style TargetType="{x:Type DatePickerTextBox}">
  491. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
  492. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
  493. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  494. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  495. <Setter Property="Template">
  496. <Setter.Value>
  497. <ControlTemplate TargetType="{x:Type DatePickerTextBox}">
  498. <Grid>
  499. <Grid.Resources>
  500. <SolidColorBrush x:Key="WatermarkBrush" Color="#FFAAAAAA" />
  501. </Grid.Resources>
  502. <Border
  503. x:Name="Border"
  504. Padding="{TemplateBinding Padding}"
  505. HorizontalAlignment="Center"
  506. VerticalAlignment="Center"
  507. BorderBrush="{TemplateBinding BorderBrush}"
  508. BorderThickness="{TemplateBinding BorderThickness}"
  509. CornerRadius="1"
  510. Opacity="1">
  511. <Grid
  512. x:Name="WatermarkContent"
  513. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  514. VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
  515. <Border x:Name="ContentElement" BorderThickness="1" />
  516. <Border x:Name="watermark_decorator" BorderThickness="1">
  517. <ContentControl
  518. x:Name="PART_Watermark"
  519. Padding="2"
  520. Focusable="False"
  521. IsHitTestVisible="False"
  522. Opacity="0" />
  523. </Border>
  524. <ScrollViewer
  525. x:Name="PART_ContentHost"
  526. Margin="0"
  527. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  528. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
  529. <Border
  530. x:Name="FocusVisual"
  531. BorderBrush="#FF45D6FA"
  532. CornerRadius="1"
  533. IsHitTestVisible="False"
  534. Opacity="0" />
  535. </Grid>
  536. </Border>
  537. <VisualStateManager.VisualStateGroups>
  538. <VisualStateGroup x:Name="CommonStates">
  539. <VisualStateGroup.Transitions>
  540. <VisualTransition GeneratedDuration="0" />
  541. <VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
  542. </VisualStateGroup.Transitions>
  543. <VisualState x:Name="Normal" />
  544. <VisualState x:Name="MouseOver" />
  545. </VisualStateGroup>
  546. <VisualStateGroup x:Name="WatermarkStates">
  547. <VisualStateGroup.Transitions>
  548. <VisualTransition GeneratedDuration="0" />
  549. </VisualStateGroup.Transitions>
  550. <VisualState x:Name="Unwatermarked" />
  551. <VisualState x:Name="Watermarked">
  552. <Storyboard>
  553. <DoubleAnimation
  554. Storyboard.TargetName="ContentElement"
  555. Storyboard.TargetProperty="Opacity"
  556. To="0"
  557. Duration="0" />
  558. <DoubleAnimation
  559. Storyboard.TargetName="PART_Watermark"
  560. Storyboard.TargetProperty="Opacity"
  561. To="1"
  562. Duration="0" />
  563. </Storyboard>
  564. </VisualState>
  565. </VisualStateGroup>
  566. <VisualStateGroup x:Name="FocusStates">
  567. <VisualStateGroup.Transitions>
  568. <VisualTransition GeneratedDuration="0" />
  569. </VisualStateGroup.Transitions>
  570. <VisualState x:Name="Unfocused" />
  571. <VisualState x:Name="Focused">
  572. <Storyboard>
  573. <DoubleAnimation
  574. Storyboard.TargetName="FocusVisual"
  575. Storyboard.TargetProperty="Opacity"
  576. To="1"
  577. Duration="0" />
  578. </Storyboard>
  579. </VisualState>
  580. </VisualStateGroup>
  581. </VisualStateManager.VisualStateGroups>
  582. </Grid>
  583. </ControlTemplate>
  584. </Setter.Value>
  585. </Setter>
  586. </Style>
  587. <Style TargetType="{x:Type DatePicker}">
  588. <Setter Property="Foreground" Value="#a2c2e8 " />
  589. <Setter Property="IsTodayHighlighted" Value="True" />
  590. <Setter Property="SelectedDateFormat" Value="Short" />
  591. <Setter Property="Background" Value="Transparent" />
  592. <Setter Property="Padding" Value="2" />
  593. <Setter Property="Height" Value="24" />
  594. <Setter Property="BorderBrush" Value="#08335f" />
  595. <Setter Property="BorderThickness" Value="1" />
  596. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  597. <Setter Property="Template">
  598. <Setter.Value>
  599. <ControlTemplate TargetType="{x:Type DatePicker}">
  600. <Border
  601. Padding="{TemplateBinding Padding}"
  602. Background="{TemplateBinding Background}"
  603. BorderBrush="{TemplateBinding BorderBrush}"
  604. BorderThickness="{TemplateBinding BorderThickness}">
  605. <Grid
  606. x:Name="PART_Root"
  607. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  608. VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
  609. <Grid.Resources>
  610. <SolidColorBrush x:Key="DisabledBrush" Color="#A5FFFFFF" />
  611. <ControlTemplate x:Key="DropDownButtonTemplate" TargetType="{x:Type Button}">
  612. <Grid>
  613. <Grid
  614. Width="15"
  615. Height="15"
  616. Margin="0,2,0,0"
  617. HorizontalAlignment="Center"
  618. VerticalAlignment="Top"
  619. Background="#11FFFFFF"
  620. FlowDirection="LeftToRight">
  621. <Grid.ColumnDefinitions>
  622. <ColumnDefinition Width="20*" />
  623. <ColumnDefinition Width="20*" />
  624. <ColumnDefinition Width="20*" />
  625. <ColumnDefinition Width="20*" />
  626. </Grid.ColumnDefinitions>
  627. <Grid.RowDefinitions>
  628. <RowDefinition Height="23*" />
  629. <RowDefinition Height="19*" />
  630. <RowDefinition Height="19*" />
  631. <RowDefinition Height="19*" />
  632. </Grid.RowDefinitions>
  633. <Border
  634. x:Name="Highlight"
  635. Grid.Row="0"
  636. Grid.RowSpan="4"
  637. Grid.ColumnSpan="4"
  638. Margin="-1"
  639. BorderBrush="#FF45D6FA"
  640. BorderThickness="1"
  641. CornerRadius="0,0,1,1"
  642. Opacity="0"
  643. Visibility="Hidden" />
  644. <Border
  645. x:Name="Background"
  646. Grid.Row="1"
  647. Grid.RowSpan="3"
  648. Grid.ColumnSpan="4"
  649. Margin="0,-1,0,0"
  650. Background="#FF1F3B53"
  651. BorderBrush="#FFFFFFFF"
  652. BorderThickness="1"
  653. CornerRadius=".5"
  654. Opacity="1"
  655. Visibility="Hidden" />
  656. <Border
  657. x:Name="BackgroundGradient"
  658. Grid.Row="1"
  659. Grid.RowSpan="3"
  660. Grid.ColumnSpan="4"
  661. Margin="0,-1,0,0"
  662. BorderBrush="#BF000000"
  663. BorderThickness="1"
  664. CornerRadius=".5"
  665. Opacity="1"
  666. Visibility="Hidden">
  667. <Border.Background>
  668. <LinearGradientBrush StartPoint=".7,0" EndPoint=".7,1">
  669. <GradientStop Offset="0" Color="#FFFFFFFF" />
  670. <GradientStop Offset="0.375" Color="#F9FFFFFF" />
  671. <GradientStop Offset="0.625" Color="#E5FFFFFF" />
  672. <GradientStop Offset="1" Color="#C6FFFFFF" />
  673. </LinearGradientBrush>
  674. </Border.Background>
  675. </Border>
  676. <Rectangle
  677. Grid.RowSpan="1"
  678. Grid.ColumnSpan="4"
  679. StrokeThickness="1"
  680. Visibility="Hidden">
  681. <Rectangle.Fill>
  682. <LinearGradientBrush StartPoint="0.46,1.6" EndPoint="0.3,-1.1">
  683. <GradientStop Color="#FF4084BD" />
  684. <GradientStop Offset="1" Color="#FFAFCFEA" />
  685. </LinearGradientBrush>
  686. </Rectangle.Fill>
  687. <Rectangle.Stroke>
  688. <LinearGradientBrush StartPoint="0.48,1.25" EndPoint="0.48,-1">
  689. <GradientStop Color="#FF494949" />
  690. <GradientStop Offset="1" Color="#FF9F9F9F" />
  691. </LinearGradientBrush>
  692. </Rectangle.Stroke>
  693. </Rectangle>
  694. <Path
  695. Grid.Row="1"
  696. Grid.RowSpan="3"
  697. Grid.Column="0"
  698. Grid.ColumnSpan="4"
  699. Margin="4,3,4,3"
  700. HorizontalAlignment="Center"
  701. VerticalAlignment="Center"
  702. 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"
  703. Fill="#FF2F2F2F"
  704. RenderTransformOrigin="0.5,0.5"
  705. Stretch="Fill"
  706. Visibility="Hidden" />
  707. <Ellipse
  708. Grid.ColumnSpan="4"
  709. Width="3"
  710. Height="3"
  711. HorizontalAlignment="Center"
  712. VerticalAlignment="Center"
  713. Fill="#FFFFFFFF"
  714. StrokeThickness="0"
  715. Visibility="Hidden" />
  716. <Border
  717. x:Name="DisabledVisual"
  718. Grid.Row="0"
  719. Grid.RowSpan="4"
  720. Grid.ColumnSpan="4"
  721. BorderBrush="#B2FFFFFF"
  722. BorderThickness="1"
  723. CornerRadius="0,0,.5,.5"
  724. Opacity="0"
  725. Visibility="Hidden" />
  726. <Image
  727. Grid.RowSpan="10"
  728. Grid.Column="0"
  729. Grid.ColumnSpan="10"
  730. Source="/BPASmartClient.CustomResource;component/Image/日历.png" />
  731. </Grid>
  732. <VisualStateManager.VisualStateGroups>
  733. <VisualStateGroup x:Name="CommonStates">
  734. <VisualStateGroup.Transitions>
  735. <VisualTransition GeneratedDuration="0" />
  736. <VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
  737. <VisualTransition GeneratedDuration="0:0:0.1" To="Pressed" />
  738. </VisualStateGroup.Transitions>
  739. <VisualState x:Name="Normal" />
  740. <VisualState x:Name="MouseOver">
  741. <Storyboard>
  742. <ColorAnimation
  743. Storyboard.TargetName="Background"
  744. Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
  745. To="#FF448DCA"
  746. Duration="0" />
  747. <ColorAnimationUsingKeyFrames
  748. BeginTime="0"
  749. Storyboard.TargetName="BackgroundGradient"
  750. Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)"
  751. Duration="00:00:00.001">
  752. <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF" />
  753. </ColorAnimationUsingKeyFrames>
  754. <ColorAnimationUsingKeyFrames
  755. BeginTime="0"
  756. Storyboard.TargetName="BackgroundGradient"
  757. Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)"
  758. Duration="00:00:00.001">
  759. <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF" />
  760. </ColorAnimationUsingKeyFrames>
  761. <ColorAnimationUsingKeyFrames
  762. BeginTime="0"
  763. Storyboard.TargetName="BackgroundGradient"
  764. Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
  765. Duration="00:00:00.001">
  766. <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF" />
  767. </ColorAnimationUsingKeyFrames>
  768. </Storyboard>
  769. </VisualState>
  770. <VisualState x:Name="Pressed">
  771. <Storyboard>
  772. <ColorAnimationUsingKeyFrames
  773. BeginTime="0"
  774. Storyboard.TargetName="Background"
  775. Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
  776. Duration="00:00:00.001">
  777. <SplineColorKeyFrame KeyTime="0" Value="#FF448DCA" />
  778. </ColorAnimationUsingKeyFrames>
  779. <DoubleAnimationUsingKeyFrames
  780. BeginTime="0"
  781. Storyboard.TargetName="Highlight"
  782. Storyboard.TargetProperty="(UIElement.Opacity)"
  783. Duration="00:00:00.001">
  784. <SplineDoubleKeyFrame KeyTime="0" Value="1" />
  785. </DoubleAnimationUsingKeyFrames>
  786. <ColorAnimationUsingKeyFrames
  787. BeginTime="0"
  788. Storyboard.TargetName="BackgroundGradient"
  789. Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
  790. Duration="00:00:00.001">
  791. <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF" />
  792. </ColorAnimationUsingKeyFrames>
  793. <ColorAnimationUsingKeyFrames
  794. BeginTime="0"
  795. Storyboard.TargetName="BackgroundGradient"
  796. Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)"
  797. Duration="00:00:00.001">
  798. <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF" />
  799. </ColorAnimationUsingKeyFrames>
  800. <ColorAnimationUsingKeyFrames
  801. BeginTime="0"
  802. Storyboard.TargetName="BackgroundGradient"
  803. Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)"
  804. Duration="00:00:00.001">
  805. <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF" />
  806. </ColorAnimationUsingKeyFrames>
  807. <ColorAnimationUsingKeyFrames
  808. BeginTime="0"
  809. Storyboard.TargetName="BackgroundGradient"
  810. Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)"
  811. Duration="00:00:00.001">
  812. <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF" />
  813. </ColorAnimationUsingKeyFrames>
  814. </Storyboard>
  815. </VisualState>
  816. <VisualState x:Name="Disabled" />
  817. </VisualStateGroup>
  818. </VisualStateManager.VisualStateGroups>
  819. </Grid>
  820. </ControlTemplate>
  821. </Grid.Resources>
  822. <Grid.ColumnDefinitions>
  823. <ColumnDefinition Width="*" />
  824. <ColumnDefinition Width="Auto" />
  825. </Grid.ColumnDefinitions>
  826. <Button
  827. x:Name="PART_Button"
  828. Grid.Row="0"
  829. Grid.Column="1"
  830. Width="20"
  831. Margin="3,0,3,0"
  832. HorizontalAlignment="Left"
  833. VerticalAlignment="Top"
  834. Focusable="False"
  835. Foreground="{TemplateBinding Foreground}"
  836. Template="{StaticResource DropDownButtonTemplate}" />
  837. <DatePickerTextBox
  838. x:Name="PART_TextBox"
  839. Grid.Row="0"
  840. Grid.Column="0"
  841. HorizontalContentAlignment="Stretch"
  842. VerticalContentAlignment="Stretch"
  843. Focusable="{TemplateBinding Focusable}" />
  844. <Grid
  845. x:Name="PART_DisabledVisual"
  846. Grid.Row="0"
  847. Grid.Column="0"
  848. Grid.ColumnSpan="2"
  849. IsHitTestVisible="False"
  850. Opacity="0">
  851. <Grid.ColumnDefinitions>
  852. <ColumnDefinition Width="*" />
  853. <ColumnDefinition Width="Auto" />
  854. </Grid.ColumnDefinitions>
  855. <Rectangle
  856. Grid.Row="0"
  857. Grid.Column="0"
  858. RadiusX="1"
  859. RadiusY="1" />
  860. <Rectangle
  861. Grid.Row="0"
  862. Grid.Column="1"
  863. Width="19"
  864. Height="18"
  865. Margin="3,0,3,0"
  866. Fill="#A5FFFFFF"
  867. RadiusX="1"
  868. RadiusY="1" />
  869. <Popup
  870. x:Name="PART_Popup"
  871. AllowsTransparency="True"
  872. Placement="Bottom"
  873. PlacementTarget="{Binding ElementName=PART_TextBox}"
  874. StaysOpen="False" />
  875. </Grid>
  876. </Grid>
  877. <VisualStateManager.VisualStateGroups>
  878. <VisualStateGroup x:Name="CommonStates">
  879. <VisualState x:Name="Normal" />
  880. <VisualState x:Name="Disabled">
  881. <Storyboard>
  882. <DoubleAnimation
  883. Storyboard.TargetName="PART_DisabledVisual"
  884. Storyboard.TargetProperty="Opacity"
  885. To="1"
  886. Duration="0" />
  887. </Storyboard>
  888. </VisualState>
  889. </VisualStateGroup>
  890. </VisualStateManager.VisualStateGroups>
  891. </Border>
  892. <ControlTemplate.Triggers>
  893. <DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="false">
  894. <Setter TargetName="PART_TextBox" Property="Foreground" Value="{Binding Foreground, RelativeSource={RelativeSource TemplatedParent}}" />
  895. </DataTrigger>
  896. </ControlTemplate.Triggers>
  897. </ControlTemplate>
  898. </Setter.Value>
  899. </Setter>
  900. </Style>
  901. <Style x:Key="arrowPath" TargetType="Path">
  902. <Setter Property="Data" Value="M5.5555,8.4319998 L0.5,0.5 L10.611,0.5 z" />
  903. <Setter Property="Fill" Value="Gray" />
  904. <Setter Property="Stretch" Value="Fill" />
  905. <Setter Property="StrokeThickness" Value="1" />
  906. <Setter Property="Stroke" Value="Black" />
  907. <Setter Property="Width" Value="8" />
  908. <Setter Property="Height" Value="5" />
  909. <Setter Property="SnapsToDevicePixels" Value="True" />
  910. <Setter Property="Cursor" Value="Hand" />
  911. </Style>
  912. <Style x:Key="UpScrollBarButton" TargetType="{x:Type RepeatButton}">
  913. <Setter Property="OverridesDefaultStyle" Value="true" />
  914. <Setter Property="Cursor" Value="Hand" />
  915. <Setter Property="Focusable" Value="false" />
  916. <Setter Property="IsTabStop" Value="false" />
  917. <Setter Property="Template">
  918. <Setter.Value>
  919. <ControlTemplate TargetType="{x:Type RepeatButton}">
  920. <Image
  921. Width="8"
  922. Height="5"
  923. Source="Image/Scroll_↑.png" />
  924. </ControlTemplate>
  925. </Setter.Value>
  926. </Setter>
  927. </Style>
  928. <Style x:Key="DownScrollBarButton" TargetType="{x:Type RepeatButton}">
  929. <Setter Property="OverridesDefaultStyle" Value="true" />
  930. <Setter Property="Cursor" Value="Hand" />
  931. <Setter Property="Focusable" Value="false" />
  932. <Setter Property="IsTabStop" Value="false" />
  933. <Setter Property="Template">
  934. <Setter.Value>
  935. <ControlTemplate TargetType="{x:Type RepeatButton}">
  936. <Image
  937. Width="8"
  938. Height="5"
  939. Source="Image/Scroll_↓.png" />
  940. </ControlTemplate>
  941. </Setter.Value>
  942. </Setter>
  943. </Style>
  944. <Style x:Key="LeftScrollBarButton" TargetType="{x:Type RepeatButton}">
  945. <Setter Property="OverridesDefaultStyle" Value="true" />
  946. <Setter Property="Cursor" Value="Hand" />
  947. <Setter Property="Focusable" Value="false" />
  948. <Setter Property="IsTabStop" Value="false" />
  949. <Setter Property="Template">
  950. <Setter.Value>
  951. <ControlTemplate TargetType="{x:Type RepeatButton}">
  952. <Image
  953. Width="5"
  954. Height="8"
  955. Source="Image/Scroll_←.png" />
  956. </ControlTemplate>
  957. </Setter.Value>
  958. </Setter>
  959. </Style>
  960. <Style x:Key="RightScrollBarButton" TargetType="{x:Type RepeatButton}">
  961. <Setter Property="OverridesDefaultStyle" Value="true" />
  962. <Setter Property="Cursor" Value="Hand" />
  963. <Setter Property="Focusable" Value="false" />
  964. <Setter Property="IsTabStop" Value="false" />
  965. <Setter Property="Template">
  966. <Setter.Value>
  967. <ControlTemplate TargetType="{x:Type RepeatButton}">
  968. <Image
  969. Width="5"
  970. Height="8"
  971. Source="Image/Scroll_→.png" />
  972. </ControlTemplate>
  973. </Setter.Value>
  974. </Setter>
  975. </Style>
  976. <Style x:Key="VerticalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
  977. <Setter Property="OverridesDefaultStyle" Value="true" />
  978. <Setter Property="Background" Value="Transparent" />
  979. <Setter Property="Focusable" Value="false" />
  980. <Setter Property="IsTabStop" Value="false" />
  981. <Setter Property="Template">
  982. <Setter.Value>
  983. <ControlTemplate TargetType="{x:Type RepeatButton}">
  984. <Rectangle
  985. Width="{TemplateBinding Width}"
  986. Height="{TemplateBinding Height}"
  987. Fill="{TemplateBinding Background}" />
  988. </ControlTemplate>
  989. </Setter.Value>
  990. </Setter>
  991. </Style>
  992. <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
  993. <Setter Property="OverridesDefaultStyle" Value="true" />
  994. <Setter Property="IsTabStop" Value="false" />
  995. <Setter Property="Template">
  996. <Setter.Value>
  997. <ControlTemplate TargetType="{x:Type Thumb}">
  998. <Border
  999. x:Name="bd1"
  1000. Margin="2,2,2,2"
  1001. Background="#00c2f4"
  1002. CornerRadius="3"
  1003. Cursor="Hand"
  1004. Opacity="1"
  1005. SnapsToDevicePixels="true" />
  1006. <ControlTemplate.Triggers>
  1007. <Trigger Property="IsMouseOver" Value="true">
  1008. <Setter TargetName="bd1" Property="Margin" Value="-1,-1,-1,-1" />
  1009. </Trigger>
  1010. </ControlTemplate.Triggers>
  1011. </ControlTemplate>
  1012. </Setter.Value>
  1013. </Setter>
  1014. </Style>
  1015. <LinearGradientBrush x:Key="HorizontalScrollBarBackground" StartPoint="0,0" EndPoint="0,1">
  1016. <GradientStop Offset="0" Color="#E1E1E1" />
  1017. <GradientStop Offset="0.20" Color="#EDEDED" />
  1018. <GradientStop Offset="0.80" Color="#EDEDED" />
  1019. <GradientStop Offset="1" Color="#E3E3E3" />
  1020. </LinearGradientBrush>
  1021. <Style x:Key="HorizontalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
  1022. <Setter Property="OverridesDefaultStyle" Value="true" />
  1023. <Setter Property="Background" Value="Transparent" />
  1024. <Setter Property="Focusable" Value="false" />
  1025. <Setter Property="IsTabStop" Value="false" />
  1026. <Setter Property="Template">
  1027. <Setter.Value>
  1028. <ControlTemplate TargetType="{x:Type RepeatButton}">
  1029. <Rectangle
  1030. Width="{TemplateBinding Width}"
  1031. Height="{TemplateBinding Height}"
  1032. Fill="{TemplateBinding Background}" />
  1033. </ControlTemplate>
  1034. </Setter.Value>
  1035. </Setter>
  1036. </Style>
  1037. <Style TargetType="{x:Type ScrollBar}">
  1038. <Setter Property="Background">
  1039. <Setter.Value>
  1040. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/表格标题背景2.png" Opacity="0.2" />
  1041. </Setter.Value>
  1042. </Setter>
  1043. <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
  1044. <Setter Property="Stylus.IsFlicksEnabled" Value="false" />
  1045. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  1046. <Setter Property="Opacity" Value="1" />
  1047. <Setter Property="MinWidth" Value="3" />
  1048. <Setter Property="Template">
  1049. <Setter.Value>
  1050. <ControlTemplate TargetType="{x:Type ScrollBar}">
  1051. <Border
  1052. Width="10"
  1053. Margin="0,0,0,0"
  1054. Background="{TemplateBinding Background}"
  1055. CornerRadius="2"
  1056. Opacity="{TemplateBinding Opacity}">
  1057. <Grid x:Name="Bg" SnapsToDevicePixels="true">
  1058. <Grid.RowDefinitions>
  1059. <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}" />
  1060. <RowDefinition Height="*" />
  1061. <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}" />
  1062. </Grid.RowDefinitions>
  1063. <RepeatButton
  1064. Themes:ScrollChrome.ScrollGlyph="UpArrow"
  1065. Command="{x:Static ScrollBar.LineUpCommand}"
  1066. IsEnabled="{TemplateBinding IsMouseOver}"
  1067. Style="{StaticResource UpScrollBarButton}" />
  1068. <Track
  1069. x:Name="PART_Track"
  1070. Grid.Row="1"
  1071. IsDirectionReversed="true"
  1072. IsEnabled="{TemplateBinding IsMouseOver}">
  1073. <Track.DecreaseRepeatButton>
  1074. <RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource VerticalScrollBarPageButton}" />
  1075. </Track.DecreaseRepeatButton>
  1076. <Track.IncreaseRepeatButton>
  1077. <RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource VerticalScrollBarPageButton}" />
  1078. </Track.IncreaseRepeatButton>
  1079. <Track.Thumb>
  1080. <Thumb Themes:ScrollChrome.ScrollGlyph="VerticalGripper" Style="{StaticResource ScrollBarThumb}" />
  1081. </Track.Thumb>
  1082. </Track>
  1083. <RepeatButton
  1084. Grid.Row="2"
  1085. Themes:ScrollChrome.ScrollGlyph="DownArrow"
  1086. Command="{x:Static ScrollBar.LineDownCommand}"
  1087. IsEnabled="{TemplateBinding IsMouseOver}"
  1088. Style="{StaticResource DownScrollBarButton}" />
  1089. </Grid>
  1090. </Border>
  1091. </ControlTemplate>
  1092. </Setter.Value>
  1093. </Setter>
  1094. <Style.Triggers>
  1095. <Trigger Property="Orientation" Value="Horizontal">
  1096. <Setter Property="Template">
  1097. <Setter.Value>
  1098. <ControlTemplate TargetType="{x:Type ScrollBar}">
  1099. <Border
  1100. Height="10"
  1101. Margin="0,0,0,0"
  1102. Background="{TemplateBinding Background}"
  1103. CornerRadius="2"
  1104. Opacity="{TemplateBinding Opacity}">
  1105. <Grid
  1106. x:Name="Bg"
  1107. Background="{TemplateBinding Background}"
  1108. SnapsToDevicePixels="true">
  1109. <Grid.ColumnDefinitions>
  1110. <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}" />
  1111. <ColumnDefinition Width="*" />
  1112. <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}" />
  1113. </Grid.ColumnDefinitions>
  1114. <RepeatButton
  1115. Themes:ScrollChrome.ScrollGlyph="LeftArrow"
  1116. Command="{x:Static ScrollBar.LineLeftCommand}"
  1117. IsEnabled="{TemplateBinding IsMouseOver}"
  1118. Style="{StaticResource LeftScrollBarButton}" />
  1119. <Track
  1120. x:Name="PART_Track"
  1121. Grid.Column="1"
  1122. IsEnabled="{TemplateBinding IsMouseOver}">
  1123. <Track.DecreaseRepeatButton>
  1124. <RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}" Style="{StaticResource HorizontalScrollBarPageButton}" />
  1125. </Track.DecreaseRepeatButton>
  1126. <Track.IncreaseRepeatButton>
  1127. <RepeatButton Command="{x:Static ScrollBar.PageRightCommand}" Style="{StaticResource HorizontalScrollBarPageButton}" />
  1128. </Track.IncreaseRepeatButton>
  1129. <Track.Thumb>
  1130. <Thumb Themes:ScrollChrome.ScrollGlyph="HorizontalGripper" Style="{StaticResource ScrollBarThumb}" />
  1131. </Track.Thumb>
  1132. </Track>
  1133. <RepeatButton
  1134. Grid.Column="2"
  1135. Themes:ScrollChrome.ScrollGlyph="RightArrow"
  1136. Command="{x:Static ScrollBar.LineRightCommand}"
  1137. IsEnabled="{TemplateBinding IsMouseOver}"
  1138. Style="{StaticResource RightScrollBarButton}" />
  1139. </Grid>
  1140. </Border>
  1141. </ControlTemplate>
  1142. </Setter.Value>
  1143. </Setter>
  1144. </Trigger>
  1145. </Style.Triggers>
  1146. </Style>
  1147. <!--#endregion-->
  1148. <!--#region DataGrid-->
  1149. <Style x:Key="ColumnHeaderGripperStyle" TargetType="{x:Type Thumb}">
  1150. <Setter Property="Width" Value="1" />
  1151. <Setter Property="Background" Value="#175c86" />
  1152. <Setter Property="Cursor" Value="SizeWE" />
  1153. <Setter Property="Margin" Value="0,0,0,0" />
  1154. <Setter Property="Template">
  1155. <Setter.Value>
  1156. <ControlTemplate TargetType="{x:Type Thumb}">
  1157. <Border
  1158. Width="{TemplateBinding Width}"
  1159. Margin="{TemplateBinding Margin}"
  1160. Background="{TemplateBinding Background}"
  1161. Opacity="0.4" />
  1162. </ControlTemplate>
  1163. </Setter.Value>
  1164. </Setter>
  1165. </Style>
  1166. <Style TargetType="{x:Type DataGridColumnHeader}">
  1167. <Setter Property="HorizontalContentAlignment" Value="Center" />
  1168. <Setter Property="VerticalContentAlignment" Value="Center" />
  1169. <Setter Property="Height" Value="30" />
  1170. <Setter Property="Background">
  1171. <Setter.Value>
  1172. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/表格标题背景2.png" Opacity="0.2" />
  1173. <!--<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/datagrid/data_标题栏背景.png" Opacity="0.3"/>-->
  1174. </Setter.Value>
  1175. </Setter>
  1176. <Setter Property="BorderThickness" Value="0" />
  1177. <Setter Property="Foreground" Value="#00c2f4" />
  1178. <Setter Property="FontSize" Value="14" />
  1179. <Setter Property="Template">
  1180. <Setter.Value>
  1181. <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
  1182. <Grid>
  1183. <Border
  1184. Padding="{TemplateBinding Padding}"
  1185. Background="{TemplateBinding Background}"
  1186. BorderBrush="{TemplateBinding BorderBrush}"
  1187. BorderThickness="{TemplateBinding BorderThickness}">
  1188. <ContentPresenter
  1189. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1190. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1191. RecognizesAccessKey="True"
  1192. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1193. </Border>
  1194. <GridSplitter
  1195. HorizontalAlignment="Right"
  1196. Background="#FF0BAE3F"
  1197. BorderBrush="#FFBD2A2A" />
  1198. <Thumb
  1199. x:Name="PART_RightHeaderGripper"
  1200. Width="2"
  1201. HorizontalAlignment="Right"
  1202. Background="#FF1D9B9E"
  1203. Style="{StaticResource ColumnHeaderGripperStyle}" />
  1204. </Grid>
  1205. </ControlTemplate>
  1206. </Setter.Value>
  1207. </Setter>
  1208. </Style>
  1209. <Style x:Key="DataGridColumnHeader" TargetType="{x:Type DataGridColumnHeader}">
  1210. <Setter Property="HorizontalContentAlignment" Value="Center" />
  1211. <Setter Property="VerticalContentAlignment" Value="Center" />
  1212. <Setter Property="Height" Value="30" />
  1213. <Setter Property="Background">
  1214. <Setter.Value>
  1215. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/datagrid/data_标题栏背景.png" />
  1216. </Setter.Value>
  1217. </Setter>
  1218. <Setter Property="BorderThickness" Value="0" />
  1219. <Setter Property="Foreground" Value="White" />
  1220. <Setter Property="FontSize" Value="10" />
  1221. <Setter Property="Template">
  1222. <Setter.Value>
  1223. <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
  1224. <Grid>
  1225. <Border
  1226. Padding="{TemplateBinding Padding}"
  1227. Background="{TemplateBinding Background}"
  1228. BorderBrush="{TemplateBinding BorderBrush}"
  1229. BorderThickness="{TemplateBinding BorderThickness}">
  1230. <ContentPresenter
  1231. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1232. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1233. RecognizesAccessKey="True"
  1234. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1235. </Border>
  1236. <Thumb
  1237. x:Name="PART_RightHeaderGripper"
  1238. HorizontalAlignment="Right"
  1239. Style="{StaticResource ColumnHeaderGripperStyle}" />
  1240. </Grid>
  1241. </ControlTemplate>
  1242. </Setter.Value>
  1243. </Setter>
  1244. </Style>
  1245. <Style TargetType="{x:Type DataGridRow}">
  1246. <Setter Property="Background" Value="Transparent" />
  1247. <Setter Property="HorizontalContentAlignment" Value="Center" />
  1248. <Setter Property="SnapsToDevicePixels" Value="true" />
  1249. <Setter Property="Foreground" Value="#abf4ff" />
  1250. <Setter Property="BorderBrush" Value="#abf4ff"></Setter>
  1251. <Setter Property="FontSize" Value="10" />
  1252. <Setter Property="Template">
  1253. <Setter.Value>
  1254. <ControlTemplate TargetType="{x:Type DataGridRow}">
  1255. <Border
  1256. x:Name="DGR_Border"
  1257. BorderThickness="{TemplateBinding BorderThickness}"
  1258. SnapsToDevicePixels="True">
  1259. <SelectiveScrollingGrid x:Name="selectiveScrollingGrid">
  1260. <SelectiveScrollingGrid.ColumnDefinitions>
  1261. <ColumnDefinition Width="Auto" />
  1262. <ColumnDefinition Width="*" />
  1263. </SelectiveScrollingGrid.ColumnDefinitions>
  1264. <SelectiveScrollingGrid.RowDefinitions>
  1265. <RowDefinition Height="*" />
  1266. <RowDefinition Height="Auto" />
  1267. </SelectiveScrollingGrid.RowDefinitions>
  1268. <DataGridCellsPresenter
  1269. Grid.Column="1"
  1270. ItemsPanel="{TemplateBinding ItemsPanel}"
  1271. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1272. <DataGridDetailsPresenter
  1273. Grid.Row="1"
  1274. Grid.Column="1"
  1275. SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding AreRowDetailsFrozen, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
  1276. Visibility="{TemplateBinding DetailsVisibility}" />
  1277. <DataGridRowHeader
  1278. Grid.RowSpan="2"
  1279. SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
  1280. Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
  1281. </SelectiveScrollingGrid>
  1282. <VisualStateManager.VisualStateGroups>
  1283. <VisualStateGroup x:Name="CommonStates">
  1284. <VisualState x:Name="Normal" />
  1285. <VisualState x:Name="MouseOver">
  1286. <Storyboard>
  1287. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DGR_Border" Storyboard.TargetProperty="(Panel.Background)">
  1288. <DiscreteObjectKeyFrame KeyTime="0">
  1289. <DiscreteObjectKeyFrame.Value>
  1290. <SolidColorBrush Color="#230077BC" />
  1291. </DiscreteObjectKeyFrame.Value>
  1292. </DiscreteObjectKeyFrame>
  1293. </ObjectAnimationUsingKeyFrames>
  1294. </Storyboard>
  1295. </VisualState>
  1296. <VisualState x:Name="Normal_Selected">
  1297. <Storyboard>
  1298. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DGR_Border" Storyboard.TargetProperty="(Panel.Background)">
  1299. <DiscreteObjectKeyFrame KeyTime="0">
  1300. <DiscreteObjectKeyFrame.Value>
  1301. <SolidColorBrush Color="#3D0077BC" />
  1302. </DiscreteObjectKeyFrame.Value>
  1303. </DiscreteObjectKeyFrame>
  1304. </ObjectAnimationUsingKeyFrames>
  1305. </Storyboard>
  1306. </VisualState>
  1307. </VisualStateGroup>
  1308. <VisualStateGroup x:Name="ValidationStates">
  1309. <VisualState x:Name="Valid" />
  1310. <VisualState x:Name="InvalidFocused" />
  1311. <VisualState x:Name="InvalidUnfocused" />
  1312. </VisualStateGroup>
  1313. </VisualStateManager.VisualStateGroups>
  1314. </Border>
  1315. </ControlTemplate>
  1316. </Setter.Value>
  1317. </Setter>
  1318. </Style>
  1319. <Style TargetType="{x:Type DataGridCell}">
  1320. <Setter Property="Background" Value="Transparent" />
  1321. <Setter Property="BorderBrush" Value="#FF31879E" />
  1322. <Setter Property="BorderThickness" Value="0" />
  1323. <Setter Property="Template">
  1324. <Setter.Value>
  1325. <ControlTemplate TargetType="{x:Type DataGridCell}">
  1326. <Border
  1327. Background="{TemplateBinding Background}"
  1328. BorderBrush="{TemplateBinding BorderBrush}"
  1329. BorderThickness="{TemplateBinding BorderThickness}"
  1330. SnapsToDevicePixels="True">
  1331. <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1332. </Border>
  1333. </ControlTemplate>
  1334. </Setter.Value>
  1335. </Setter>
  1336. <Style.Triggers>
  1337. <Trigger Property="IsSelected" Value="True">
  1338. <!--<Setter Property="Background" Value="#FF2281EC"/>-->
  1339. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
  1340. <!--<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>-->
  1341. </Trigger>
  1342. <!--<Trigger Property="IsKeyboardFocusWithin" Value="True">
  1343. <Setter Property="BorderBrush" Value="{DynamicResource {x:Static DataGrid.FocusBorderBrushKey}}"/>
  1344. </Trigger>-->
  1345. <Trigger Property="IsEnabled" Value="false">
  1346. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  1347. </Trigger>
  1348. </Style.Triggers>
  1349. </Style>
  1350. <Style TargetType="{x:Type DataGrid}">
  1351. <Setter Property="AutoGenerateColumns" Value="False" />
  1352. <Setter Property="Background" Value="Transparent" />
  1353. <Setter Property="CanUserAddRows" Value="False" />
  1354. <Setter Property="CanUserDeleteRows" Value="False" />
  1355. <Setter Property="BorderThickness" Value="0" />
  1356. <Setter Property="HeadersVisibility" Value="Column" />
  1357. <Setter Property="GridLinesVisibility" Value="None" />
  1358. <Setter Property="SelectionMode" Value="Single" />
  1359. <!--<Setter Property="Template">
  1360. <Setter.Value>
  1361. <ControlTemplate TargetType="DataGrid">
  1362. <Border BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
  1363. <ScrollViewer x:Name="DG_ScrollViewer" Focusable="False">
  1364. <ScrollViewer.Template>
  1365. <ControlTemplate TargetType="{x:Type ScrollViewer}">
  1366. <Grid>
  1367. <Grid.ColumnDefinitions>
  1368. <ColumnDefinition Width="Auto"/>
  1369. <ColumnDefinition Width="*"/>
  1370. <ColumnDefinition Width="Auto"/>
  1371. </Grid.ColumnDefinitions>
  1372. <Grid.RowDefinitions>
  1373. <RowDefinition Height="Auto"/>
  1374. <RowDefinition Height="*"/>
  1375. <RowDefinition Height="Auto"/>
  1376. </Grid.RowDefinitions>
  1377. <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}}}">
  1378. <Button.Visibility>
  1379. <Binding Path="HeadersVisibility" RelativeSource="{RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type DataGrid}}">
  1380. <Binding.ConverterParameter>
  1381. <DataGridHeadersVisibility>All</DataGridHeadersVisibility>
  1382. </Binding.ConverterParameter>
  1383. </Binding>
  1384. </Button.Visibility>
  1385. </Button>
  1386. <DataGridColumnHeadersPresenter x:Name="PART_ColumnHeadersPresenter" Grid.Column="1">
  1387. <DataGridColumnHeadersPresenter.Visibility>
  1388. <Binding Path="HeadersVisibility" RelativeSource="{RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type DataGrid}}">
  1389. <Binding.ConverterParameter>
  1390. <DataGridHeadersVisibility>Column</DataGridHeadersVisibility>
  1391. </Binding.ConverterParameter>
  1392. </Binding>
  1393. </DataGridColumnHeadersPresenter.Visibility>
  1394. </DataGridColumnHeadersPresenter>
  1395. <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"/>
  1396. <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}"/>
  1397. <Grid Grid.Column="1" Grid.Row="2" >
  1398. <Grid.ColumnDefinitions>
  1399. <ColumnDefinition Width="{Binding NonFrozenColumnsViewportHorizontalOffset, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type DataGrid}}}"/>
  1400. <ColumnDefinition Width="*"/>
  1401. </Grid.ColumnDefinitions>
  1402. <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}"/>
  1403. </Grid>
  1404. </Grid>
  1405. </ControlTemplate>
  1406. </ScrollViewer.Template>
  1407. <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  1408. </ScrollViewer>
  1409. </Border>
  1410. </ControlTemplate>
  1411. </Setter.Value>
  1412. </Setter>-->
  1413. <!--<Style.Triggers>
  1414. <DataTrigger Binding="{Binding PZItems.Count}" Value="0">
  1415. <Setter Property="Visibility" Value="Collapsed"></Setter>
  1416. </DataTrigger>
  1417. </Style.Triggers>-->
  1418. </Style>
  1419. <!--#endregion-->
  1420. <!--#region ListBox-->
  1421. <SolidColorBrush x:Key="ListBorder" Color="#828790" />
  1422. <Style TargetType="{x:Type ListBox}">
  1423. <!--<Setter Property="Background" >
  1424. <Setter.Value>
  1425. <ImageBrush ImageSource="Images/Pop_bg.png" Stretch="Fill" />
  1426. </Setter.Value>
  1427. </Setter>-->
  1428. <Setter Property="Background" Value="Transparent" />
  1429. <Setter Property="BorderBrush" Value="{StaticResource ListBorder}" />
  1430. <Setter Property="BorderThickness" Value="0" />
  1431. <Setter Property="Padding" Value="10" />
  1432. <Setter Property="Foreground" Value="White" />
  1433. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
  1434. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
  1435. <Setter Property="ScrollViewer.PanningMode" Value="Both" />
  1436. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  1437. <Setter Property="VerticalContentAlignment" Value="Center" />
  1438. </Style>
  1439. <!--#endregion-->
  1440. <!--#region ListBoxItem-->
  1441. <Style x:Key="baseListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
  1442. <Setter Property="Background" Value="Transparent" />
  1443. <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
  1444. <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
  1445. <Setter Property="Padding" Value="2,0,0,0" />
  1446. <Setter Property="Foreground" Value="#FF90C390" />
  1447. <Setter Property="Template">
  1448. <Setter.Value>
  1449. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  1450. <Border
  1451. x:Name="Bd"
  1452. Padding="{TemplateBinding Padding}"
  1453. Background="{TemplateBinding Background}"
  1454. BorderBrush="{TemplateBinding BorderBrush}"
  1455. BorderThickness="{TemplateBinding BorderThickness}"
  1456. SnapsToDevicePixels="true">
  1457. <ContentPresenter
  1458. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1459. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1460. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1461. </Border>
  1462. <ControlTemplate.Triggers>
  1463. <Trigger Property="IsSelected" Value="true">
  1464. <Setter TargetName="Bd" Property="Background" Value="#230077BC" />
  1465. <Setter TargetName="Bd" Property="Opacity" Value="0.8" />
  1466. <Setter Property="Foreground" Value="Snow" />
  1467. </Trigger>
  1468. <!--<MultiTrigger>
  1469. <MultiTrigger.Conditions>
  1470. <Condition Property="IsSelected" Value="True"/>
  1471. <Condition Property="Selector.IsSelectionActive" Value="False"/>
  1472. </MultiTrigger.Conditions>
  1473. <Setter Property="Background" TargetName="Bd" Value="#FFA7BB24"/>
  1474. <Setter Property="Foreground" Value="Snow"/>
  1475. </MultiTrigger>-->
  1476. <!--<MultiTrigger>
  1477. <MultiTrigger.Conditions>
  1478. <Condition Binding="{Binding }" Value="true"/>
  1479. <Condition Property="Selector.IsSelectionActive" Value="false"/>
  1480. </MultiTrigger.Conditions>
  1481. <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.InactiveCaptionTextColor}}"/>
  1482. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}}"/>
  1483. </MultiTrigger>
  1484. <Trigger Property="IsEnabled" Value="true">
  1485. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  1486. </Trigger>-->
  1487. </ControlTemplate.Triggers>
  1488. </ControlTemplate>
  1489. </Setter.Value>
  1490. </Setter>
  1491. </Style>
  1492. <Style x:Key="baseListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
  1493. <Setter Property="Background" Value="Transparent" />
  1494. <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
  1495. <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
  1496. <Setter Property="Padding" Value="2,0,0,0" />
  1497. <Setter Property="Foreground" Value="#FF90C390" />
  1498. <Setter Property="Template">
  1499. <Setter.Value>
  1500. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  1501. <Border
  1502. x:Name="Bd"
  1503. Padding="{TemplateBinding Padding}"
  1504. Background="{TemplateBinding Background}"
  1505. BorderBrush="{TemplateBinding BorderBrush}"
  1506. BorderThickness="{TemplateBinding BorderThickness}"
  1507. SnapsToDevicePixels="true">
  1508. <ContentPresenter
  1509. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1510. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1511. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1512. </Border>
  1513. <ControlTemplate.Triggers>
  1514. <MultiTrigger>
  1515. <MultiTrigger.Conditions>
  1516. <Condition Property="IsSelected" Value="True" />
  1517. <Condition Property="Selector.IsSelectionActive" Value="True" />
  1518. </MultiTrigger.Conditions>
  1519. <Setter TargetName="Bd" Property="Opacity" Value="0.6" />
  1520. </MultiTrigger>
  1521. </ControlTemplate.Triggers>
  1522. </ControlTemplate>
  1523. </Setter.Value>
  1524. </Setter>
  1525. </Style>
  1526. <Style BasedOn="{StaticResource baseListBoxItemStyle}" TargetType="{x:Type ListBoxItem}" />
  1527. <Style
  1528. x:Key="ListBoxItemStyle1"
  1529. BasedOn="{StaticResource baseListBoxItemStyle}"
  1530. TargetType="{x:Type ListBoxItem}">
  1531. <Style.Triggers>
  1532. <MultiDataTrigger>
  1533. <MultiDataTrigger.Conditions>
  1534. <Condition Binding="{Binding DataContext.IsNotDeal, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}" Value="false" />
  1535. <Condition Binding="{Binding IsDeal}" Value="0" />
  1536. </MultiDataTrigger.Conditions>
  1537. <Setter Property="Visibility" Value="Collapsed" />
  1538. </MultiDataTrigger>
  1539. <MultiDataTrigger>
  1540. <MultiDataTrigger.Conditions>
  1541. <Condition Binding="{Binding DataContext.IsRecive, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}" Value="false" />
  1542. <Condition Binding="{Binding IsDeal}" Value="1" />
  1543. </MultiDataTrigger.Conditions>
  1544. <Setter Property="Visibility" Value="Collapsed" />
  1545. </MultiDataTrigger>
  1546. <MultiDataTrigger>
  1547. <MultiDataTrigger.Conditions>
  1548. <Condition Binding="{Binding DataContext.IsRefuse, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}" Value="false" />
  1549. <Condition Binding="{Binding IsDeal}" Value="2" />
  1550. </MultiDataTrigger.Conditions>
  1551. <Setter Property="Visibility" Value="Collapsed" />
  1552. </MultiDataTrigger>
  1553. </Style.Triggers>
  1554. </Style>
  1555. <!--#endregion-->
  1556. <!--#region TabControl-->
  1557. <Style x:Key="borderTab4_No" TargetType="Border">
  1558. <Style.Setters>
  1559. <Setter Property="Background">
  1560. <Setter.Value>
  1561. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
  1562. </Setter.Value>
  1563. </Setter>
  1564. </Style.Setters>
  1565. </Style>
  1566. <Style x:Key="borderTab4_Select" TargetType="Border">
  1567. <Style.Setters>
  1568. <Setter Property="Background">
  1569. <Setter.Value>
  1570. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
  1571. </Setter.Value>
  1572. </Setter>
  1573. </Style.Setters>
  1574. </Style>
  1575. <Style x:Key="TabItemFocusVisual">
  1576. <Setter Property="Control.Template">
  1577. <Setter.Value>
  1578. <ControlTemplate>
  1579. <Rectangle
  1580. Margin="4,4,4,2"
  1581. SnapsToDevicePixels="true"
  1582. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  1583. StrokeDashArray="1 2"
  1584. StrokeThickness="1" />
  1585. </ControlTemplate>
  1586. </Setter.Value>
  1587. </Setter>
  1588. </Style>
  1589. <Style TargetType="{x:Type TabControl}">
  1590. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  1591. <Setter Property="HorizontalContentAlignment" Value="Center" />
  1592. <Setter Property="VerticalContentAlignment" Value="Center" />
  1593. <Setter Property="Template">
  1594. <Setter.Value>
  1595. <ControlTemplate TargetType="{x:Type TabControl}">
  1596. <Grid
  1597. ClipToBounds="true"
  1598. KeyboardNavigation.TabNavigation="Local"
  1599. SnapsToDevicePixels="true">
  1600. <Grid.ColumnDefinitions>
  1601. <ColumnDefinition x:Name="ColumnDefinition0" />
  1602. <ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
  1603. </Grid.ColumnDefinitions>
  1604. <Grid.RowDefinitions>
  1605. <RowDefinition x:Name="RowDefinition0" Height="Auto" />
  1606. <RowDefinition x:Name="RowDefinition1" Height="*" />
  1607. </Grid.RowDefinitions>
  1608. <TabPanel
  1609. x:Name="HeaderPanel"
  1610. Grid.Row="0"
  1611. Grid.Column="0"
  1612. Margin="2,2,2,0"
  1613. Panel.ZIndex="1"
  1614. IsItemsHost="true"
  1615. KeyboardNavigation.TabIndex="1" />
  1616. <Border
  1617. x:Name="ContentPanel"
  1618. Grid.Row="1"
  1619. Grid.Column="0"
  1620. BorderBrush="{x:Null}"
  1621. BorderThickness="{TemplateBinding BorderThickness}"
  1622. KeyboardNavigation.DirectionalNavigation="Contained"
  1623. KeyboardNavigation.TabIndex="2"
  1624. KeyboardNavigation.TabNavigation="Local">
  1625. <ContentPresenter
  1626. x:Name="PART_SelectedContentHost"
  1627. Margin="{TemplateBinding Padding}"
  1628. ContentSource="SelectedContent"
  1629. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1630. </Border>
  1631. </Grid>
  1632. <ControlTemplate.Triggers>
  1633. <Trigger Property="TabStripPlacement" Value="Bottom">
  1634. <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="1" />
  1635. <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
  1636. <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
  1637. <Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
  1638. <Setter TargetName="HeaderPanel" Property="Margin" Value="2,0,2,2" />
  1639. </Trigger>
  1640. <Trigger Property="TabStripPlacement" Value="Left">
  1641. <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="0" />
  1642. <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
  1643. <Setter TargetName="HeaderPanel" Property="Grid.Column" Value="0" />
  1644. <Setter TargetName="ContentPanel" Property="Grid.Column" Value="1" />
  1645. <Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
  1646. <Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
  1647. <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
  1648. <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
  1649. <Setter TargetName="HeaderPanel" Property="Margin" Value="2,2,0,2" />
  1650. </Trigger>
  1651. <Trigger Property="TabStripPlacement" Value="Right">
  1652. <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="0" />
  1653. <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
  1654. <Setter TargetName="HeaderPanel" Property="Grid.Column" Value="1" />
  1655. <Setter TargetName="ContentPanel" Property="Grid.Column" Value="0" />
  1656. <Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
  1657. <Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
  1658. <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
  1659. <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
  1660. <Setter TargetName="HeaderPanel" Property="Margin" Value="0,2,2,2" />
  1661. </Trigger>
  1662. <Trigger Property="IsEnabled" Value="false">
  1663. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  1664. </Trigger>
  1665. </ControlTemplate.Triggers>
  1666. </ControlTemplate>
  1667. </Setter.Value>
  1668. </Setter>
  1669. </Style>
  1670. <Style TargetType="{x:Type TabItem}">
  1671. <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}" />
  1672. <Setter Property="Foreground">
  1673. <Setter.Value>
  1674. #A5FFFFFF
  1675. </Setter.Value>
  1676. </Setter>
  1677. <Setter Property="Padding" Value="6,1,6,1" />
  1678. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  1679. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  1680. <Setter Property="Cursor" Value="Hand" />
  1681. <Setter Property="Template">
  1682. <Setter.Value>
  1683. <ControlTemplate TargetType="{x:Type TabItem}">
  1684. <Border
  1685. x:Name="Bd"
  1686. Height="35"
  1687. Margin="5"
  1688. Padding="{TemplateBinding Padding}"
  1689. BorderThickness="1"
  1690. CornerRadius="2">
  1691. <ContentPresenter
  1692. x:Name="Content"
  1693. HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  1694. VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  1695. ContentSource="Header"
  1696. Cursor="Hand"
  1697. RecognizesAccessKey="True"
  1698. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1699. </Border>
  1700. <ControlTemplate.Triggers>
  1701. <Trigger Property="IsSelected" Value="true">
  1702. <Setter Property="Foreground" Value="#8f723c" />
  1703. <Setter TargetName="Bd" Property="Background">
  1704. <Setter.Value>
  1705. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
  1706. </Setter.Value>
  1707. </Setter>
  1708. </Trigger>
  1709. <Trigger Property="IsSelected" Value="False">
  1710. <Setter Property="Foreground" Value="White" />
  1711. <Setter TargetName="Bd" Property="Background">
  1712. <Setter.Value>
  1713. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
  1714. </Setter.Value>
  1715. </Setter>
  1716. </Trigger>
  1717. <Trigger Property="IsMouseOver" Value="True">
  1718. <Setter Property="Foreground" Value="#8f723c" />
  1719. <Setter TargetName="Bd" Property="Background">
  1720. <Setter.Value>
  1721. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
  1722. </Setter.Value>
  1723. </Setter>
  1724. </Trigger>
  1725. </ControlTemplate.Triggers>
  1726. </ControlTemplate>
  1727. </Setter.Value>
  1728. </Setter>
  1729. </Style>
  1730. <Style x:Key="TabItem样式1" TargetType="{x:Type TabItem}">
  1731. <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}" />
  1732. <Setter Property="Foreground" Value="#A5FFFFFF" />
  1733. <Setter Property="Padding" Value="6,1,6,1" />
  1734. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  1735. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  1736. <Setter Property="Template">
  1737. <Setter.Value>
  1738. <ControlTemplate TargetType="{x:Type TabItem}">
  1739. <Border
  1740. x:Name="Bd"
  1741. Height="60"
  1742. Margin="2"
  1743. Padding="{TemplateBinding Padding}"
  1744. BorderThickness="1"
  1745. CornerRadius="2">
  1746. <ContentPresenter
  1747. x:Name="Content"
  1748. HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  1749. VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  1750. ContentSource="Header"
  1751. Cursor="Hand"
  1752. RecognizesAccessKey="True"
  1753. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1754. </Border>
  1755. <ControlTemplate.Triggers>
  1756. <Trigger Property="IsSelected" Value="true">
  1757. <Setter Property="Foreground" Value="#8f723c" />
  1758. <Setter TargetName="Bd" Property="Background">
  1759. <Setter.Value>
  1760. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab3_Select.png" />
  1761. </Setter.Value>
  1762. </Setter>
  1763. </Trigger>
  1764. <Trigger Property="IsSelected" Value="False">
  1765. <Setter Property="Foreground" Value="#134278" />
  1766. <Setter TargetName="Bd" Property="Background">
  1767. <Setter.Value>
  1768. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab3_No.png" />
  1769. </Setter.Value>
  1770. </Setter>
  1771. </Trigger>
  1772. </ControlTemplate.Triggers>
  1773. </ControlTemplate>
  1774. </Setter.Value>
  1775. </Setter>
  1776. </Style>
  1777. <Style x:Key="TabItem样式2" TargetType="{x:Type TabItem}">
  1778. <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}" />
  1779. <Setter Property="Foreground">
  1780. <Setter.Value>
  1781. #A5FFFFFF
  1782. </Setter.Value>
  1783. </Setter>
  1784. <Setter Property="Padding" Value="6,1,6,1" />
  1785. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  1786. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  1787. <Setter Property="Template">
  1788. <Setter.Value>
  1789. <ControlTemplate TargetType="{x:Type TabItem}">
  1790. <Border
  1791. x:Name="Bd"
  1792. Height="60"
  1793. Margin="2"
  1794. Padding="{TemplateBinding Padding}"
  1795. BorderThickness="1"
  1796. CornerRadius="2">
  1797. <ContentPresenter
  1798. x:Name="Content"
  1799. HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  1800. VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  1801. ContentSource="Header"
  1802. Cursor="Hand"
  1803. RecognizesAccessKey="True"
  1804. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1805. </Border>
  1806. <ControlTemplate.Triggers>
  1807. <Trigger Property="IsSelected" Value="true">
  1808. <Setter Property="Foreground" Value="#8f723c" />
  1809. <Setter TargetName="Bd" Property="Background">
  1810. <Setter.Value>
  1811. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab_SelectBJ.png" />
  1812. </Setter.Value>
  1813. </Setter>
  1814. </Trigger>
  1815. <Trigger Property="IsSelected" Value="False">
  1816. <Setter Property="Foreground" Value="#134278" />
  1817. <Setter TargetName="Bd" Property="Background">
  1818. <Setter.Value>
  1819. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab_NoBJ.png" />
  1820. </Setter.Value>
  1821. </Setter>
  1822. </Trigger>
  1823. </ControlTemplate.Triggers>
  1824. </ControlTemplate>
  1825. </Setter.Value>
  1826. </Setter>
  1827. </Style>
  1828. <!--#endregion-->
  1829. <!--#region ProgressBar圆形统计图-->
  1830. <local:Style3DashConverter x:Key="Style3Dash" />
  1831. <local:Style3ArcConverter x:Key="Style3Arc" />
  1832. <Style x:Key="CircleProgressBar3" TargetType="{x:Type ProgressBar}">
  1833. <Setter Property="Width" Value="100" />
  1834. <Setter Property="Height" Value="100" />
  1835. <Setter Property="Template">
  1836. <Setter.Value>
  1837. <ControlTemplate TargetType="{x:Type ProgressBar}">
  1838. <Grid>
  1839. <Rectangle
  1840. Fill="#ef426f"
  1841. RadiusX="5"
  1842. RadiusY="5"
  1843. Visibility="Collapsed" />
  1844. <Ellipse
  1845. Width="80"
  1846. Height="80"
  1847. Stroke="#FF2470FF"
  1848. StrokeThickness="10" />
  1849. <Ellipse
  1850. Width="80"
  1851. Height="80"
  1852. RenderTransformOrigin="0.5,0.5"
  1853. Stroke="#FF0198FF"
  1854. StrokeDashCap="{Binding Value, Converter={StaticResource Style3Dash}, RelativeSource={RelativeSource TemplatedParent}}"
  1855. StrokeThickness="10">
  1856. <Ellipse.RenderTransform>
  1857. <RotateTransform Angle="-90" />
  1858. </Ellipse.RenderTransform>
  1859. <Ellipse.StrokeDashArray>
  1860. <MultiBinding Converter="{StaticResource Style3Arc}">
  1861. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1862. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1863. </MultiBinding>
  1864. </Ellipse.StrokeDashArray>
  1865. </Ellipse>
  1866. <TextBlock
  1867. HorizontalAlignment="Center"
  1868. VerticalAlignment="Center"
  1869. FontSize="20"
  1870. Foreground="#01acff"
  1871. Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat=\{0\}%}" />
  1872. </Grid>
  1873. </ControlTemplate>
  1874. </Setter.Value>
  1875. </Setter>
  1876. </Style>
  1877. <Style x:Key="CircleProgressBar5" TargetType="{x:Type ProgressBar}">
  1878. <Setter Property="Width" Value="100" />
  1879. <Setter Property="Height" Value="100" />
  1880. <Setter Property="Template">
  1881. <Setter.Value>
  1882. <ControlTemplate TargetType="{x:Type ProgressBar}">
  1883. <Grid>
  1884. <Rectangle
  1885. Fill="#ef426f"
  1886. RadiusX="5"
  1887. RadiusY="5"
  1888. Visibility="Collapsed" />
  1889. <Ellipse
  1890. Width="80"
  1891. Height="80"
  1892. Stroke="#7F15806C"
  1893. StrokeThickness="10" />
  1894. <Ellipse
  1895. Width="80"
  1896. Height="80"
  1897. RenderTransformOrigin="0.5,0.5"
  1898. Stroke="#CC19910D"
  1899. StrokeDashCap="{Binding Value, Converter={StaticResource Style3Dash}, RelativeSource={RelativeSource TemplatedParent}}"
  1900. StrokeThickness="10">
  1901. <Ellipse.RenderTransform>
  1902. <RotateTransform Angle="-90" />
  1903. </Ellipse.RenderTransform>
  1904. <Ellipse.StrokeDashArray>
  1905. <MultiBinding Converter="{StaticResource Style3Arc}">
  1906. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1907. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1908. </MultiBinding>
  1909. </Ellipse.StrokeDashArray>
  1910. </Ellipse>
  1911. <TextBlock
  1912. HorizontalAlignment="Center"
  1913. VerticalAlignment="Center"
  1914. FontSize="20"
  1915. Foreground="#CC19910D"
  1916. Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat=\{0\}%}" />
  1917. </Grid>
  1918. </ControlTemplate>
  1919. </Setter.Value>
  1920. </Setter>
  1921. </Style>
  1922. <Style x:Key="CircleProgressBar4" TargetType="{x:Type ProgressBar}">
  1923. <Setter Property="Width" Value="100" />
  1924. <Setter Property="Height" Value="100" />
  1925. <Setter Property="Template">
  1926. <Setter.Value>
  1927. <ControlTemplate TargetType="{x:Type ProgressBar}">
  1928. <Grid>
  1929. <Rectangle
  1930. Fill="#ef426f"
  1931. RadiusX="5"
  1932. RadiusY="5"
  1933. Visibility="Collapsed" />
  1934. <Ellipse
  1935. Width="80"
  1936. Height="80"
  1937. Stroke="#CC3E0B0B"
  1938. StrokeThickness="10" />
  1939. <Ellipse
  1940. Width="80"
  1941. Height="80"
  1942. RenderTransformOrigin="0.5,0.5"
  1943. Stroke="#CCAC1919"
  1944. StrokeDashCap="{Binding Value, Converter={StaticResource Style3Dash}, RelativeSource={RelativeSource TemplatedParent}}"
  1945. StrokeThickness="10">
  1946. <Ellipse.RenderTransform>
  1947. <RotateTransform Angle="-90" />
  1948. </Ellipse.RenderTransform>
  1949. <Ellipse.StrokeDashArray>
  1950. <MultiBinding Converter="{StaticResource Style3Arc}">
  1951. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1952. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1953. </MultiBinding>
  1954. </Ellipse.StrokeDashArray>
  1955. </Ellipse>
  1956. <TextBlock
  1957. HorizontalAlignment="Center"
  1958. VerticalAlignment="Center"
  1959. FontSize="20"
  1960. Foreground="#CCAC1919"
  1961. Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat=\{0\}%}" />
  1962. </Grid>
  1963. </ControlTemplate>
  1964. </Setter.Value>
  1965. </Setter>
  1966. </Style>
  1967. <!--#endregion-->
  1968. <!--#region Expander-->
  1969. <ImageBrush x:Key="leftImage" ImageSource="/BPASmartClient.CustomResource;component/Image/leftImage.png" />
  1970. <ImageBrush x:Key="leftImageSub" ImageSource="/BPASmartClient.CustomResource;component/Image/leftImageSub.png" />
  1971. <ImageBrush x:Key="topImage" ImageSource="/BPASmartClient.CustomResource;component/Image/topImage.png" />
  1972. <Style x:Key="ToggleButtonStyle" TargetType="{x:Type ToggleButton}">
  1973. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  1974. <Setter Property="Height" Value="80" />
  1975. <Setter Property="HorizontalContentAlignment" Value="Right" />
  1976. <Setter Property="VerticalContentAlignment" Value="Center" />
  1977. <Setter Property="Padding" Value="10,10" />
  1978. <Setter Property="Template">
  1979. <Setter.Value>
  1980. <ControlTemplate TargetType="{x:Type ToggleButton}">
  1981. <Grid>
  1982. <Border
  1983. x:Name="border2"
  1984. Margin="{TemplateBinding Padding}"
  1985. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1986. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1987. Background="{TemplateBinding Background}">
  1988. <ContentPresenter
  1989. Margin="{TemplateBinding Padding}"
  1990. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1991. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1992. RecognizesAccessKey="True"
  1993. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1994. </Border>
  1995. </Grid>
  1996. <ControlTemplate.Triggers>
  1997. <Trigger Property="IsPressed" Value="true">
  1998. <Setter Property="Background" Value="#FFd2e7f4" />
  1999. </Trigger>
  2000. <Trigger Property="IsChecked" Value="true">
  2001. <Setter TargetName="border2" Property="Background" Value="{StaticResource ResourceKey=leftImage}" />
  2002. </Trigger>
  2003. <Trigger Property="IsChecked" Value="false">
  2004. <Setter TargetName="border2" Property="Background">
  2005. <Setter.Value>
  2006. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/矩形样式.png" />
  2007. </Setter.Value>
  2008. </Setter>
  2009. </Trigger>
  2010. <Trigger Property="IsEnabled" Value="false">
  2011. <Setter Property="Foreground" Value="White" />
  2012. </Trigger>
  2013. <MultiTrigger>
  2014. <MultiTrigger.Conditions>
  2015. <Condition Property="IsChecked" Value="false" />
  2016. <Condition Property="IsMouseOver" Value="True" />
  2017. </MultiTrigger.Conditions>
  2018. <MultiTrigger.Setters>
  2019. <Setter TargetName="border2" Property="Background">
  2020. <Setter.Value>
  2021. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
  2022. </Setter.Value>
  2023. </Setter>
  2024. </MultiTrigger.Setters>
  2025. </MultiTrigger>
  2026. </ControlTemplate.Triggers>
  2027. </ControlTemplate>
  2028. </Setter.Value>
  2029. </Setter>
  2030. </Style>
  2031. <Style x:Key="ExpanderStyle" TargetType="{x:Type Expander}">
  2032. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  2033. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  2034. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  2035. <Setter Property="BorderBrush" Value="Transparent" />
  2036. <Setter Property="BorderThickness" Value="1" />
  2037. <Setter Property="Template">
  2038. <Setter.Value>
  2039. <ControlTemplate TargetType="{x:Type Expander}">
  2040. <DockPanel Cursor="Hand">
  2041. <ToggleButton
  2042. x:Name="HeaderSite"
  2043. Height="60"
  2044. MinWidth="0"
  2045. MinHeight="0"
  2046. Margin="1"
  2047. Padding="{TemplateBinding Padding}"
  2048. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  2049. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  2050. Content="{TemplateBinding Header}"
  2051. ContentTemplate="{TemplateBinding HeaderTemplate}"
  2052. ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
  2053. DockPanel.Dock="Top"
  2054. FontFamily="{TemplateBinding FontFamily}"
  2055. FontSize="{TemplateBinding FontSize}"
  2056. FontStretch="{TemplateBinding FontStretch}"
  2057. FontStyle="{TemplateBinding FontStyle}"
  2058. FontWeight="{TemplateBinding FontWeight}"
  2059. Foreground="{TemplateBinding Foreground}"
  2060. IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  2061. Style="{StaticResource ToggleButtonStyle}" />
  2062. <ContentPresenter
  2063. x:Name="ExpandSite"
  2064. Margin="{TemplateBinding Padding}"
  2065. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  2066. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  2067. DockPanel.Dock="Left"
  2068. Focusable="false"
  2069. Visibility="Collapsed" />
  2070. </DockPanel>
  2071. <ControlTemplate.Triggers>
  2072. <Trigger Property="IsExpanded" Value="true">
  2073. <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
  2074. </Trigger>
  2075. </ControlTemplate.Triggers>
  2076. </ControlTemplate>
  2077. </Setter.Value>
  2078. </Setter>
  2079. </Style>
  2080. <!--#endregion-->
  2081. <!--#region RadioButton-->
  2082. <Style x:Key="RadioMiniButtonStyle" TargetType="{x:Type RadioButton}">
  2083. <Setter Property="Margin" Value="5,10,1,0" />
  2084. <Setter Property="Width" Value="160" />
  2085. <Setter Property="Height" Value="30" />
  2086. <Setter Property="Cursor" Value="Hand" />
  2087. <Setter Property="FontSize" Value="14" />
  2088. <Setter Property="FontFamily" Value="粗体" />
  2089. <Setter Property="Foreground" Value="#DDD" />
  2090. <Setter Property="VerticalContentAlignment" Value="Center" />
  2091. <Setter Property="HorizontalContentAlignment" Value="Center" />
  2092. <Setter Property="BorderBrush" Value="Transparent" />
  2093. <Setter Property="BorderThickness" Value="0" />
  2094. <Setter Property="Background" Value="#DDD" />
  2095. <Setter Property="HorizontalAlignment" Value="Right" />
  2096. <Setter Property="Template">
  2097. <Setter.Value>
  2098. <ControlTemplate TargetType="{x:Type RadioButton}">
  2099. <Grid
  2100. x:Name="templateRoot"
  2101. Background="Transparent"
  2102. SnapsToDevicePixels="True">
  2103. <Border x:Name="border2" />
  2104. <ContentPresenter
  2105. x:Name="contentPresenter"
  2106. Margin="{TemplateBinding Padding}"
  2107. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  2108. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  2109. Content="{TemplateBinding Content}"
  2110. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  2111. ContentTemplate="{TemplateBinding ContentTemplate}"
  2112. Focusable="False"
  2113. RecognizesAccessKey="True"
  2114. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  2115. </Grid>
  2116. <ControlTemplate.Triggers>
  2117. <Trigger Property="HasContent" Value="True">
  2118. <Setter Property="FocusVisualStyle">
  2119. <Setter.Value>
  2120. <Style>
  2121. <Setter Property="Control.Template">
  2122. <Setter.Value>
  2123. <ControlTemplate>
  2124. <Rectangle
  2125. Margin="14,0,0,0"
  2126. SnapsToDevicePixels="True"
  2127. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  2128. StrokeDashArray="1 2"
  2129. StrokeThickness="1" />
  2130. </ControlTemplate>
  2131. </Setter.Value>
  2132. </Setter>
  2133. </Style>
  2134. </Setter.Value>
  2135. </Setter>
  2136. <Setter Property="Padding" Value="4,-1,0,0" />
  2137. </Trigger>
  2138. <Trigger Property="IsChecked" Value="{x:Null}" />
  2139. <Trigger Property="IsChecked" Value="true">
  2140. <Setter Property="Foreground" Value="White" />
  2141. <Setter TargetName="border2" Property="Background" Value="{StaticResource ResourceKey=leftImageSub}" />
  2142. </Trigger>
  2143. <Trigger Property="IsChecked" Value="false">
  2144. <Setter TargetName="border2" Property="Background">
  2145. <Setter.Value>
  2146. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/矩形样式.png" />
  2147. </Setter.Value>
  2148. </Setter>
  2149. <Setter Property="Foreground" Value="#4B8EC4" />
  2150. </Trigger>
  2151. <MultiTrigger>
  2152. <MultiTrigger.Conditions>
  2153. <Condition Property="IsChecked" Value="false" />
  2154. <Condition Property="IsMouseOver" Value="True" />
  2155. </MultiTrigger.Conditions>
  2156. <MultiTrigger.Setters>
  2157. <Setter TargetName="border2" Property="Background">
  2158. <Setter.Value>
  2159. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/leftImageSub.png" />
  2160. </Setter.Value>
  2161. </Setter>
  2162. </MultiTrigger.Setters>
  2163. </MultiTrigger>
  2164. </ControlTemplate.Triggers>
  2165. </ControlTemplate>
  2166. </Setter.Value>
  2167. </Setter>
  2168. </Style>
  2169. <!--#endregion-->
  2170. <!--#region ContextMenu-->
  2171. <!-- 自定义ContextMenu的外观样式 -->
  2172. <Style TargetType="{x:Type ContextMenu}">
  2173. <Setter Property="SnapsToDevicePixels" Value="True" />
  2174. <Setter Property="OverridesDefaultStyle" Value="True" />
  2175. <Setter Property="Grid.IsSharedSizeScope" Value="True" />
  2176. <Setter Property="Focusable" Value="False" />
  2177. <Setter Property="HasDropShadow" Value="True" />
  2178. <Setter Property="Template">
  2179. <Setter.Value>
  2180. <ControlTemplate TargetType="{x:Type ContextMenu}">
  2181. <Border
  2182. Name="Border"
  2183. Background="#6EA0B0"
  2184. BorderBrush="#888888"
  2185. BorderThickness="1">
  2186. <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
  2187. </Border>
  2188. <ControlTemplate.Triggers>
  2189. <Trigger Property="HasDropShadow" Value="true">
  2190. <Setter TargetName="Border" Property="Padding" Value="0,3,0,3" />
  2191. <Setter TargetName="Border" Property="CornerRadius" Value="4" />
  2192. </Trigger>
  2193. </ControlTemplate.Triggers>
  2194. </ControlTemplate>
  2195. </Setter.Value>
  2196. </Setter>
  2197. </Style>
  2198. <!-- 自定义菜单项之间的分隔符的样式 -->
  2199. <Style x:Key="{x:Static MenuItem.SeparatorStyleKey}" TargetType="{x:Type Separator}">
  2200. <Setter Property="Height" Value="1" />
  2201. <Setter Property="Margin" Value="0,4,0,4" />
  2202. <Setter Property="Template">
  2203. <Setter.Value>
  2204. <ControlTemplate TargetType="{x:Type Separator}">
  2205. <Border>
  2206. <Border.Background>
  2207. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/顶部线条.png" />
  2208. </Border.Background>
  2209. </Border>
  2210. </ControlTemplate>
  2211. </Setter.Value>
  2212. </Setter>
  2213. </Style>
  2214. <Style x:Key="Separator1" TargetType="{x:Type Separator}">
  2215. <Setter Property="Height" Value="1" />
  2216. <Setter Property="Margin" Value="0,4,0,4" />
  2217. <Setter Property="Template">
  2218. <Setter.Value>
  2219. <ControlTemplate TargetType="{x:Type Separator}">
  2220. <Border>
  2221. <Border.Background>
  2222. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/顶部线条.png" />
  2223. </Border.Background>
  2224. </Border>
  2225. </ControlTemplate>
  2226. </Setter.Value>
  2227. </Setter>
  2228. </Style>
  2229. <!-- TopLevelHeader -->
  2230. <ControlTemplate x:Key="{x:Static MenuItem.TopLevelHeaderTemplateKey}" TargetType="{x:Type MenuItem}">
  2231. <Border Name="Border" Cursor="Hand">
  2232. <Grid Margin="30,10,30,5">
  2233. <ContentPresenter
  2234. HorizontalAlignment="Center"
  2235. VerticalAlignment="Center"
  2236. ContentSource="Header"
  2237. RecognizesAccessKey="True" />
  2238. <Popup
  2239. Name="Popup"
  2240. AllowsTransparency="True"
  2241. Focusable="False"
  2242. HorizontalOffset="-30"
  2243. IsOpen="{TemplateBinding IsSubmenuOpen}"
  2244. Placement="Bottom"
  2245. PopupAnimation="Slide"
  2246. VerticalOffset="10">
  2247. <Border
  2248. Name="SubmenuBorder"
  2249. Background="#7F0E4E8D"
  2250. BorderBrush="Transparent"
  2251. BorderThickness="1"
  2252. SnapsToDevicePixels="True">
  2253. <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
  2254. </Border>
  2255. </Popup>
  2256. </Grid>
  2257. </Border>
  2258. <ControlTemplate.Triggers>
  2259. <Trigger Property="IsSuspendingPopupAnimation" Value="true">
  2260. <Setter TargetName="Popup" Property="PopupAnimation" Value="None" />
  2261. </Trigger>
  2262. <Trigger Property="IsHighlighted" Value="true">
  2263. <Setter TargetName="Border" Property="Background">
  2264. <Setter.Value>
  2265. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
  2266. </Setter.Value>
  2267. </Setter>
  2268. <Setter Property="Foreground" Value="#8f723c" />
  2269. <Setter TargetName="Border" Property="BorderBrush" Value="Transparent" />
  2270. <Setter TargetName="SubmenuBorder" Property="Background">
  2271. <Setter.Value>
  2272. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png" />
  2273. </Setter.Value>
  2274. </Setter>
  2275. </Trigger>
  2276. <Trigger Property="IsHighlighted" Value="false">
  2277. <Setter TargetName="Border" Property="Background">
  2278. <Setter.Value>
  2279. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
  2280. </Setter.Value>
  2281. </Setter>
  2282. <Setter Property="Foreground" Value="White" />
  2283. <Setter TargetName="Border" Property="BorderBrush" Value="Transparent" />
  2284. <Setter TargetName="SubmenuBorder" Property="Background">
  2285. <Setter.Value>
  2286. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png" />
  2287. </Setter.Value>
  2288. </Setter>
  2289. </Trigger>
  2290. <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="True">
  2291. <Setter TargetName="SubmenuBorder" Property="CornerRadius" Value="0" />
  2292. <Setter TargetName="SubmenuBorder" Property="Padding" Value="5" />
  2293. </Trigger>
  2294. <Trigger Property="IsEnabled" Value="False">
  2295. <Setter Property="Foreground" Value="#ffffffff" />
  2296. </Trigger>
  2297. </ControlTemplate.Triggers>
  2298. </ControlTemplate>
  2299. <!-- TopLevelItem -->
  2300. <ControlTemplate x:Key="{x:Static MenuItem.TopLevelItemTemplateKey}" TargetType="{x:Type MenuItem}">
  2301. <Border Name="Border" Margin="30,0,0,0">
  2302. <Grid>
  2303. <ContentPresenter
  2304. HorizontalAlignment="Center"
  2305. VerticalAlignment="Center"
  2306. ContentSource="Header"
  2307. RecognizesAccessKey="True" />
  2308. </Grid>
  2309. </Border>
  2310. <ControlTemplate.Triggers>
  2311. <Trigger Property="IsHighlighted" Value="true">
  2312. <Setter TargetName="Border" Property="Background">
  2313. <Setter.Value>
  2314. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/leftImage.png" />
  2315. </Setter.Value>
  2316. </Setter>
  2317. <Setter TargetName="Border" Property="BorderBrush" Value="Transparent" />
  2318. </Trigger>
  2319. <Trigger Property="IsEnabled" Value="False">
  2320. <Setter Property="Foreground" Value="#ffffffff" />
  2321. </Trigger>
  2322. </ControlTemplate.Triggers>
  2323. </ControlTemplate>
  2324. <!-- SubmenuItem 自定义菜单项的外观样式 -->
  2325. <ControlTemplate x:Key="{x:Static MenuItem.SubmenuItemTemplateKey}" TargetType="{x:Type MenuItem}">
  2326. <Border
  2327. Name="Border"
  2328. Margin="5"
  2329. Cursor="Hand">
  2330. <Grid Margin="5">
  2331. <Grid.ColumnDefinitions>
  2332. <ColumnDefinition Width="Auto" SharedSizeGroup="Icon" />
  2333. <ColumnDefinition Width="*" />
  2334. <ColumnDefinition Width="Auto" SharedSizeGroup="Shortcut" />
  2335. <ColumnDefinition Width="13" />
  2336. </Grid.ColumnDefinitions>
  2337. <ContentPresenter
  2338. Name="Icon"
  2339. Margin="6,2,6,2"
  2340. HorizontalAlignment="Stretch"
  2341. VerticalAlignment="Stretch"
  2342. ContentSource="Icon" />
  2343. <Border
  2344. Name="Check"
  2345. Width="13"
  2346. Height="13"
  2347. Margin="6,0,6,0"
  2348. Background="#331068A3"
  2349. BorderBrush="#331068A3"
  2350. BorderThickness="1"
  2351. Visibility="Hidden">
  2352. <Path
  2353. Name="CheckMark"
  2354. Width="7"
  2355. Height="7"
  2356. Data="M 0 0 L 7 7 M 0 7 L 7 0"
  2357. SnapsToDevicePixels="False"
  2358. Stroke="#331068A3"
  2359. StrokeThickness="1"
  2360. Visibility="Visible" />
  2361. </Border>
  2362. <ContentPresenter
  2363. Name="HeaderHost"
  2364. Grid.Column="1"
  2365. ContentSource="Header"
  2366. RecognizesAccessKey="True" />
  2367. <TextBlock
  2368. x:Name="InputGestureText"
  2369. Grid.Column="2"
  2370. Margin="5,2,0,-5"
  2371. HorizontalAlignment="Center"
  2372. VerticalAlignment="Bottom"
  2373. Background="Transparent"
  2374. Cursor="Hand"
  2375. DockPanel.Dock="Right"
  2376. Text="{TemplateBinding InputGestureText}" />
  2377. </Grid>
  2378. </Border>
  2379. <ControlTemplate.Triggers>
  2380. <Trigger Property="Icon" Value="{x:Null}">
  2381. <Setter TargetName="Icon" Property="Visibility" Value="Hidden" />
  2382. </Trigger>
  2383. <Trigger Property="IsChecked" Value="true">
  2384. <Setter TargetName="CheckMark" Property="Visibility" Value="Visible" />
  2385. </Trigger>
  2386. <Trigger Property="IsCheckable" Value="true">
  2387. <Setter TargetName="Check" Property="Visibility" Value="Hidden" />
  2388. <Setter TargetName="Icon" Property="Visibility" Value="Hidden" />
  2389. </Trigger>
  2390. <!-- 选中菜单项时的高亮颜色的trigger设置 -->
  2391. <Trigger Property="IsHighlighted" Value="true">
  2392. <Setter TargetName="Border" Property="Background">
  2393. <Setter.Value>
  2394. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
  2395. </Setter.Value>
  2396. </Setter>
  2397. <Setter Property="Foreground" Value="#8f723c" />
  2398. </Trigger>
  2399. <Trigger Property="IsHighlighted" Value="false">
  2400. <Setter TargetName="Border" Property="Background">
  2401. <Setter.Value>
  2402. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
  2403. </Setter.Value>
  2404. </Setter>
  2405. <Setter Property="Foreground" Value="White" />
  2406. </Trigger>
  2407. <!--<Trigger Property="IsEnabled" Value="false">
  2408. <Setter Property="Foreground" Value="Yellow"/>
  2409. </Trigger>-->
  2410. </ControlTemplate.Triggers>
  2411. </ControlTemplate>
  2412. <!-- SubmenuHeader -->
  2413. <ControlTemplate x:Key="{x:Static MenuItem.SubmenuHeaderTemplateKey}" TargetType="{x:Type MenuItem}">
  2414. <Border Name="Border">
  2415. <Grid>
  2416. <Grid.ColumnDefinitions>
  2417. <ColumnDefinition Width="Auto" SharedSizeGroup="Icon" />
  2418. <ColumnDefinition Width="*" />
  2419. <ColumnDefinition Width="Auto" SharedSizeGroup="Shortcut" />
  2420. <ColumnDefinition Width="13" />
  2421. </Grid.ColumnDefinitions>
  2422. <ContentPresenter
  2423. Name="Icon"
  2424. Margin="6,0,6,0"
  2425. HorizontalAlignment="Stretch"
  2426. VerticalAlignment="Stretch"
  2427. ContentSource="Icon" />
  2428. <ContentPresenter
  2429. Name="HeaderHost"
  2430. Grid.Column="1"
  2431. ContentSource="Header"
  2432. RecognizesAccessKey="True" />
  2433. <TextBlock
  2434. x:Name="InputGestureText"
  2435. Grid.Column="2"
  2436. Margin="5,2,2,2"
  2437. DockPanel.Dock="Right"
  2438. Text="{TemplateBinding InputGestureText}" />
  2439. <Path
  2440. Grid.Column="3"
  2441. HorizontalAlignment="Center"
  2442. VerticalAlignment="Center"
  2443. Data="M 0 0 L 0 7 L 4 3.5 Z"
  2444. Fill="#331068A3" />
  2445. <Popup
  2446. Name="Popup"
  2447. AllowsTransparency="True"
  2448. Focusable="False"
  2449. HorizontalOffset="-4"
  2450. IsOpen="{TemplateBinding IsSubmenuOpen}"
  2451. Placement="Left"
  2452. PopupAnimation="Slide">
  2453. <Border
  2454. Name="SubmenuBorder"
  2455. BorderBrush="Transparent"
  2456. BorderThickness="1"
  2457. SnapsToDevicePixels="True">
  2458. <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
  2459. </Border>
  2460. </Popup>
  2461. </Grid>
  2462. </Border>
  2463. <ControlTemplate.Triggers>
  2464. <Trigger Property="Icon" Value="{x:Null}">
  2465. <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
  2466. </Trigger>
  2467. <Trigger Property="IsHighlighted" Value="true">
  2468. <Setter TargetName="Border" Property="Background">
  2469. <Setter.Value>
  2470. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_No.png" />
  2471. </Setter.Value>
  2472. </Setter>
  2473. </Trigger>
  2474. <Trigger Property="IsHighlighted" Value="false">
  2475. <Setter TargetName="Border" Property="Background">
  2476. <Setter.Value>
  2477. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/Tab/Tab4_Select.png" />
  2478. </Setter.Value>
  2479. </Setter>
  2480. </Trigger>
  2481. <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="True">
  2482. <Setter TargetName="SubmenuBorder" Property="CornerRadius" Value="4" />
  2483. <Setter TargetName="SubmenuBorder" Property="Padding" Value="0,3,0,3" />
  2484. </Trigger>
  2485. <Trigger Property="IsEnabled" Value="false">
  2486. <Setter Property="Foreground" Value="#ffffffff" />
  2487. </Trigger>
  2488. </ControlTemplate.Triggers>
  2489. </ControlTemplate>
  2490. <!-- MenuItem Style -->
  2491. <Style x:Key="{x:Type MenuItem}" TargetType="{x:Type MenuItem}">
  2492. <Setter Property="OverridesDefaultStyle" Value="True" />
  2493. <Style.Triggers>
  2494. <Trigger Property="Role" Value="TopLevelHeader">
  2495. <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.TopLevelHeaderTemplateKey}}" />
  2496. <Setter Property="Grid.IsSharedSizeScope" Value="true" />
  2497. </Trigger>
  2498. <Trigger Property="Role" Value="TopLevelItem">
  2499. <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.TopLevelItemTemplateKey}}" />
  2500. </Trigger>
  2501. <!--<Trigger Property="Role" Value="SubmenuHeader">
  2502. <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.SubmenuHeaderTemplateKey}}"/>
  2503. </Trigger>-->
  2504. <Trigger Property="Role" Value="SubmenuItem">
  2505. <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.SubmenuItemTemplateKey}}" />
  2506. </Trigger>
  2507. </Style.Triggers>
  2508. </Style>
  2509. <!--#endregion-->
  2510. <!--#region RadioButton-->
  2511. <Style x:Key="CheckRadioFocusVisual">
  2512. <Setter Property="Control.Template">
  2513. <Setter.Value>
  2514. <ControlTemplate>
  2515. <Rectangle
  2516. Margin="14,0,0,0"
  2517. SnapsToDevicePixels="true"
  2518. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  2519. StrokeDashArray="1 2"
  2520. StrokeThickness="1" />
  2521. </ControlTemplate>
  2522. </Setter.Value>
  2523. </Setter>
  2524. </Style>
  2525. <Style TargetType="{x:Type RadioButton}">
  2526. <Setter Property="FocusVisualStyle" Value="{StaticResource CheckRadioFocusVisual}" />
  2527. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  2528. <Setter Property="VerticalContentAlignment" Value="Center" />
  2529. <Setter Property="Background">
  2530. <Setter.Value>
  2531. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/btn_normal.png" />
  2532. </Setter.Value>
  2533. </Setter>
  2534. <Setter Property="Padding" Value="2,0,0,0" />
  2535. <Setter Property="Template">
  2536. <Setter.Value>
  2537. <ControlTemplate TargetType="{x:Type RadioButton}">
  2538. <BulletDecorator VerticalAlignment="Center" Background="Transparent">
  2539. <BulletDecorator.Bullet>
  2540. <Grid>
  2541. <Ellipse
  2542. x:Name="Border"
  2543. Width="10"
  2544. Height="10"
  2545. Fill="{TemplateBinding Background}" />
  2546. <Ellipse
  2547. x:Name="Dot"
  2548. Width="5"
  2549. Height="5"
  2550. Fill="#ff8a03"
  2551. Visibility="Hidden" />
  2552. </Grid>
  2553. </BulletDecorator.Bullet>
  2554. <ContentPresenter
  2555. Margin="{TemplateBinding Padding}"
  2556. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  2557. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  2558. RecognizesAccessKey="True" />
  2559. </BulletDecorator>
  2560. <ControlTemplate.Triggers>
  2561. <Trigger Property="IsChecked" Value="true">
  2562. <Setter TargetName="Dot" Property="Visibility" Value="Visible" />
  2563. </Trigger>
  2564. <Trigger Property="IsChecked" Value="False">
  2565. <Setter TargetName="Dot" Property="Visibility" Value="Collapsed" />
  2566. </Trigger>
  2567. <Trigger Property="IsChecked" Value="{x:Null}">
  2568. <Setter TargetName="Dot" Property="Visibility" Value="Collapsed" />
  2569. </Trigger>
  2570. <Trigger Property="IsPressed" Value="true">
  2571. <Setter TargetName="Border" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  2572. </Trigger>
  2573. <Trigger Property="IsEnabled" Value="false">
  2574. <Setter TargetName="Border" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  2575. <Setter TargetName="Dot" Property="Fill" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  2576. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  2577. </Trigger>
  2578. </ControlTemplate.Triggers>
  2579. </ControlTemplate>
  2580. </Setter.Value>
  2581. </Setter>
  2582. </Style>
  2583. <!--#endregion-->
  2584. <!--#region CheckBox-->
  2585. <Style TargetType="{x:Type CheckBox}">
  2586. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  2587. <Setter Property="Background" Value="#FFF4F4F4" />
  2588. <Setter Property="BorderBrush" Value="#FF8E8F8F" />
  2589. <Setter Property="BorderThickness" Value="1" />
  2590. <Setter Property="VerticalContentAlignment" Value="Center" />
  2591. <Setter Property="FocusVisualStyle">
  2592. <Setter.Value>
  2593. <Style>
  2594. <Setter Property="Control.Template">
  2595. <Setter.Value>
  2596. <ControlTemplate>
  2597. <Rectangle
  2598. Margin="1"
  2599. SnapsToDevicePixels="True"
  2600. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  2601. StrokeDashArray="1 2"
  2602. StrokeThickness="1" />
  2603. </ControlTemplate>
  2604. </Setter.Value>
  2605. </Setter>
  2606. </Style>
  2607. </Setter.Value>
  2608. </Setter>
  2609. <Setter Property="Template">
  2610. <Setter.Value>
  2611. <ControlTemplate TargetType="{x:Type CheckBox}">
  2612. <StackPanel
  2613. Background="Transparent"
  2614. Orientation="Horizontal"
  2615. SnapsToDevicePixels="True">
  2616. <Grid>
  2617. <Image
  2618. Width="12"
  2619. Height="14"
  2620. Source="/BPASmartClient.CustomResource;component/Image/Cb_HalfChecked.png" />
  2621. <Image
  2622. x:Name="image1"
  2623. Width="12"
  2624. Height="14"
  2625. Source="/BPASmartClient.CustomResource;component/Image/Cb_HalfChecked.png" />
  2626. </Grid>
  2627. <ContentPresenter
  2628. Margin="{TemplateBinding Padding}"
  2629. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  2630. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  2631. Content="{TemplateBinding Content}"
  2632. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  2633. RecognizesAccessKey="True"
  2634. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  2635. </StackPanel>
  2636. <ControlTemplate.Triggers>
  2637. <Trigger Property="HasContent" Value="True">
  2638. <Setter Property="FocusVisualStyle">
  2639. <Setter.Value>
  2640. <Style>
  2641. <Setter Property="Control.Template">
  2642. <Setter.Value>
  2643. <ControlTemplate>
  2644. <Rectangle
  2645. Margin="14,0,0,0"
  2646. SnapsToDevicePixels="True"
  2647. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  2648. StrokeDashArray="1 2"
  2649. StrokeThickness="1" />
  2650. </ControlTemplate>
  2651. </Setter.Value>
  2652. </Setter>
  2653. </Style>
  2654. </Setter.Value>
  2655. </Setter>
  2656. <Setter Property="Padding" Value="4,0,0,0" />
  2657. </Trigger>
  2658. <Trigger Property="IsEnabled" Value="False">
  2659. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  2660. </Trigger>
  2661. <Trigger Property="IsChecked" Value="true">
  2662. <Setter TargetName="image1" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/Cb_Checked.png" />
  2663. </Trigger>
  2664. <Trigger Property="IsChecked" Value="{x:Null}">
  2665. <Setter TargetName="image1" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/Cb_HalfChecked.png" />
  2666. </Trigger>
  2667. </ControlTemplate.Triggers>
  2668. </ControlTemplate>
  2669. </Setter.Value>
  2670. </Setter>
  2671. </Style>
  2672. <!--#endregion-->
  2673. <!--#region TextBox-->
  2674. <Style TargetType="{x:Type TextBox}">
  2675. <Setter Property="BorderBrush" Value="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" />
  2676. <Setter Property="BorderThickness" Value="1" />
  2677. <Setter Property="Padding" Value="0" />
  2678. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  2679. <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
  2680. <Setter Property="VerticalContentAlignment" Value="Center" />
  2681. <Setter Property="Height" Value="24" />
  2682. <Setter Property="CaretBrush" Value="White" />
  2683. <Setter Property="Padding" Value="0" />
  2684. <Setter Property="HorizontalContentAlignment" Value="Left" />
  2685. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  2686. <Setter Property="AllowDrop" Value="true" />
  2687. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  2688. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  2689. <Setter Property="Template">
  2690. <Setter.Value>
  2691. <ControlTemplate TargetType="{x:Type TextBox}">
  2692. <Themes1:ClassicBorderDecorator
  2693. x:Name="Bd"
  2694. BorderBrush="#08335f"
  2695. BorderStyle="None"
  2696. BorderThickness="1">
  2697. <ScrollViewer x:Name="PART_ContentHost" />
  2698. </Themes1:ClassicBorderDecorator>
  2699. <ControlTemplate.Triggers>
  2700. <Trigger Property="IsEnabled" Value="false">
  2701. <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  2702. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  2703. </Trigger>
  2704. </ControlTemplate.Triggers>
  2705. </ControlTemplate>
  2706. </Setter.Value>
  2707. </Setter>
  2708. <Style.Triggers>
  2709. <MultiTrigger>
  2710. <MultiTrigger.Conditions>
  2711. <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
  2712. <Condition Property="IsSelectionActive" Value="false" />
  2713. </MultiTrigger.Conditions>
  2714. <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
  2715. </MultiTrigger>
  2716. </Style.Triggers>
  2717. </Style>
  2718. <!--#endregion-->
  2719. <!--#region ComboBox-->
  2720. <Style x:Key="ComboBoxFocusVisual">
  2721. <Setter Property="Control.Template">
  2722. <Setter.Value>
  2723. <ControlTemplate>
  2724. <Rectangle
  2725. Margin="4,4,21,4"
  2726. SnapsToDevicePixels="true"
  2727. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  2728. StrokeDashArray="1 2"
  2729. StrokeThickness="1" />
  2730. </ControlTemplate>
  2731. </Setter.Value>
  2732. </Setter>
  2733. </Style>
  2734. <Geometry x:Key="DownArrowGeometry">M 0 0 L 3.5 4 L 7 0 Z</Geometry>
  2735. <Style x:Key="ComboBoxTransparentButtonStyle" TargetType="{x:Type ToggleButton}">
  2736. <Setter Property="MinWidth" Value="0" />
  2737. <Setter Property="MinHeight" Value="0" />
  2738. <Setter Property="Width" Value="Auto" />
  2739. <Setter Property="Height" Value="Auto" />
  2740. <Setter Property="Background" Value="Transparent" />
  2741. <Setter Property="Foreground" Value="White" />
  2742. <Setter Property="BorderBrush" Value="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" />
  2743. <Setter Property="BorderThickness" Value="2" />
  2744. <Setter Property="Template">
  2745. <Setter.Value>
  2746. <ControlTemplate TargetType="{x:Type ToggleButton}">
  2747. <DockPanel
  2748. Background="{TemplateBinding Background}"
  2749. LastChildFill="false"
  2750. SnapsToDevicePixels="true">
  2751. <Themes1:ClassicBorderDecorator
  2752. x:Name="Border"
  2753. Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
  2754. BorderBrush="{TemplateBinding BorderBrush}"
  2755. BorderStyle="None"
  2756. BorderThickness="{TemplateBinding BorderThickness}"
  2757. DockPanel.Dock="Right">
  2758. <Path
  2759. HorizontalAlignment="Center"
  2760. VerticalAlignment="Center"
  2761. Data="{StaticResource DownArrowGeometry}"
  2762. Fill="{TemplateBinding Foreground}" />
  2763. </Themes1:ClassicBorderDecorator>
  2764. </DockPanel>
  2765. <ControlTemplate.Triggers>
  2766. <Trigger Property="IsChecked" Value="true">
  2767. <Setter TargetName="Border" Property="BorderStyle" Value="AltPressed" />
  2768. </Trigger>
  2769. </ControlTemplate.Triggers>
  2770. </ControlTemplate>
  2771. </Setter.Value>
  2772. </Setter>
  2773. <Style.Triggers>
  2774. <Trigger Property="IsEnabled" Value="false">
  2775. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" />
  2776. </Trigger>
  2777. </Style.Triggers>
  2778. </Style>
  2779. <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
  2780. <Setter Property="OverridesDefaultStyle" Value="true" />
  2781. <Setter Property="AllowDrop" Value="true" />
  2782. <Setter Property="MinWidth" Value="0" />
  2783. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  2784. <Setter Property="MinHeight" Value="0" />
  2785. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  2786. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  2787. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  2788. <Setter Property="Template">
  2789. <Setter.Value>
  2790. <ControlTemplate TargetType="{x:Type TextBox}">
  2791. <ScrollViewer
  2792. x:Name="PART_ContentHost"
  2793. Background="Transparent"
  2794. Focusable="false"
  2795. HorizontalScrollBarVisibility="Hidden"
  2796. VerticalScrollBarVisibility="Hidden" />
  2797. </ControlTemplate>
  2798. </Setter.Value>
  2799. </Setter>
  2800. </Style>
  2801. <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
  2802. <Border
  2803. Background="{TemplateBinding Background}"
  2804. BorderBrush="{TemplateBinding BorderBrush}"
  2805. BorderThickness="{TemplateBinding BorderThickness}"
  2806. SnapsToDevicePixels="true">
  2807. <Grid>
  2808. <Themes1:ClassicBorderDecorator
  2809. x:Name="Border"
  2810. BorderBrush="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}"
  2811. BorderStyle="None"
  2812. BorderThickness="2">
  2813. <Popup
  2814. x:Name="PART_Popup"
  2815. AllowsTransparency="true"
  2816. Focusable="False"
  2817. IsOpen="{TemplateBinding IsDropDownOpen}"
  2818. Placement="Bottom"
  2819. PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
  2820. <Themes1:SystemDropShadowChrome
  2821. x:Name="Shdw"
  2822. MinWidth="{Binding ActualWidth, ElementName=Border}"
  2823. MaxHeight="{TemplateBinding MaxDropDownHeight}"
  2824. Color="Transparent">
  2825. <Border
  2826. x:Name="DropDownBorder"
  2827. BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
  2828. BorderThickness="1">
  2829. <Border.Background>
  2830. <ImageBrush
  2831. ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png"
  2832. Opacity="0.5"
  2833. Stretch="Fill" />
  2834. </Border.Background>
  2835. <ScrollViewer x:Name="DropDownScrollViewer">
  2836. <Grid RenderOptions.ClearTypeHint="Enabled">
  2837. <Canvas
  2838. Width="0"
  2839. Height="0"
  2840. HorizontalAlignment="Left"
  2841. VerticalAlignment="Top">
  2842. <Rectangle
  2843. x:Name="OpaqueRect"
  2844. Width="{Binding ActualWidth, ElementName=DropDownBorder}"
  2845. Height="{Binding ActualHeight, ElementName=DropDownBorder}"
  2846. Fill="{Binding Background, ElementName=DropDownBorder}" />
  2847. </Canvas>
  2848. <ItemsPresenter
  2849. x:Name="ItemsPresenter"
  2850. KeyboardNavigation.DirectionalNavigation="Contained"
  2851. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  2852. </Grid>
  2853. </ScrollViewer>
  2854. </Border>
  2855. </Themes1:SystemDropShadowChrome>
  2856. </Popup>
  2857. </Themes1:ClassicBorderDecorator>
  2858. <ToggleButton
  2859. Width="Auto"
  2860. MinWidth="0"
  2861. MinHeight="0"
  2862. ClickMode="Press"
  2863. Focusable="false"
  2864. IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  2865. Style="{StaticResource ComboBoxTransparentButtonStyle}" />
  2866. <DockPanel>
  2867. <FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right" />
  2868. <TextBox
  2869. x:Name="PART_EditableTextBox"
  2870. Margin="{TemplateBinding Padding}"
  2871. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  2872. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  2873. IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
  2874. Style="{StaticResource ComboBoxEditableTextBox}" />
  2875. </DockPanel>
  2876. </Grid>
  2877. </Border>
  2878. <ControlTemplate.Triggers>
  2879. <Trigger Property="HasItems" Value="false">
  2880. <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
  2881. </Trigger>
  2882. <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
  2883. <Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
  2884. <Setter TargetName="Shdw" Property="Color" Value="#71000000" />
  2885. </Trigger>
  2886. <Trigger Property="IsEnabled" Value="false">
  2887. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  2888. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  2889. </Trigger>
  2890. <MultiTrigger>
  2891. <MultiTrigger.Conditions>
  2892. <Condition Property="IsGrouping" Value="true" />
  2893. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
  2894. </MultiTrigger.Conditions>
  2895. <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
  2896. </MultiTrigger>
  2897. <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
  2898. <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
  2899. <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
  2900. </Trigger>
  2901. </ControlTemplate.Triggers>
  2902. </ControlTemplate>
  2903. <Style x:Key="BaseComboBoxStyle" TargetType="{x:Type ComboBox}">
  2904. <Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}" />
  2905. <Setter Property="Foreground" Value="White" />
  2906. <Setter Property="Background" Value="Transparent" />
  2907. <Setter Property="BorderBrush" Value="#08335f" />
  2908. <Setter Property="BorderThickness" Value="1" />
  2909. <Setter Property="Margin" Value="0,0,0,0" />
  2910. <Setter Property="Padding" Value="0" />
  2911. <Setter Property="Height" Value="24" />
  2912. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
  2913. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
  2914. <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
  2915. <Setter Property="ScrollViewer.PanningMode" Value="Both" />
  2916. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  2917. <Setter Property="VerticalContentAlignment" Value="Center" />
  2918. <Setter Property="IsTextSearchCaseSensitive" Value="true" />
  2919. <Setter Property="IsEditable" Value="true" />
  2920. <Setter Property="StaysOpenOnEdit" Value="true" />
  2921. <Setter Property="Template">
  2922. <Setter.Value>
  2923. <ControlTemplate TargetType="{x:Type ComboBox}">
  2924. <Border
  2925. Background="{TemplateBinding Background}"
  2926. BorderBrush="{TemplateBinding BorderBrush}"
  2927. BorderThickness="{TemplateBinding BorderThickness}"
  2928. SnapsToDevicePixels="true">
  2929. <Grid>
  2930. <Themes1:ClassicBorderDecorator
  2931. x:Name="Border"
  2932. BorderBrush="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}"
  2933. BorderStyle="None"
  2934. BorderThickness="2">
  2935. <Popup
  2936. x:Name="PART_Popup"
  2937. AllowsTransparency="true"
  2938. Focusable="False"
  2939. IsOpen="{TemplateBinding IsDropDownOpen}"
  2940. Placement="Bottom"
  2941. PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
  2942. <Themes1:SystemDropShadowChrome
  2943. x:Name="Shdw"
  2944. MinWidth="{Binding ActualWidth, ElementName=Border}"
  2945. MaxHeight="{TemplateBinding MaxDropDownHeight}"
  2946. Color="Transparent">
  2947. <Border
  2948. x:Name="DropDownBorder"
  2949. BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
  2950. BorderThickness="1">
  2951. <Border.Background>
  2952. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png" />
  2953. </Border.Background>
  2954. <ScrollViewer x:Name="DropDownScrollViewer">
  2955. <Grid RenderOptions.ClearTypeHint="Enabled">
  2956. <Canvas
  2957. Width="0"
  2958. Height="0"
  2959. HorizontalAlignment="Left"
  2960. VerticalAlignment="Top">
  2961. <Rectangle
  2962. x:Name="OpaqueRect"
  2963. Width="{Binding ActualWidth, ElementName=DropDownBorder}"
  2964. Height="{Binding ActualHeight, ElementName=DropDownBorder}"
  2965. Fill="{Binding Background, ElementName=DropDownBorder}" />
  2966. </Canvas>
  2967. <ItemsPresenter
  2968. x:Name="ItemsPresenter"
  2969. KeyboardNavigation.DirectionalNavigation="Contained"
  2970. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  2971. </Grid>
  2972. </ScrollViewer>
  2973. </Border>
  2974. </Themes1:SystemDropShadowChrome>
  2975. </Popup>
  2976. </Themes1:ClassicBorderDecorator>
  2977. <DockPanel Margin="2">
  2978. <FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right" />
  2979. <Border x:Name="SelectedItemBorder" Margin="{TemplateBinding Padding}">
  2980. <ContentPresenter
  2981. Margin="1,1,1,1"
  2982. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  2983. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  2984. Content="{TemplateBinding SelectionBoxItem}"
  2985. ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
  2986. ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
  2987. ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
  2988. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  2989. </Border>
  2990. </DockPanel>
  2991. <ToggleButton
  2992. Width="Auto"
  2993. MinWidth="0"
  2994. MinHeight="0"
  2995. Margin="2"
  2996. ClickMode="Press"
  2997. Focusable="false"
  2998. IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  2999. Style="{StaticResource ComboBoxTransparentButtonStyle}" />
  3000. </Grid>
  3001. </Border>
  3002. <ControlTemplate.Triggers>
  3003. <MultiTrigger>
  3004. <MultiTrigger.Conditions>
  3005. <!--<Condition Property="IsSelectionBoxHighlighted" Value="true"/>-->
  3006. <Condition Property="IsDropDownOpen" Value="false" />
  3007. </MultiTrigger.Conditions>
  3008. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
  3009. </MultiTrigger>
  3010. <!--<Trigger Property="IsSelectionBoxHighlighted" Value="true">
  3011. <Setter Property="Background" TargetName="SelectedItemBorder" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
  3012. </Trigger>-->
  3013. <Trigger Property="HasItems" Value="false">
  3014. <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
  3015. </Trigger>
  3016. <Trigger Property="IsEnabled" Value="false">
  3017. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  3018. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  3019. </Trigger>
  3020. <MultiTrigger>
  3021. <MultiTrigger.Conditions>
  3022. <Condition Property="IsGrouping" Value="true" />
  3023. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
  3024. </MultiTrigger.Conditions>
  3025. <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
  3026. </MultiTrigger>
  3027. <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
  3028. <Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
  3029. <Setter TargetName="Shdw" Property="Color" Value="#71000000" />
  3030. </Trigger>
  3031. <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
  3032. <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
  3033. <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
  3034. </Trigger>
  3035. </ControlTemplate.Triggers>
  3036. </ControlTemplate>
  3037. </Setter.Value>
  3038. </Setter>
  3039. <Style.Triggers>
  3040. <Trigger Property="IsEditable" Value="true">
  3041. <Setter Property="IsTabStop" Value="false" />
  3042. <Setter Property="Padding" Value="1" />
  3043. <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
  3044. </Trigger>
  3045. </Style.Triggers>
  3046. </Style>
  3047. <Style BasedOn="{StaticResource BaseComboBoxStyle}" TargetType="ComboBox" />
  3048. <!--#endregion-->
  3049. <!--#region ColorCommboxStyle-->
  3050. <ObjectDataProvider
  3051. x:Key="colorPropertieOdp"
  3052. MethodName="GetProperties"
  3053. ObjectInstance="{x:Type Colors}" />
  3054. <Style
  3055. x:Key="ColorCommboxStyle"
  3056. BasedOn="{StaticResource BaseComboBoxStyle}"
  3057. TargetType="ComboBox">
  3058. <Setter Property="IsTextSearchCaseSensitive" Value="False" />
  3059. <Setter Property="IsEditable" Value="False" />
  3060. <Setter Property="StaysOpenOnEdit" Value="False" />
  3061. <Setter Property="ItemsSource" Value="{Binding Source={StaticResource colorPropertieOdp}}" />
  3062. <Setter Property="ItemTemplate">
  3063. <Setter.Value>
  3064. <DataTemplate>
  3065. <StackPanel Orientation="Horizontal">
  3066. <Rectangle
  3067. Width="40"
  3068. Height="10"
  3069. Fill="{Binding Name}" />
  3070. <TextBlock Text="{Binding Name}" />
  3071. </StackPanel>
  3072. </DataTemplate>
  3073. </Setter.Value>
  3074. </Setter>
  3075. </Style>
  3076. <!--#endregion-->
  3077. </ResourceDictionary>