终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2010 lines
110 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:Themes1="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
  5. xmlns:con="clr-namespace:BPASmartClient.SCADAControl.Converters"
  6. xmlns:ctrl="clr-namespace:BPASmartClient.SCADAControl.CustomerControls"
  7. xmlns:input="clr-namespace:System.Windows.Input;assembly=PresentationCore">
  8. <SolidColorBrush x:Key="AccentBrush" Color="#2B79E2" />
  9. <SolidColorBrush x:Key="ControlBorderBrush" Color="LightGray" />
  10. <SolidColorBrush x:Key="ControlBackground" Color="White" />
  11. <SolidColorBrush x:Key="ControlForeground" Color="Black" />
  12. <SolidColorBrush x:Key="foreground" Color="#a2c2e8" />
  13. <SolidColorBrush x:Key="borderBrush" Color="#FF074B92" />
  14. <SolidColorBrush x:Key="Titleforeground" Color="#FF07D7FF" />
  15. <SolidColorBrush x:Key="DataGridColumnHeaderColor" Color="#00c2f4" />
  16. <SolidColorBrush x:Key="LabelColor" Color="#FF00EEF3" />
  17. <SolidColorBrush x:Key="MainTitleforeground" Color="#feffff" />
  18. <SolidColorBrush x:Key="ButtonSelectForeground" Color="#4fade8" />
  19. <SolidColorBrush x:Key="ButtonUnSelectForeground" Color="#3afdff" />
  20. <SolidColorBrush x:Key="MeunSelectForeground" Color="#8f723c" />
  21. <SolidColorBrush x:Key="MeunUnSelectForeground" Color="White" />
  22. <LinearGradientBrush x:Key="NormalBackground" StartPoint="0.5,0" EndPoint="0.5,1">
  23. <GradientStopCollection>
  24. <GradientStop Color="White" />
  25. <GradientStop Offset="0.5" Color="#D0D0D0" />
  26. <GradientStop Offset="1" Color="#E3E3E3" />
  27. </GradientStopCollection>
  28. </LinearGradientBrush>
  29. <con:HalfNumberConverter x:Key="HalfNumber" />
  30. <FontFamily x:Key="Digital">
  31. pack://application:,,,/Fonts/#DS-Digital
  32. </FontFamily>
  33. <Style TargetType="{x:Type ctrl:ArcGauge}">
  34. <Setter Property="Background" Value="#646464" />
  35. <Setter Property="Foreground" Value="Black" />
  36. <Setter Property="Template">
  37. <Setter.Value>
  38. <ControlTemplate TargetType="{x:Type ctrl:ArcGauge}">
  39. <Border Margin="10">
  40. <Grid Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}">
  41. <Ellipse Fill="#FF3B3B3B" />
  42. <Grid Margin="2" RenderTransformOrigin="0.5,0.5">
  43. <Grid.RenderTransform>
  44. <TransformGroup>
  45. <RotateTransform Angle="{Binding Path=Angle, ElementName=PointRotate}" />
  46. </TransformGroup>
  47. </Grid.RenderTransform>
  48. <Ellipse
  49. Width="16"
  50. Height="14"
  51. VerticalAlignment="Top"
  52. Fill="Orange">
  53. <Ellipse.Effect>
  54. <BlurEffect Radius="12" />
  55. </Ellipse.Effect>
  56. </Ellipse>
  57. </Grid>
  58. <Grid
  59. x:Name="bdGrid"
  60. Margin="12"
  61. ClipToBounds="True"
  62. UseLayoutRounding="True">
  63. <Ellipse>
  64. <Ellipse.Fill>
  65. <RadialGradientBrush>
  66. <GradientStop Color="#4D000000" />
  67. </RadialGradientBrush>
  68. </Ellipse.Fill>
  69. </Ellipse>
  70. <Grid>
  71. <Grid.ColumnDefinitions>
  72. <ColumnDefinition />
  73. <ColumnDefinition Width="2*" />
  74. <ColumnDefinition />
  75. </Grid.ColumnDefinitions>
  76. <Grid.RowDefinitions>
  77. <RowDefinition />
  78. <RowDefinition Height="2*" />
  79. <RowDefinition />
  80. </Grid.RowDefinitions>
  81. <Ellipse
  82. Grid.Row="1"
  83. Grid.Column="1"
  84. Stroke="#464646"
  85. StrokeThickness="1" />
  86. <Ellipse
  87. Grid.Row="1"
  88. Grid.Column="1"
  89. Margin="4"
  90. Stroke="#959595"
  91. StrokeThickness="6" />
  92. <Ellipse
  93. Grid.Row="1"
  94. Grid.Column="1"
  95. Margin="14"
  96. Stroke="#464646"
  97. StrokeThickness="1" />
  98. </Grid>
  99. <Grid>
  100. <Grid.RowDefinitions>
  101. <RowDefinition />
  102. <RowDefinition />
  103. </Grid.RowDefinitions>
  104. <Path
  105. Margin="0,30,0,0"
  106. HorizontalAlignment="Center"
  107. Data="M5,0 5,0 10,120 0,120z"
  108. Fill="#0FA9CE"
  109. RenderTransformOrigin="0.5,1"
  110. Stretch="Uniform">
  111. <Path.RenderTransform>
  112. <TransformGroup>
  113. <RotateTransform x:Name="PointRotate" />
  114. </TransformGroup>
  115. </Path.RenderTransform>
  116. </Path>
  117. </Grid>
  118. <Ellipse
  119. Width="28"
  120. Height="28"
  121. Fill="Black">
  122. <Ellipse.Effect>
  123. <DropShadowEffect
  124. BlurRadius="16"
  125. Direction="0"
  126. ShadowDepth="0"
  127. Color="#0FA9CE" />
  128. </Ellipse.Effect>
  129. </Ellipse>
  130. <Border
  131. Margin="0,0,0,12"
  132. Padding="4,2"
  133. HorizontalAlignment="Center"
  134. VerticalAlignment="Bottom"
  135. Background="Black"
  136. BorderBrush="#10ABD1"
  137. BorderThickness="2">
  138. <TextBlock
  139. Width="46"
  140. FontSize="16"
  141. Foreground="White"
  142. Text="{Binding Value, RelativeSource={RelativeSource Mode=TemplatedParent}, StringFormat={}{0:f1}}"
  143. TextAlignment="Center" />
  144. </Border>
  145. </Grid>
  146. </Grid>
  147. </Border>
  148. </ControlTemplate>
  149. </Setter.Value>
  150. </Setter>
  151. </Style>
  152. <Style TargetType="{x:Type ctrl:SwitchButton}">
  153. <Setter Property="Background" Value="#00F4D5" />
  154. <Setter Property="BorderBrush" Value="LightGray" />
  155. <Setter Property="Template">
  156. <Setter.Value>
  157. <ControlTemplate TargetType="ctrl:SwitchButton">
  158. <Border
  159. Background="{StaticResource ControlBackground}"
  160. BorderBrush="{TemplateBinding BorderBrush}"
  161. BorderThickness="1"
  162. CornerRadius="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ActualHeight, Converter={StaticResource HalfNumber}}">
  163. <Grid>
  164. <Ellipse
  165. x:Name="ELLIPSE"
  166. HorizontalAlignment="Left"
  167. VerticalAlignment="Center"
  168. Fill="Gray"
  169. RenderTransformOrigin="0.5,0.5"
  170. Stroke="{StaticResource ControlBorderBrush}"
  171. StrokeThickness="1">
  172. <Ellipse.RenderTransform>
  173. <TransformGroup>
  174. <TranslateTransform x:Name="TranslateX" X="2" />
  175. </TransformGroup>
  176. </Ellipse.RenderTransform>
  177. </Ellipse>
  178. </Grid>
  179. </Border>
  180. </ControlTemplate>
  181. </Setter.Value>
  182. </Setter>
  183. </Style>
  184. <Style TargetType="ctrl:DigitalNumber">
  185. <Setter Property="Background" Value="#FF1A1E22" />
  186. <Setter Property="Foreground" Value="#FF0AA74D" />
  187. <Setter Property="NumberValue" Value="0.01" />
  188. <Setter Property="FontSize" Value="20" />
  189. <Setter Property="Template">
  190. <Setter.Value>
  191. <ControlTemplate TargetType="ctrl:DigitalNumber">
  192. <Grid Background="{TemplateBinding Background}">
  193. <TextBlock
  194. x:Name="line"
  195. HorizontalAlignment="Center"
  196. VerticalAlignment="Center"
  197. FontFamily="{StaticResource Digital}"
  198. FontSize="{TemplateBinding FontSize}"
  199. Foreground="{TemplateBinding Foreground}"
  200. Text="{Binding NumberValue, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ctrl:DigitalNumber}, Mode=TwoWay}" />
  201. </Grid>
  202. </ControlTemplate>
  203. </Setter.Value>
  204. </Setter>
  205. </Style>
  206. <Style TargetType="{x:Type ctrl:KnobButton}">
  207. <Setter Property="Background" Value="#0068F4" />
  208. <Setter Property="BorderBrush" Value="LightGray" />
  209. <Setter Property="Foreground" Value="Black" />
  210. <Setter Property="FontSize" Value="20" />
  211. <Setter Property="Template">
  212. <Setter.Value>
  213. <ControlTemplate TargetType="ctrl:KnobButton">
  214. <Grid x:Name="bdGrid" Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}">
  215. <Grid Margin="16" RenderTransformOrigin="0.5,0.5">
  216. <Grid.RenderTransform>
  217. <RotateTransform x:Name="rotatevalue" Angle="00" />
  218. </Grid.RenderTransform>
  219. <Ellipse
  220. Margin="4"
  221. Fill="#FFF6F6F6"
  222. Stroke="{StaticResource ControlBorderBrush}">
  223. <Ellipse.Effect>
  224. <DropShadowEffect
  225. BlurRadius="8"
  226. Direction="-90"
  227. ShadowDepth="2"
  228. Color="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Background.(SolidColorBrush.Color)}" />
  229. </Ellipse.Effect>
  230. </Ellipse>
  231. <Ellipse
  232. Width="8"
  233. Height="8"
  234. Margin="12"
  235. VerticalAlignment="Bottom"
  236. Fill="{TemplateBinding Background}" />
  237. </Grid>
  238. <TextBlock
  239. HorizontalAlignment="Center"
  240. VerticalAlignment="Center"
  241. FontSize="{TemplateBinding FontSize}"
  242. Foreground="{TemplateBinding Foreground}"
  243. Text="{Binding Value, RelativeSource={RelativeSource Mode=TemplatedParent}, StringFormat={}{0:F2}}" />
  244. </Grid>
  245. </ControlTemplate>
  246. </Setter.Value>
  247. </Setter>
  248. </Style>
  249. <Style BasedOn="{StaticResource {x:Type Slider}}" TargetType="{x:Type ctrl:TheSlider}">
  250. <Setter Property="Width" Value="140" />
  251. <Setter Property="Maximum" Value="100" />
  252. <Setter Property="IsSnapToTickEnabled" Value="True" />
  253. <Setter Property="Minimum" Value="0" />
  254. <Setter Property="AutoToolTipPlacement" Value="BottomRight" />
  255. <Setter Property="SmallChange" Value="0.1" />
  256. <Setter Property="LargeChange" Value="0.1" />
  257. </Style>
  258. <!--<Style TargetType="{x:Type ctrl:TheTextBox}" BasedOn="{StaticResource {x:Type TextBox}}"/>-->
  259. <Style TargetType="{x:Type ctrl:TheTimer}">
  260. <Setter Property="Template">
  261. <Setter.Value>
  262. <ControlTemplate TargetType="{x:Type ctrl:TheTimer}">
  263. <Border
  264. Background="{TemplateBinding Background}"
  265. BorderBrush="{TemplateBinding BorderBrush}"
  266. BorderThickness="{TemplateBinding BorderThickness}">
  267. <Grid>
  268. <Image RenderOptions.BitmapScalingMode="Fant" Source="../Images/timericon.png" />
  269. </Grid>
  270. </Border>
  271. </ControlTemplate>
  272. </Setter.Value>
  273. </Setter>
  274. </Style>
  275. <Style TargetType="{x:Type ctrl:TheButton}">
  276. <Style.Setters>
  277. <Setter Property="VerticalContentAlignment" Value="Center" />
  278. <Setter Property="Cursor" Value="Hand" />
  279. <Setter Property="Foreground" Value="{DynamicResource ButtonSelectForeground}" />
  280. <Setter Property="Height" Value="25" />
  281. <Setter Property="Template">
  282. <Setter.Value>
  283. <ControlTemplate TargetType="{x:Type ctrl:TheButton}">
  284. <Border x:Name="BD" Cursor="Hand">
  285. <StackPanel
  286. HorizontalAlignment="Center"
  287. Cursor="Hand"
  288. Orientation="Horizontal">
  289. <TextBlock
  290. x:Name="textBlock"
  291. Margin="10,0,10,0"
  292. VerticalAlignment="Center"
  293. Cursor="Hand"
  294. FontSize="14"
  295. Foreground="{DynamicResource ButtonSelectForeground}"
  296. Text="{TemplateBinding Content}" />
  297. </StackPanel>
  298. </Border>
  299. <ControlTemplate.Triggers>
  300. <Trigger Property="IsMouseOver" Value="true">
  301. <Setter TargetName="BD" Property="Background">
  302. <Setter.Value>
  303. <ImageBrush ImageSource="../Images/button2.png" />
  304. </Setter.Value>
  305. </Setter>
  306. <Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource ButtonSelectForeground}" />
  307. </Trigger>
  308. <Trigger Property="IsMouseOver" Value="False">
  309. <Setter TargetName="BD" Property="Background">
  310. <Setter.Value>
  311. <ImageBrush ImageSource="../Images/button1.png" />
  312. </Setter.Value>
  313. </Setter>
  314. <Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource ButtonSelectForeground}" />
  315. </Trigger>
  316. <Trigger Property="IsEnabled" Value="False">
  317. <Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource ButtonUnSelectForeground}" />
  318. </Trigger>
  319. </ControlTemplate.Triggers>
  320. </ControlTemplate>
  321. </Setter.Value>
  322. </Setter>
  323. </Style.Setters>
  324. </Style>
  325. <Style TargetType="{x:Type ctrl:TheToggleButton}">
  326. <Style.Setters>
  327. <Setter Property="VerticalContentAlignment" Value="Center" />
  328. <Setter Property="Cursor" Value="Hand" />
  329. <Setter Property="Foreground" Value="{DynamicResource ButtonSelectForeground}" />
  330. <Setter Property="Height" Value="25" />
  331. <Setter Property="Template">
  332. <Setter.Value>
  333. <ControlTemplate TargetType="{x:Type ctrl:TheToggleButton}">
  334. <Border x:Name="BD" Cursor="Hand">
  335. <StackPanel
  336. HorizontalAlignment="Center"
  337. Cursor="Hand"
  338. Orientation="Horizontal">
  339. <TextBlock
  340. x:Name="textBlock"
  341. Margin="10,0,10,0"
  342. VerticalAlignment="Center"
  343. Cursor="Hand"
  344. FontSize="14"
  345. Foreground="{DynamicResource ButtonSelectForeground}"
  346. Text="{TemplateBinding Content}" />
  347. </StackPanel>
  348. </Border>
  349. <ControlTemplate.Triggers>
  350. <Trigger Property="IsChecked" Value="true">
  351. <Setter TargetName="BD" Property="Background">
  352. <Setter.Value>
  353. <ImageBrush ImageSource="../Images/button2.png" />
  354. </Setter.Value>
  355. </Setter>
  356. <Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource MeunSelectForeground}" />
  357. </Trigger>
  358. <Trigger Property="IsChecked" Value="False">
  359. <Setter TargetName="BD" Property="Background">
  360. <Setter.Value>
  361. <ImageBrush ImageSource="../Images/button1.png" />
  362. </Setter.Value>
  363. </Setter>
  364. <Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource ButtonSelectForeground}" />
  365. </Trigger>
  366. <Trigger Property="IsEnabled" Value="False">
  367. <Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource ButtonUnSelectForeground}" />
  368. </Trigger>
  369. </ControlTemplate.Triggers>
  370. </ControlTemplate>
  371. </Setter.Value>
  372. </Setter>
  373. </Style.Setters>
  374. </Style>
  375. <Style TargetType="{x:Type ctrl:TheTextBox}">
  376. <Setter Property="BorderBrush" Value="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" />
  377. <Setter Property="BorderThickness" Value="1" />
  378. <Setter Property="Padding" Value="0" />
  379. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  380. <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
  381. <Setter Property="VerticalContentAlignment" Value="Center" />
  382. <Setter Property="Height" Value="24" />
  383. <Setter Property="CaretBrush" Value="White" />
  384. <Setter Property="Padding" Value="0" />
  385. <Setter Property="HorizontalContentAlignment" Value="Left" />
  386. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  387. <Setter Property="AllowDrop" Value="true" />
  388. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  389. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  390. <Setter Property="Template">
  391. <Setter.Value>
  392. <ControlTemplate TargetType="{x:Type TextBox}">
  393. <Themes1:ClassicBorderDecorator
  394. x:Name="Bd"
  395. BorderBrush="{DynamicResource borderBrush}"
  396. BorderStyle="None"
  397. BorderThickness="1">
  398. <ScrollViewer x:Name="PART_ContentHost" />
  399. </Themes1:ClassicBorderDecorator>
  400. <ControlTemplate.Triggers>
  401. <Trigger Property="IsEnabled" Value="false">
  402. <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  403. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  404. </Trigger>
  405. </ControlTemplate.Triggers>
  406. </ControlTemplate>
  407. </Setter.Value>
  408. </Setter>
  409. <Style.Triggers>
  410. <MultiTrigger>
  411. <MultiTrigger.Conditions>
  412. <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
  413. <Condition Property="IsSelectionActive" Value="false" />
  414. <Condition Property="IsSelectionActive" Value="false" />
  415. </MultiTrigger.Conditions>
  416. <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
  417. </MultiTrigger>
  418. </Style.Triggers>
  419. </Style>
  420. <Style TargetType="{x:Type ctrl:NumberBox}">
  421. <Setter Property="BorderBrush" Value="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" />
  422. <Setter Property="BorderThickness" Value="1" />
  423. <Setter Property="Padding" Value="0" />
  424. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  425. <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
  426. <Setter Property="VerticalContentAlignment" Value="Center" />
  427. <Setter Property="Height" Value="24" />
  428. <Setter Property="CaretBrush" Value="White" />
  429. <Setter Property="Padding" Value="0" />
  430. <Setter Property="HorizontalContentAlignment" Value="Left" />
  431. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  432. <Setter Property="AllowDrop" Value="true" />
  433. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  434. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  435. <Setter Property="Template">
  436. <Setter.Value>
  437. <ControlTemplate TargetType="{x:Type TextBox}">
  438. <Themes1:ClassicBorderDecorator
  439. x:Name="Bd"
  440. BorderBrush="{DynamicResource borderBrush}"
  441. BorderStyle="None"
  442. BorderThickness="1">
  443. <ScrollViewer x:Name="PART_ContentHost" />
  444. </Themes1:ClassicBorderDecorator>
  445. <ControlTemplate.Triggers>
  446. <Trigger Property="IsEnabled" Value="false">
  447. <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  448. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  449. </Trigger>
  450. </ControlTemplate.Triggers>
  451. </ControlTemplate>
  452. </Setter.Value>
  453. </Setter>
  454. <Style.Triggers>
  455. <MultiTrigger>
  456. <MultiTrigger.Conditions>
  457. <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
  458. <Condition Property="IsSelectionActive" Value="false" />
  459. <Condition Property="IsSelectionActive" Value="false" />
  460. </MultiTrigger.Conditions>
  461. <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
  462. </MultiTrigger>
  463. </Style.Triggers>
  464. </Style>
  465. <Style TargetType="{x:Type ctrl:TheTextBlock}">
  466. <Style.Setters>
  467. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  468. <Setter Property="HorizontalAlignment" Value="Left" />
  469. <Setter Property="VerticalAlignment" Value="Center" />
  470. <Setter Property="FontSize" Value="20" />
  471. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  472. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  473. <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
  474. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  475. <Setter Property="AllowDrop" Value="true" />
  476. <Setter Property="TextWrapping" Value="Wrap"/>
  477. </Style.Setters>
  478. </Style>
  479. <Style x:Key="DesignToggleButton" TargetType="ToggleButton">
  480. <Setter Property="Foreground" Value="{StaticResource ControlForeground}" />
  481. <Setter Property="Template">
  482. <Setter.Value>
  483. <ControlTemplate TargetType="ToggleButton">
  484. <Border
  485. Background="{StaticResource NormalBackground}"
  486. BorderBrush="{StaticResource ControlBorderBrush}"
  487. BorderThickness="1"
  488. CornerRadius="2">
  489. <TextBlock
  490. HorizontalAlignment="Center"
  491. VerticalAlignment="Center"
  492. FontSize="{TemplateBinding FontSize}"
  493. FontWeight="{TemplateBinding FontWeight}"
  494. Text="{TemplateBinding Content}" />
  495. </Border>
  496. </ControlTemplate>
  497. </Setter.Value>
  498. </Setter>
  499. </Style>
  500. <Style x:Key="ExecuteToggleButton" TargetType="ToggleButton">
  501. <Setter Property="Foreground" Value="{StaticResource ControlForeground}" />
  502. <Setter Property="Template">
  503. <Setter.Value>
  504. <ControlTemplate TargetType="ToggleButton">
  505. <Border
  506. x:Name="bd"
  507. Background="{StaticResource NormalBackground}"
  508. BorderBrush="{StaticResource ControlBorderBrush}"
  509. BorderThickness="1"
  510. CornerRadius="2">
  511. <TextBlock
  512. HorizontalAlignment="Center"
  513. VerticalAlignment="Center"
  514. FontSize="{TemplateBinding FontSize}"
  515. FontWeight="{TemplateBinding FontWeight}"
  516. Text="{TemplateBinding Content}" />
  517. </Border>
  518. <ControlTemplate.Triggers>
  519. <Trigger Property="IsChecked" Value="True">
  520. <Setter TargetName="bd" Property="Background">
  521. <Setter.Value>
  522. <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
  523. <GradientStopCollection>
  524. <GradientStop Color="#6AD456" />
  525. <GradientStop Offset="0.5" Color="#1DAE06" />
  526. <GradientStop Offset="1" Color="#8BDC7C" />
  527. </GradientStopCollection>
  528. </LinearGradientBrush>
  529. </Setter.Value>
  530. </Setter>
  531. </Trigger>
  532. </ControlTemplate.Triggers>
  533. </ControlTemplate>
  534. </Setter.Value>
  535. </Setter>
  536. </Style>
  537. <Style TargetType="{x:Type ctrl:WaveProgressBar}">
  538. <Setter Property="BorderBrush" Value="{StaticResource borderBrush}" />
  539. <Setter Property="BorderThickness" Value="1" />
  540. <Setter Property="WaveFill" Value="{StaticResource borderBrush}" />
  541. <Setter Property="WaveThickness" Value="2" />
  542. <Setter Property="WaveStroke" Value="{StaticResource borderBrush}" />
  543. <Setter Property="ShowText" Value="True" />
  544. <Setter Property="FontSize" Value="20" />
  545. <Setter Property="Foreground" Value="{StaticResource MeunSelectForeground}" />
  546. <Setter Property="Background" Value="Transparent" />
  547. <Setter Property="Template">
  548. <Setter.Value>
  549. <ControlTemplate TargetType="ctrl:WaveProgressBar">
  550. <ControlTemplate.Resources>
  551. <Storyboard x:Key="StoryboardOnLoaded" RepeatBehavior="Forever">
  552. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_Wave" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)">
  553. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="-400" />
  554. </DoubleAnimationUsingKeyFrames>
  555. </Storyboard>
  556. </ControlTemplate.Resources>
  557. <StackPanel>
  558. <Border Background="{TemplateBinding Background}">
  559. <Viewbox>
  560. <Border
  561. x:Name="PART_Clip"
  562. Width="200"
  563. Height="200"
  564. BorderBrush="{TemplateBinding BorderBrush}"
  565. BorderThickness="{TemplateBinding BorderThickness}"
  566. ClipToBounds="True"
  567. CornerRadius="100">
  568. <Border.Clip>
  569. <EllipseGeometry
  570. Center="100,100"
  571. RadiusX="100"
  572. RadiusY="100" />
  573. </Border.Clip>
  574. <Grid>
  575. <Path
  576. x:Name="PART_Wave"
  577. Width="600"
  578. Height="250"
  579. Margin="0,0,-400,-20"
  580. HorizontalAlignment="Left"
  581. VerticalAlignment="Top"
  582. ClipToBounds="True"
  583. Fill="{TemplateBinding WaveFill}"
  584. RenderTransformOrigin="0.5,0.5"
  585. Stretch="Fill"
  586. Stroke="{TemplateBinding WaveStroke}"
  587. StrokeThickness="{TemplateBinding WaveThickness}"
  588. UseLayoutRounding="False">
  589. <Path.Data>
  590. <PathGeometry>
  591. <PathFigure StartPoint="0,1">
  592. <PolyBezierSegment Points="0.5,1 0.5,0 1,0" />
  593. <PolyBezierSegment Points="1.5,0 1.5,1 2,1" />
  594. <PolyBezierSegment Points="2.5,1 2.5,0 3,0" />
  595. <PolyLineSegment Points="3,0 3,10, 0,10 0,1" />
  596. </PathFigure>
  597. </PathGeometry>
  598. </Path.Data>
  599. </Path>
  600. <TextBlock
  601. HorizontalAlignment="Center"
  602. VerticalAlignment="Center"
  603. FontFamily="{StaticResource Digital}"
  604. FontSize="{TemplateBinding FontSize}"
  605. Foreground="{TemplateBinding Foreground}"
  606. Text="{Binding Value, RelativeSource={RelativeSource Mode=TemplatedParent}, StringFormat={}{0:f2}%}"
  607. Visibility="{Binding ShowText, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static con:BoolToVisibilityConverter.Instance}}" />
  608. </Grid>
  609. </Border>
  610. </Viewbox>
  611. </Border>
  612. </StackPanel>
  613. <ControlTemplate.Triggers>
  614. <EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="PART_Wave">
  615. <BeginStoryboard Name="BeginStoryboardWave" Storyboard="{StaticResource StoryboardOnLoaded}" />
  616. </EventTrigger>
  617. <EventTrigger RoutedEvent="FrameworkElement.Unloaded" SourceName="PART_Wave">
  618. <StopStoryboard BeginStoryboardName="BeginStoryboardWave" />
  619. </EventTrigger>
  620. </ControlTemplate.Triggers>
  621. </ControlTemplate>
  622. </Setter.Value>
  623. </Setter>
  624. </Style>
  625. <Style TargetType="{x:Type ctrl:StatusLight}">
  626. <Setter Property="Template">
  627. <Setter.Value>
  628. <ControlTemplate TargetType="{x:Type ctrl:StatusLight}">
  629. <Border Width="{Binding Path=ActualHeight, RelativeSource={RelativeSource Self}}">
  630. <Grid>
  631. <Image
  632. x:Name="ima"
  633. RenderOptions.BitmapScalingMode="Fant"
  634. Source="../Images/State0.png" />
  635. </Grid>
  636. </Border>
  637. </ControlTemplate>
  638. </Setter.Value>
  639. </Setter>
  640. </Style>
  641. <Style TargetType="{x:Type ctrl:TheCheckBox}">
  642. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  643. <Setter Property="VerticalContentAlignment" Value="Center" />
  644. <Setter Property="FocusVisualStyle">
  645. <Setter.Value>
  646. <Style>
  647. <Setter Property="Control.Template">
  648. <Setter.Value>
  649. <ControlTemplate>
  650. <Rectangle
  651. Margin="1"
  652. SnapsToDevicePixels="True"
  653. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  654. StrokeDashArray="1 2"
  655. StrokeThickness="1" />
  656. </ControlTemplate>
  657. </Setter.Value>
  658. </Setter>
  659. </Style>
  660. </Setter.Value>
  661. </Setter>
  662. <Setter Property="Template">
  663. <Setter.Value>
  664. <ControlTemplate TargetType="{x:Type CheckBox}">
  665. <StackPanel
  666. Background="Transparent"
  667. Orientation="Horizontal"
  668. SnapsToDevicePixels="True">
  669. <Grid>
  670. <Image
  671. Width="12"
  672. Height="14"
  673. Source="../Images/Cb_HalfChecked.png" />
  674. <Image
  675. x:Name="image1"
  676. Width="12"
  677. Height="14"
  678. Source="../Images/Cb_HalfChecked.png" />
  679. </Grid>
  680. <ContentPresenter
  681. Margin="{TemplateBinding Padding}"
  682. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  683. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  684. Content="{TemplateBinding Content}"
  685. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  686. RecognizesAccessKey="True"
  687. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  688. </StackPanel>
  689. <ControlTemplate.Triggers>
  690. <Trigger Property="HasContent" Value="True">
  691. <Setter Property="FocusVisualStyle">
  692. <Setter.Value>
  693. <Style>
  694. <Setter Property="Control.Template">
  695. <Setter.Value>
  696. <ControlTemplate>
  697. <Rectangle
  698. Margin="14,0,0,0"
  699. SnapsToDevicePixels="True"
  700. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  701. StrokeDashArray="1 2"
  702. StrokeThickness="1" />
  703. </ControlTemplate>
  704. </Setter.Value>
  705. </Setter>
  706. </Style>
  707. </Setter.Value>
  708. </Setter>
  709. <Setter Property="Padding" Value="4,0,0,0" />
  710. </Trigger>
  711. <Trigger Property="IsEnabled" Value="False">
  712. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  713. </Trigger>
  714. <Trigger Property="IsChecked" Value="true">
  715. <Setter TargetName="image1" Property="Source" Value="../Images/Cb_Checked.png" />
  716. </Trigger>
  717. <Trigger Property="IsChecked" Value="{x:Null}">
  718. <Setter TargetName="image1" Property="Source" Value="../Images/Cb_HalfChecked.png" />
  719. </Trigger>
  720. </ControlTemplate.Triggers>
  721. </ControlTemplate>
  722. </Setter.Value>
  723. </Setter>
  724. </Style>
  725. <Style x:Key="ComboBoxFocusVisual">
  726. <Setter Property="Control.Template">
  727. <Setter.Value>
  728. <ControlTemplate>
  729. <Rectangle
  730. Margin="4,4,21,4"
  731. SnapsToDevicePixels="true"
  732. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  733. StrokeDashArray="1 2"
  734. StrokeThickness="1" />
  735. </ControlTemplate>
  736. </Setter.Value>
  737. </Setter>
  738. </Style>
  739. <Geometry x:Key="DownArrowGeometry">M 0 0 L 3.5 4 L 7 0 Z</Geometry>
  740. <Style x:Key="ComboBoxTransparentButtonStyle" TargetType="{x:Type ToggleButton}">
  741. <Setter Property="MinWidth" Value="0" />
  742. <Setter Property="MinHeight" Value="0" />
  743. <Setter Property="Width" Value="Auto" />
  744. <Setter Property="Height" Value="Auto" />
  745. <Setter Property="Background" Value="Transparent" />
  746. <Setter Property="Foreground" Value="White" />
  747. <Setter Property="BorderBrush" Value="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" />
  748. <Setter Property="BorderThickness" Value="2" />
  749. <Setter Property="Template">
  750. <Setter.Value>
  751. <ControlTemplate TargetType="{x:Type ToggleButton}">
  752. <DockPanel
  753. Background="{TemplateBinding Background}"
  754. LastChildFill="false"
  755. SnapsToDevicePixels="true">
  756. <Themes1:ClassicBorderDecorator
  757. x:Name="Border"
  758. Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
  759. BorderBrush="{TemplateBinding BorderBrush}"
  760. BorderStyle="None"
  761. BorderThickness="{TemplateBinding BorderThickness}"
  762. DockPanel.Dock="Right">
  763. <Path
  764. HorizontalAlignment="Center"
  765. VerticalAlignment="Center"
  766. Data="{StaticResource DownArrowGeometry}"
  767. Fill="{TemplateBinding Foreground}" />
  768. </Themes1:ClassicBorderDecorator>
  769. </DockPanel>
  770. <ControlTemplate.Triggers>
  771. <Trigger Property="IsChecked" Value="true">
  772. <Setter TargetName="Border" Property="BorderStyle" Value="AltPressed" />
  773. </Trigger>
  774. </ControlTemplate.Triggers>
  775. </ControlTemplate>
  776. </Setter.Value>
  777. </Setter>
  778. <Style.Triggers>
  779. <Trigger Property="IsEnabled" Value="false">
  780. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" />
  781. </Trigger>
  782. </Style.Triggers>
  783. </Style>
  784. <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
  785. <Setter Property="OverridesDefaultStyle" Value="true" />
  786. <Setter Property="AllowDrop" Value="true" />
  787. <Setter Property="MinWidth" Value="0" />
  788. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  789. <Setter Property="MinHeight" Value="0" />
  790. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  791. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  792. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  793. <Setter Property="Template">
  794. <Setter.Value>
  795. <ControlTemplate TargetType="{x:Type TextBox}">
  796. <ScrollViewer
  797. x:Name="PART_ContentHost"
  798. Background="Transparent"
  799. Focusable="false"
  800. HorizontalScrollBarVisibility="Hidden"
  801. VerticalScrollBarVisibility="Hidden" />
  802. </ControlTemplate>
  803. </Setter.Value>
  804. </Setter>
  805. </Style>
  806. <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
  807. <Border
  808. Background="{TemplateBinding Background}"
  809. BorderBrush="{TemplateBinding BorderBrush}"
  810. BorderThickness="{TemplateBinding BorderThickness}"
  811. SnapsToDevicePixels="true">
  812. <Grid>
  813. <Themes1:ClassicBorderDecorator
  814. x:Name="Border"
  815. BorderBrush="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}"
  816. BorderStyle="None"
  817. BorderThickness="2">
  818. <Popup
  819. x:Name="PART_Popup"
  820. AllowsTransparency="true"
  821. Focusable="False"
  822. IsOpen="{TemplateBinding IsDropDownOpen}"
  823. Placement="Bottom"
  824. PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
  825. <Themes1:SystemDropShadowChrome
  826. x:Name="Shdw"
  827. MinWidth="{Binding ActualWidth, ElementName=Border}"
  828. MaxHeight="{TemplateBinding MaxDropDownHeight}"
  829. Color="Transparent">
  830. <Border
  831. x:Name="DropDownBorder"
  832. BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
  833. BorderThickness="1">
  834. <Border.Background>
  835. <ImageBrush
  836. ImageSource="../Images/nbbj.png"
  837. Opacity="0.5"
  838. Stretch="Fill" />
  839. </Border.Background>
  840. <ScrollViewer x:Name="DropDownScrollViewer">
  841. <Grid RenderOptions.ClearTypeHint="Enabled">
  842. <Canvas
  843. Width="0"
  844. Height="0"
  845. HorizontalAlignment="Left"
  846. VerticalAlignment="Top">
  847. <Rectangle
  848. x:Name="OpaqueRect"
  849. Width="{Binding ActualWidth, ElementName=DropDownBorder}"
  850. Height="{Binding ActualHeight, ElementName=DropDownBorder}"
  851. Fill="{Binding Background, ElementName=DropDownBorder}" />
  852. </Canvas>
  853. <ItemsPresenter
  854. x:Name="ItemsPresenter"
  855. KeyboardNavigation.DirectionalNavigation="Contained"
  856. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  857. </Grid>
  858. </ScrollViewer>
  859. </Border>
  860. </Themes1:SystemDropShadowChrome>
  861. </Popup>
  862. </Themes1:ClassicBorderDecorator>
  863. <ToggleButton
  864. Width="Auto"
  865. MinWidth="0"
  866. MinHeight="0"
  867. ClickMode="Press"
  868. Focusable="false"
  869. IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  870. Style="{StaticResource ComboBoxTransparentButtonStyle}" />
  871. <DockPanel>
  872. <FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right" />
  873. <TextBox
  874. x:Name="PART_EditableTextBox"
  875. Margin="{TemplateBinding Padding}"
  876. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  877. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  878. CaretBrush="White"
  879. IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
  880. Style="{StaticResource ComboBoxEditableTextBox}" />
  881. </DockPanel>
  882. </Grid>
  883. </Border>
  884. <ControlTemplate.Triggers>
  885. <Trigger Property="HasItems" Value="false">
  886. <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
  887. </Trigger>
  888. <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
  889. <Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
  890. <Setter TargetName="Shdw" Property="Color" Value="#71000000" />
  891. </Trigger>
  892. <Trigger Property="IsEnabled" Value="false">
  893. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  894. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  895. </Trigger>
  896. <MultiTrigger>
  897. <MultiTrigger.Conditions>
  898. <Condition Property="IsGrouping" Value="true" />
  899. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
  900. </MultiTrigger.Conditions>
  901. <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
  902. </MultiTrigger>
  903. <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
  904. <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
  905. <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
  906. </Trigger>
  907. </ControlTemplate.Triggers>
  908. </ControlTemplate>
  909. <Style TargetType="{x:Type ctrl:TheComboBox}">
  910. <Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}" />
  911. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  912. <Setter Property="Background" Value="Transparent" />
  913. <Setter Property="BorderBrush" Value="{DynamicResource borderBrush}" />
  914. <Setter Property="BorderThickness" Value="1" />
  915. <Setter Property="Margin" Value="0,0,0,0" />
  916. <Setter Property="Padding" Value="0" />
  917. <Setter Property="Height" Value="24" />
  918. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
  919. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
  920. <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
  921. <Setter Property="ScrollViewer.PanningMode" Value="Both" />
  922. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  923. <Setter Property="VerticalContentAlignment" Value="Center" />
  924. <Setter Property="IsTextSearchCaseSensitive" Value="true" />
  925. <Setter Property="IsEditable" Value="true" />
  926. <Setter Property="StaysOpenOnEdit" Value="true" />
  927. <Setter Property="Template">
  928. <Setter.Value>
  929. <ControlTemplate TargetType="{x:Type ctrl:TheComboBox}">
  930. <Border
  931. Background="{TemplateBinding Background}"
  932. BorderBrush="{TemplateBinding BorderBrush}"
  933. BorderThickness="{TemplateBinding BorderThickness}"
  934. SnapsToDevicePixels="true">
  935. <Grid>
  936. <Themes1:ClassicBorderDecorator
  937. x:Name="Border"
  938. BorderBrush="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}"
  939. BorderStyle="None"
  940. BorderThickness="2">
  941. <Popup
  942. x:Name="PART_Popup"
  943. AllowsTransparency="true"
  944. Focusable="False"
  945. IsOpen="{TemplateBinding IsDropDownOpen}"
  946. Placement="Bottom"
  947. PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
  948. <Themes1:SystemDropShadowChrome
  949. x:Name="Shdw"
  950. MinWidth="{Binding ActualWidth, ElementName=Border}"
  951. MaxHeight="{TemplateBinding MaxDropDownHeight}"
  952. Color="Transparent">
  953. <Border
  954. x:Name="DropDownBorder"
  955. BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
  956. BorderThickness="1">
  957. <Border.Background>
  958. <ImageBrush ImageSource="../Images/nbbj.png" />
  959. </Border.Background>
  960. <ScrollViewer x:Name="DropDownScrollViewer">
  961. <Grid RenderOptions.ClearTypeHint="Enabled">
  962. <Canvas
  963. Width="0"
  964. Height="0"
  965. HorizontalAlignment="Left"
  966. VerticalAlignment="Top">
  967. <Rectangle
  968. x:Name="OpaqueRect"
  969. Width="{Binding ActualWidth, ElementName=DropDownBorder}"
  970. Height="{Binding ActualHeight, ElementName=DropDownBorder}"
  971. Fill="{Binding Background, ElementName=DropDownBorder}" />
  972. </Canvas>
  973. <ItemsPresenter
  974. x:Name="ItemsPresenter"
  975. KeyboardNavigation.DirectionalNavigation="Contained"
  976. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  977. </Grid>
  978. </ScrollViewer>
  979. </Border>
  980. </Themes1:SystemDropShadowChrome>
  981. </Popup>
  982. </Themes1:ClassicBorderDecorator>
  983. <DockPanel Margin="2">
  984. <FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right" />
  985. <Border x:Name="SelectedItemBorder" Margin="{TemplateBinding Padding}">
  986. <ContentPresenter
  987. Margin="1,1,1,1"
  988. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  989. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  990. Content="{TemplateBinding SelectionBoxItem}"
  991. ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
  992. ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
  993. ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
  994. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  995. </Border>
  996. </DockPanel>
  997. <ToggleButton
  998. Width="Auto"
  999. MinWidth="0"
  1000. MinHeight="0"
  1001. Margin="2"
  1002. ClickMode="Press"
  1003. Focusable="false"
  1004. IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  1005. Style="{StaticResource ComboBoxTransparentButtonStyle}" />
  1006. </Grid>
  1007. </Border>
  1008. <ControlTemplate.Triggers>
  1009. <MultiTrigger>
  1010. <MultiTrigger.Conditions>
  1011. <!--<Condition Property="IsSelectionBoxHighlighted" Value="true"/>-->
  1012. <Condition Property="IsDropDownOpen" Value="false" />
  1013. </MultiTrigger.Conditions>
  1014. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  1015. </MultiTrigger>
  1016. <!--<Trigger Property="IsSelectionBoxHighlighted" Value="true">
  1017. <Setter Property="Background" TargetName="SelectedItemBorder" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
  1018. </Trigger>-->
  1019. <Trigger Property="HasItems" Value="false">
  1020. <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
  1021. </Trigger>
  1022. <Trigger Property="IsEnabled" Value="false">
  1023. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  1024. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  1025. </Trigger>
  1026. <MultiTrigger>
  1027. <MultiTrigger.Conditions>
  1028. <Condition Property="IsGrouping" Value="true" />
  1029. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
  1030. </MultiTrigger.Conditions>
  1031. <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
  1032. </MultiTrigger>
  1033. <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
  1034. <Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
  1035. <Setter TargetName="Shdw" Property="Color" Value="#71000000" />
  1036. </Trigger>
  1037. <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
  1038. <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
  1039. <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
  1040. </Trigger>
  1041. </ControlTemplate.Triggers>
  1042. </ControlTemplate>
  1043. </Setter.Value>
  1044. </Setter>
  1045. <Style.Triggers>
  1046. <Trigger Property="IsEditable" Value="true">
  1047. <Setter Property="IsTabStop" Value="false" />
  1048. <Setter Property="Padding" Value="1" />
  1049. <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
  1050. </Trigger>
  1051. </Style.Triggers>
  1052. </Style>
  1053. <Style TargetType="{x:Type ctrl:TheDataGrid}">
  1054. <Setter Property="AutoGenerateColumns" Value="False" />
  1055. <Setter Property="Background" Value="Transparent" />
  1056. <Setter Property="CanUserAddRows" Value="False" />
  1057. <Setter Property="CanUserDeleteRows" Value="False" />
  1058. <Setter Property="BorderThickness" Value="0" />
  1059. <Setter Property="HeadersVisibility" Value="Column" />
  1060. <Setter Property="GridLinesVisibility" Value="None" />
  1061. <Setter Property="SelectionMode" Value="Single" />
  1062. <!--<Setter Property="Template">
  1063. <Setter.Value>
  1064. <ControlTemplate TargetType="ctrl:TheDataGrid">
  1065. <Border BorderBrush="{StaticResource ControlBorderBrush}" BorderThickness="1" Background="{StaticResource ControlBackground}">
  1066. <TextBlock Margin="4 0 0 0" Text="{TemplateBinding Text}" VerticalAlignment="Center" Foreground="BlueViolet"/>
  1067. </Border>
  1068. </ControlTemplate>
  1069. </Setter.Value>
  1070. </Setter>-->
  1071. </Style>
  1072. <Style TargetType="{x:Type DataGridRow}">
  1073. <Setter Property="Background" Value="Transparent" />
  1074. <Setter Property="HorizontalContentAlignment" Value="Center" />
  1075. <Setter Property="SnapsToDevicePixels" Value="true" />
  1076. <Setter Property="Foreground" Value="#abf4ff" />
  1077. <Setter Property="BorderBrush" Value="#abf4ff" />
  1078. <Setter Property="FontSize" Value="10" />
  1079. <Setter Property="Template">
  1080. <Setter.Value>
  1081. <ControlTemplate TargetType="{x:Type DataGridRow}">
  1082. <Border
  1083. x:Name="DGR_Border"
  1084. BorderThickness="{TemplateBinding BorderThickness}"
  1085. SnapsToDevicePixels="True">
  1086. <SelectiveScrollingGrid x:Name="selectiveScrollingGrid">
  1087. <SelectiveScrollingGrid.ColumnDefinitions>
  1088. <ColumnDefinition Width="Auto" />
  1089. <ColumnDefinition Width="*" />
  1090. </SelectiveScrollingGrid.ColumnDefinitions>
  1091. <SelectiveScrollingGrid.RowDefinitions>
  1092. <RowDefinition Height="*" />
  1093. <RowDefinition Height="Auto" />
  1094. </SelectiveScrollingGrid.RowDefinitions>
  1095. <DataGridCellsPresenter
  1096. Grid.Column="1"
  1097. ItemsPanel="{TemplateBinding ItemsPanel}"
  1098. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1099. <DataGridDetailsPresenter
  1100. Grid.Row="1"
  1101. Grid.Column="1"
  1102. SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding AreRowDetailsFrozen, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
  1103. Visibility="{TemplateBinding DetailsVisibility}" />
  1104. <DataGridRowHeader
  1105. Grid.RowSpan="2"
  1106. SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
  1107. Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
  1108. </SelectiveScrollingGrid>
  1109. <VisualStateManager.VisualStateGroups>
  1110. <VisualStateGroup x:Name="CommonStates">
  1111. <VisualState x:Name="Normal" />
  1112. <VisualState x:Name="MouseOver">
  1113. <Storyboard>
  1114. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DGR_Border" Storyboard.TargetProperty="(Panel.Background)">
  1115. <DiscreteObjectKeyFrame KeyTime="0">
  1116. <DiscreteObjectKeyFrame.Value>
  1117. <SolidColorBrush Color="#230077BC" />
  1118. </DiscreteObjectKeyFrame.Value>
  1119. </DiscreteObjectKeyFrame>
  1120. </ObjectAnimationUsingKeyFrames>
  1121. </Storyboard>
  1122. </VisualState>
  1123. <VisualState x:Name="Normal_Selected">
  1124. <Storyboard>
  1125. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DGR_Border" Storyboard.TargetProperty="(Panel.Background)">
  1126. <DiscreteObjectKeyFrame KeyTime="0">
  1127. <DiscreteObjectKeyFrame.Value>
  1128. <SolidColorBrush Color="#3D0077BC" />
  1129. </DiscreteObjectKeyFrame.Value>
  1130. </DiscreteObjectKeyFrame>
  1131. </ObjectAnimationUsingKeyFrames>
  1132. </Storyboard>
  1133. </VisualState>
  1134. </VisualStateGroup>
  1135. <VisualStateGroup x:Name="ValidationStates">
  1136. <VisualState x:Name="Valid" />
  1137. <VisualState x:Name="InvalidFocused" />
  1138. <VisualState x:Name="InvalidUnfocused" />
  1139. </VisualStateGroup>
  1140. </VisualStateManager.VisualStateGroups>
  1141. </Border>
  1142. </ControlTemplate>
  1143. </Setter.Value>
  1144. </Setter>
  1145. </Style>
  1146. <Style TargetType="{x:Type GridSplitter}">
  1147. <Setter Property="Width" Value="1" />
  1148. <Setter Property="Background" Value="#175c86" />
  1149. <Setter Property="Cursor" Value="SizeWE" />
  1150. <Setter Property="Margin" Value="0,0,0,0" />
  1151. <Setter Property="Template">
  1152. <Setter.Value>
  1153. <ControlTemplate TargetType="{x:Type Thumb}">
  1154. <Border
  1155. Width="{TemplateBinding Width}"
  1156. Margin="{TemplateBinding Margin}"
  1157. Background="{TemplateBinding Background}"
  1158. Opacity="0.4" />
  1159. </ControlTemplate>
  1160. </Setter.Value>
  1161. </Setter>
  1162. </Style>
  1163. <Style x:Key="ColumnHeaderGripperStyle" TargetType="{x:Type Thumb}">
  1164. <Setter Property="Width" Value="1" />
  1165. <Setter Property="Background" Value="#175c86" />
  1166. <Setter Property="Cursor" Value="SizeWE" />
  1167. <Setter Property="Margin" Value="0,0,0,0" />
  1168. <Setter Property="Template">
  1169. <Setter.Value>
  1170. <ControlTemplate TargetType="{x:Type Thumb}">
  1171. <Border
  1172. Width="{TemplateBinding Width}"
  1173. Margin="{TemplateBinding Margin}"
  1174. Background="{TemplateBinding Background}"
  1175. Opacity="0.4" />
  1176. </ControlTemplate>
  1177. </Setter.Value>
  1178. </Setter>
  1179. </Style>
  1180. <Style TargetType="{x:Type DataGridColumnHeader}">
  1181. <Setter Property="HorizontalContentAlignment" Value="Center" />
  1182. <Setter Property="VerticalContentAlignment" Value="Center" />
  1183. <Setter Property="Height" Value="30" />
  1184. <Setter Property="Background">
  1185. <Setter.Value>
  1186. <ImageBrush ImageSource="../Images/biogebj.png" Opacity="0.2" />
  1187. </Setter.Value>
  1188. </Setter>
  1189. <Setter Property="BorderThickness" Value="0" />
  1190. <Setter Property="Foreground" Value="{DynamicResource DataGridColumnHeaderColor}" />
  1191. <Setter Property="FontSize" Value="14" />
  1192. <Setter Property="Template">
  1193. <Setter.Value>
  1194. <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
  1195. <Grid>
  1196. <Border
  1197. Padding="{TemplateBinding Padding}"
  1198. Background="{TemplateBinding Background}"
  1199. BorderBrush="{TemplateBinding BorderBrush}"
  1200. BorderThickness="{TemplateBinding BorderThickness}">
  1201. <ContentPresenter
  1202. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1203. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1204. RecognizesAccessKey="True"
  1205. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1206. </Border>
  1207. <GridSplitter
  1208. HorizontalAlignment="Right"
  1209. Background="#FF0BAE3F"
  1210. BorderBrush="#FFBD2A2A" />
  1211. <Thumb
  1212. x:Name="PART_RightHeaderGripper"
  1213. Width="2"
  1214. HorizontalAlignment="Right"
  1215. Background="#FF1D9B9E"
  1216. Style="{StaticResource ColumnHeaderGripperStyle}" />
  1217. </Grid>
  1218. </ControlTemplate>
  1219. </Setter.Value>
  1220. </Setter>
  1221. </Style>
  1222. <Style x:Key="DataGridColumnHeader" TargetType="{x:Type DataGridColumnHeader}">
  1223. <Setter Property="HorizontalContentAlignment" Value="Center" />
  1224. <Setter Property="VerticalContentAlignment" Value="Center" />
  1225. <Setter Property="Height" Value="30" />
  1226. <Setter Property="Background">
  1227. <Setter.Value>
  1228. <ImageBrush ImageSource="../Images/databj.png" />
  1229. </Setter.Value>
  1230. </Setter>
  1231. <Setter Property="BorderThickness" Value="0" />
  1232. <Setter Property="Foreground" Value="White" />
  1233. <Setter Property="FontSize" Value="10" />
  1234. <Setter Property="Template">
  1235. <Setter.Value>
  1236. <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
  1237. <Grid>
  1238. <Border
  1239. Padding="{TemplateBinding Padding}"
  1240. Background="{TemplateBinding Background}"
  1241. BorderBrush="{TemplateBinding BorderBrush}"
  1242. BorderThickness="{TemplateBinding BorderThickness}">
  1243. <ContentPresenter
  1244. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1245. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1246. RecognizesAccessKey="True"
  1247. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1248. </Border>
  1249. <Thumb
  1250. x:Name="PART_RightHeaderGripper"
  1251. HorizontalAlignment="Right"
  1252. Style="{StaticResource ColumnHeaderGripperStyle}" />
  1253. </Grid>
  1254. </ControlTemplate>
  1255. </Setter.Value>
  1256. </Setter>
  1257. </Style>
  1258. <Style TargetType="{x:Type DataGridCell}">
  1259. <Setter Property="Background" Value="Transparent" />
  1260. <Setter Property="BorderBrush" Value="#FF31879E" />
  1261. <Setter Property="BorderThickness" Value="0" />
  1262. <Setter Property="Template">
  1263. <Setter.Value>
  1264. <ControlTemplate TargetType="{x:Type DataGridCell}">
  1265. <Border
  1266. Background="{TemplateBinding Background}"
  1267. BorderBrush="{TemplateBinding BorderBrush}"
  1268. BorderThickness="{TemplateBinding BorderThickness}"
  1269. SnapsToDevicePixels="True">
  1270. <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1271. </Border>
  1272. </ControlTemplate>
  1273. </Setter.Value>
  1274. </Setter>
  1275. <Style.Triggers>
  1276. <Trigger Property="IsSelected" Value="True">
  1277. <!--<Setter Property="Background" Value="#FF2281EC"/>-->
  1278. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
  1279. <!--<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>-->
  1280. </Trigger>
  1281. <!--<Trigger Property="IsKeyboardFocusWithin" Value="True">
  1282. <Setter Property="BorderBrush" Value="{DynamicResource {x:Static DataGrid.FocusBorderBrushKey}}"/>
  1283. </Trigger>-->
  1284. <Trigger Property="IsEnabled" Value="false">
  1285. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  1286. </Trigger>
  1287. </Style.Triggers>
  1288. </Style>
  1289. <SolidColorBrush x:Key="ListBorder" Color="#828790" />
  1290. <Style TargetType="{x:Type ctrl:TheListBox}">
  1291. <Setter Property="Background" Value="Transparent" />
  1292. <Setter Property="BorderBrush" Value="{StaticResource ListBorder}" />
  1293. <Setter Property="BorderThickness" Value="0" />
  1294. <Setter Property="Padding" Value="10" />
  1295. <Setter Property="Foreground" Value="White" />
  1296. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
  1297. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
  1298. <Setter Property="ScrollViewer.PanningMode" Value="Both" />
  1299. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  1300. <Setter Property="VerticalContentAlignment" Value="Center" />
  1301. </Style>
  1302. <BorderGapMaskConverter x:Key="BorderGapMaskConverter" />
  1303. <Style TargetType="{x:Type ctrl:TheGroupBox}">
  1304. <Setter Property="BorderThickness" Value="0" />
  1305. <Setter Property="Background" Value="Transparent" />
  1306. <Setter Property="Foreground" Value="{DynamicResource Titleforeground}" />
  1307. <Setter Property="Template">
  1308. <Setter.Value>
  1309. <ControlTemplate TargetType="{x:Type GroupBox}">
  1310. <Grid SnapsToDevicePixels="true">
  1311. <Grid.ColumnDefinitions>
  1312. <ColumnDefinition Width="6" />
  1313. <ColumnDefinition Width="Auto" />
  1314. <ColumnDefinition Width="*" />
  1315. <ColumnDefinition Width="6" />
  1316. </Grid.ColumnDefinitions>
  1317. <Grid.RowDefinitions>
  1318. <RowDefinition Height="Auto" />
  1319. <RowDefinition Height="Auto" />
  1320. <RowDefinition Height="*" />
  1321. <RowDefinition Height="6" />
  1322. </Grid.RowDefinitions>
  1323. <Rectangle Grid.RowSpan="2" Grid.ColumnSpan="4" />
  1324. <Border
  1325. Grid.Row="2"
  1326. Grid.RowSpan="2"
  1327. Grid.ColumnSpan="4"
  1328. Margin="0,0,0,0"
  1329. BorderThickness="0"
  1330. CornerRadius="0" />
  1331. <Image
  1332. Grid.Row="0"
  1333. Grid.RowSpan="2"
  1334. Grid.Column="1"
  1335. Height="4"
  1336. Margin="0,5,0,0"
  1337. HorizontalAlignment="Left"
  1338. Source="../Images/2609.png" />
  1339. <Border
  1340. x:Name="Header"
  1341. Grid.Row="0"
  1342. Grid.RowSpan="2"
  1343. Grid.Column="1"
  1344. Height="30"
  1345. Margin="30,0,0,0"
  1346. Padding="3,1,3,0">
  1347. <ContentPresenter
  1348. VerticalAlignment="Center"
  1349. ContentSource="Header"
  1350. RecognizesAccessKey="True"
  1351. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1352. </Border>
  1353. <ContentPresenter
  1354. Grid.Row="2"
  1355. Grid.Column="1"
  1356. Grid.ColumnSpan="2"
  1357. Margin="{TemplateBinding Padding}"
  1358. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1359. </Grid>
  1360. </ControlTemplate>
  1361. </Setter.Value>
  1362. </Setter>
  1363. </Style>
  1364. <Style x:Key="CheckRadioFocusVisual">
  1365. <Setter Property="Control.Template">
  1366. <Setter.Value>
  1367. <ControlTemplate>
  1368. <Rectangle
  1369. Margin="14,0,0,0"
  1370. SnapsToDevicePixels="true"
  1371. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  1372. StrokeDashArray="1 2"
  1373. StrokeThickness="1" />
  1374. </ControlTemplate>
  1375. </Setter.Value>
  1376. </Setter>
  1377. </Style>
  1378. <Style TargetType="{x:Type ctrl:TheRadioButton}">
  1379. <Setter Property="FocusVisualStyle" Value="{StaticResource CheckRadioFocusVisual}" />
  1380. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  1381. <Setter Property="VerticalContentAlignment" Value="Center" />
  1382. <Setter Property="Background">
  1383. <Setter.Value>
  1384. <ImageBrush ImageSource="/BPASmartClient.SCADAControl;component/Images/btnkeys.png" />
  1385. </Setter.Value>
  1386. </Setter>
  1387. <Setter Property="Padding" Value="2,0,0,0" />
  1388. <Setter Property="Template">
  1389. <Setter.Value>
  1390. <ControlTemplate TargetType="{x:Type RadioButton}">
  1391. <BulletDecorator VerticalAlignment="Center" Background="Transparent">
  1392. <BulletDecorator.Bullet>
  1393. <Grid>
  1394. <Ellipse
  1395. x:Name="Border"
  1396. Width="10"
  1397. Height="10"
  1398. Fill="{TemplateBinding Background}" />
  1399. <Ellipse
  1400. x:Name="Dot"
  1401. Width="5"
  1402. Height="5"
  1403. Fill="#ff8a03"
  1404. Visibility="Hidden" />
  1405. </Grid>
  1406. </BulletDecorator.Bullet>
  1407. <ContentPresenter
  1408. Margin="{TemplateBinding Padding}"
  1409. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1410. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1411. RecognizesAccessKey="True" />
  1412. </BulletDecorator>
  1413. <ControlTemplate.Triggers>
  1414. <Trigger Property="IsChecked" Value="true">
  1415. <Setter TargetName="Dot" Property="Visibility" Value="Visible" />
  1416. </Trigger>
  1417. <Trigger Property="IsChecked" Value="False">
  1418. <Setter TargetName="Dot" Property="Visibility" Value="Collapsed" />
  1419. </Trigger>
  1420. <Trigger Property="IsChecked" Value="{x:Null}">
  1421. <Setter TargetName="Dot" Property="Visibility" Value="Collapsed" />
  1422. </Trigger>
  1423. <Trigger Property="IsPressed" Value="true">
  1424. <Setter TargetName="Border" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  1425. </Trigger>
  1426. <Trigger Property="IsEnabled" Value="false">
  1427. <Setter TargetName="Border" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  1428. <Setter TargetName="Dot" Property="Fill" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  1429. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  1430. </Trigger>
  1431. </ControlTemplate.Triggers>
  1432. </ControlTemplate>
  1433. </Setter.Value>
  1434. </Setter>
  1435. </Style>
  1436. <SolidColorBrush x:Key="ProgressBar.Progress.圆形蓝.Text" Color="#FF0089E6" />
  1437. <SolidColorBrush x:Key="ProgressBar.Progress.圆形蓝.UnSelect" Color="#330089E6" />
  1438. <SolidColorBrush x:Key="ProgressBar.Progress.圆形蓝.Select" Color="#FF0089E6" />
  1439. <LinearGradientBrush x:Key="ProgressBar.Progress.动画蓝" StartPoint="1,0" EndPoint="0,0">
  1440. <GradientStop Offset="0" Color="#00000000" />
  1441. <GradientStop Offset="0.4" Color="#4C57B9FB" />
  1442. <GradientStop Offset="0.6" Color="#FF57B9FB" />
  1443. <GradientStop Offset="0.8" Color="#4C57B9FB" />
  1444. <GradientStop Offset="1" Color="#00000000" />
  1445. </LinearGradientBrush>
  1446. <SolidColorBrush x:Key="ProgressBar.Progress.圆形绿.Text" Color="#FF00DC00" />
  1447. <SolidColorBrush x:Key="ProgressBar.Progress.圆形绿.UnSelect" Color="#3300DC00" />
  1448. <SolidColorBrush x:Key="ProgressBar.Progress.圆形绿.Select" Color="#FF00DC00" />
  1449. <LinearGradientBrush x:Key="ProgressBar.Progress.动画绿" StartPoint="1,0" EndPoint="0,0">
  1450. <GradientStop Offset="0" Color="#00000000" />
  1451. <GradientStop Offset="0.4" Color="#4C72F972" />
  1452. <GradientStop Offset="0.6" Color="#FF72F972" />
  1453. <GradientStop Offset="0.8" Color="#4C72F972" />
  1454. <GradientStop Offset="1" Color="#00000000" />
  1455. </LinearGradientBrush>
  1456. <SolidColorBrush x:Key="ProgressBar.Progress.圆形红.Text" Color="#FFF10000" />
  1457. <SolidColorBrush x:Key="ProgressBar.Progress.圆形红.UnSelect" Color="#33F10000" />
  1458. <SolidColorBrush x:Key="ProgressBar.Progress.圆形红.Select" Color="#FFF10000" />
  1459. <LinearGradientBrush x:Key="ProgressBar.Progress.动画红" StartPoint="1,0" EndPoint="0,0">
  1460. <GradientStop Offset="0" Color="#00000000" />
  1461. <GradientStop Offset="0.4" Color="#4CFF5858" />
  1462. <GradientStop Offset="0.6" Color="#FFFF5858" />
  1463. <GradientStop Offset="0.8" Color="#4CFF5858" />
  1464. <GradientStop Offset="1" Color="#00000000" />
  1465. </LinearGradientBrush>
  1466. <LinearGradientBrush x:Key="ProgressBar.动画" StartPoint="1,0" EndPoint="0,0">
  1467. <GradientStop Offset="0" Color="#00000000" />
  1468. <GradientStop Offset="0.4" Color="#6F06F11F" />
  1469. <GradientStop Offset="0.6" Color="LightBlue" />
  1470. <GradientStop Offset="0.8" Color="#6F06F11F" />
  1471. <GradientStop Offset="1" Color="#00000000" />
  1472. </LinearGradientBrush>
  1473. <LinearGradientBrush x:Key="ProgressBar.Progress" StartPoint="0,0" EndPoint="1,0">
  1474. <GradientStop Offset="0" Color="#4F05CE10" />
  1475. <GradientStop Offset="1" Color="#6F06F11F" />
  1476. </LinearGradientBrush>
  1477. <SolidColorBrush x:Key="ProgressBar.Background" Color="#072a56" />
  1478. <SolidColorBrush x:Key="ProgressBar.Border" Color="#072a56" />
  1479. <con:Style3DashConverter x:Key="Style3Dash" />
  1480. <con:Style3ArcConverter x:Key="Style3Arc" />
  1481. <Style TargetType="{x:Type ctrl:TheBlueProgressBar}">
  1482. <Setter Property="Width" Value="100" />
  1483. <Setter Property="Height" Value="100" />
  1484. <Setter Property="Template">
  1485. <Setter.Value>
  1486. <ControlTemplate TargetType="{x:Type ProgressBar}">
  1487. <ControlTemplate.Resources>
  1488. <Storyboard x:Key="maindh" RepeatBehavior="Forever">
  1489. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ell动画" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)">
  1490. <EasingDoubleKeyFrame KeyTime="0" Value="-90" />
  1491. <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
  1492. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="90" />
  1493. </DoubleAnimationUsingKeyFrames>
  1494. </Storyboard>
  1495. </ControlTemplate.Resources>
  1496. <Grid>
  1497. <Rectangle
  1498. Fill="#ef426f"
  1499. RadiusX="5"
  1500. RadiusY="5"
  1501. Visibility="Collapsed" />
  1502. <Ellipse
  1503. x:Name="ell动画"
  1504. Width="80"
  1505. Height="80"
  1506. RenderTransformOrigin="0.5,0.5"
  1507. Stroke="{DynamicResource ProgressBar.Progress.动画蓝}"
  1508. StrokeDashCap="Flat"
  1509. StrokeThickness="10">
  1510. <Ellipse.RenderTransform>
  1511. <TransformGroup>
  1512. <!-- 旋转变换 -->
  1513. <RotateTransform Angle="-90" />
  1514. <!-- 缩放变换 -->
  1515. <ScaleTransform ScaleX="1" ScaleY="1" />
  1516. <!-- 倾斜变换 -->
  1517. <SkewTransform AngleX="0" AngleY="0" />
  1518. <!-- 移动变换 -->
  1519. <TranslateTransform X="0" Y="0" />
  1520. </TransformGroup>
  1521. </Ellipse.RenderTransform>
  1522. <Ellipse.StrokeDashArray>
  1523. <MultiBinding Converter="{StaticResource Style3Arc}">
  1524. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1525. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1526. </MultiBinding>
  1527. </Ellipse.StrokeDashArray>
  1528. </Ellipse>
  1529. <Ellipse
  1530. Width="80"
  1531. Height="80"
  1532. Stroke="{DynamicResource ProgressBar.Progress.圆形蓝.UnSelect}"
  1533. StrokeThickness="10" />
  1534. <Ellipse
  1535. Width="80"
  1536. Height="80"
  1537. RenderTransformOrigin="0.5,0.5"
  1538. Stroke="{DynamicResource ProgressBar.Progress.圆形蓝.Select}"
  1539. StrokeDashCap="Flat"
  1540. StrokeThickness="10">
  1541. <Ellipse.RenderTransform>
  1542. <RotateTransform Angle="-90" />
  1543. </Ellipse.RenderTransform>
  1544. <Ellipse.StrokeDashArray>
  1545. <MultiBinding Converter="{StaticResource Style3Arc}">
  1546. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1547. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1548. </MultiBinding>
  1549. </Ellipse.StrokeDashArray>
  1550. </Ellipse>
  1551. <TextBlock
  1552. HorizontalAlignment="Center"
  1553. VerticalAlignment="Center"
  1554. FontFamily="Fonts/#Quartz M"
  1555. FontSize="20"
  1556. Foreground="{DynamicResource ProgressBar.Progress.圆形蓝.Text}"
  1557. Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat=\{0\}%}" />
  1558. </Grid>
  1559. <ControlTemplate.Triggers>
  1560. <EventTrigger RoutedEvent="Loaded">
  1561. <BeginStoryboard Storyboard="{StaticResource maindh}" />
  1562. </EventTrigger>
  1563. </ControlTemplate.Triggers>
  1564. </ControlTemplate>
  1565. </Setter.Value>
  1566. </Setter>
  1567. </Style>
  1568. <Style TargetType="{x:Type ctrl:TheGreenProgressBar}">
  1569. <Setter Property="Width" Value="100" />
  1570. <Setter Property="Height" Value="100" />
  1571. <Setter Property="Template">
  1572. <Setter.Value>
  1573. <ControlTemplate TargetType="{x:Type ProgressBar}">
  1574. <ControlTemplate.Resources>
  1575. <Storyboard x:Key="maindh" RepeatBehavior="Forever">
  1576. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ell动画" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)">
  1577. <EasingDoubleKeyFrame KeyTime="0" Value="-90" />
  1578. <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
  1579. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="90" />
  1580. </DoubleAnimationUsingKeyFrames>
  1581. </Storyboard>
  1582. </ControlTemplate.Resources>
  1583. <Grid>
  1584. <Rectangle
  1585. Fill="#ef426f"
  1586. RadiusX="5"
  1587. RadiusY="5"
  1588. Visibility="Collapsed" />
  1589. <Ellipse
  1590. x:Name="ell动画"
  1591. Width="80"
  1592. Height="80"
  1593. RenderTransformOrigin="0.5,0.5"
  1594. Stroke="{DynamicResource ProgressBar.Progress.动画绿}"
  1595. StrokeDashCap="Flat"
  1596. StrokeThickness="10">
  1597. <Ellipse.RenderTransform>
  1598. <TransformGroup>
  1599. <!-- 旋转变换 -->
  1600. <RotateTransform Angle="-90" />
  1601. <!-- 缩放变换 -->
  1602. <ScaleTransform ScaleX="1" ScaleY="1" />
  1603. <!-- 倾斜变换 -->
  1604. <SkewTransform AngleX="0" AngleY="0" />
  1605. <!-- 移动变换 -->
  1606. <TranslateTransform X="0" Y="0" />
  1607. </TransformGroup>
  1608. </Ellipse.RenderTransform>
  1609. <Ellipse.StrokeDashArray>
  1610. <MultiBinding Converter="{StaticResource Style3Arc}">
  1611. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1612. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1613. </MultiBinding>
  1614. </Ellipse.StrokeDashArray>
  1615. </Ellipse>
  1616. <Ellipse
  1617. Width="80"
  1618. Height="80"
  1619. Stroke="{DynamicResource ProgressBar.Progress.圆形绿.UnSelect}"
  1620. StrokeThickness="10" />
  1621. <Ellipse
  1622. Width="80"
  1623. Height="80"
  1624. RenderTransformOrigin="0.5,0.5"
  1625. Stroke="{DynamicResource ProgressBar.Progress.圆形绿.Select}"
  1626. StrokeDashCap="Flat"
  1627. StrokeThickness="10">
  1628. <Ellipse.RenderTransform>
  1629. <RotateTransform Angle="-90" />
  1630. </Ellipse.RenderTransform>
  1631. <Ellipse.StrokeDashArray>
  1632. <MultiBinding Converter="{StaticResource Style3Arc}">
  1633. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1634. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1635. </MultiBinding>
  1636. </Ellipse.StrokeDashArray>
  1637. </Ellipse>
  1638. <TextBlock
  1639. HorizontalAlignment="Center"
  1640. VerticalAlignment="Center"
  1641. FontFamily="Fonts/#Quartz M"
  1642. FontSize="20"
  1643. Foreground="{DynamicResource ProgressBar.Progress.圆形绿.Text}"
  1644. Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat=\{0\}%}" />
  1645. </Grid>
  1646. <ControlTemplate.Triggers>
  1647. <EventTrigger RoutedEvent="Loaded">
  1648. <BeginStoryboard Storyboard="{StaticResource maindh}" />
  1649. </EventTrigger>
  1650. </ControlTemplate.Triggers>
  1651. </ControlTemplate>
  1652. </Setter.Value>
  1653. </Setter>
  1654. </Style>
  1655. <Style TargetType="{x:Type ctrl:TheRedProgressBar}">
  1656. <Setter Property="Width" Value="100" />
  1657. <Setter Property="Height" Value="100" />
  1658. <Setter Property="Template">
  1659. <Setter.Value>
  1660. <ControlTemplate TargetType="{x:Type ProgressBar}">
  1661. <ControlTemplate.Resources>
  1662. <Storyboard x:Key="maindh" RepeatBehavior="Forever">
  1663. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ell动画" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)">
  1664. <EasingDoubleKeyFrame KeyTime="0" Value="-90" />
  1665. <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
  1666. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="90" />
  1667. </DoubleAnimationUsingKeyFrames>
  1668. </Storyboard>
  1669. </ControlTemplate.Resources>
  1670. <Grid>
  1671. <Rectangle
  1672. Fill="#ef426f"
  1673. RadiusX="5"
  1674. RadiusY="5"
  1675. Visibility="Collapsed" />
  1676. <Ellipse
  1677. x:Name="ell动画"
  1678. Width="80"
  1679. Height="80"
  1680. RenderTransformOrigin="0.5,0.5"
  1681. Stroke="{DynamicResource ProgressBar.Progress.动画红}"
  1682. StrokeDashCap="Flat"
  1683. StrokeThickness="10">
  1684. <Ellipse.RenderTransform>
  1685. <TransformGroup>
  1686. <!-- 旋转变换 -->
  1687. <RotateTransform Angle="-90" />
  1688. <!-- 缩放变换 -->
  1689. <ScaleTransform ScaleX="1" ScaleY="1" />
  1690. <!-- 倾斜变换 -->
  1691. <SkewTransform AngleX="0" AngleY="0" />
  1692. <!-- 移动变换 -->
  1693. <TranslateTransform X="0" Y="0" />
  1694. </TransformGroup>
  1695. </Ellipse.RenderTransform>
  1696. <Ellipse.StrokeDashArray>
  1697. <MultiBinding Converter="{StaticResource Style3Arc}">
  1698. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1699. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1700. </MultiBinding>
  1701. </Ellipse.StrokeDashArray>
  1702. </Ellipse>
  1703. <Ellipse
  1704. Width="80"
  1705. Height="80"
  1706. Stroke="{DynamicResource ProgressBar.Progress.圆形红.UnSelect}"
  1707. StrokeThickness="10" />
  1708. <Ellipse
  1709. Width="80"
  1710. Height="80"
  1711. RenderTransformOrigin="0.5,0.5"
  1712. Stroke="{DynamicResource ProgressBar.Progress.圆形红.Select}"
  1713. StrokeDashCap="Flat"
  1714. StrokeThickness="10">
  1715. <Ellipse.RenderTransform>
  1716. <RotateTransform Angle="-90" />
  1717. </Ellipse.RenderTransform>
  1718. <Ellipse.StrokeDashArray>
  1719. <MultiBinding Converter="{StaticResource Style3Arc}">
  1720. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1721. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1722. </MultiBinding>
  1723. </Ellipse.StrokeDashArray>
  1724. </Ellipse>
  1725. <TextBlock
  1726. HorizontalAlignment="Center"
  1727. VerticalAlignment="Center"
  1728. FontFamily="Fonts/#Quartz M"
  1729. FontSize="20"
  1730. Foreground="{DynamicResource ProgressBar.Progress.圆形红.Text}"
  1731. Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat=\{0\}%}" />
  1732. </Grid>
  1733. <ControlTemplate.Triggers>
  1734. <EventTrigger RoutedEvent="Loaded">
  1735. <BeginStoryboard Storyboard="{StaticResource maindh}" />
  1736. </EventTrigger>
  1737. <Trigger Property="IsEnabled" Value="True">
  1738. <Trigger.EnterActions>
  1739. <BeginStoryboard Storyboard="{StaticResource maindh}" />
  1740. </Trigger.EnterActions>
  1741. </Trigger>
  1742. </ControlTemplate.Triggers>
  1743. </ControlTemplate>
  1744. </Setter.Value>
  1745. </Setter>
  1746. </Style>
  1747. <Style TargetType="{x:Type ctrl:TheProgressBar}">
  1748. <Setter Property="Foreground" Value="{StaticResource ProgressBar.Progress}" />
  1749. <Setter Property="Background" Value="{StaticResource ProgressBar.Background}" />
  1750. <Setter Property="BorderBrush" Value="{StaticResource ProgressBar.Border}" />
  1751. <Setter Property="BorderThickness" Value="1" />
  1752. <Setter Property="Height" Value="16" />
  1753. <Setter Property="Template">
  1754. <Setter.Value>
  1755. <ControlTemplate TargetType="{x:Type ProgressBar}">
  1756. <ControlTemplate.Resources>
  1757. <Storyboard x:Key="maindh" RepeatBehavior="Forever">
  1758. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="dh" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
  1759. <EasingDoubleKeyFrame KeyTime="0" Value="0.25" />
  1760. <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.25" />
  1761. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="0.25" />
  1762. </DoubleAnimationUsingKeyFrames>
  1763. <PointAnimationUsingKeyFrames Storyboard.TargetName="dh" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)">
  1764. <EasingPointKeyFrame KeyTime="0" Value="-0.5,0.5" />
  1765. <EasingPointKeyFrame KeyTime="0:0:1" Value="0.5,0.5" />
  1766. <EasingPointKeyFrame KeyTime="0:0:2" Value="1.5,0.5" />
  1767. </PointAnimationUsingKeyFrames>
  1768. </Storyboard>
  1769. </ControlTemplate.Resources>
  1770. <Grid x:Name="TemplateRoot">
  1771. <Border
  1772. Background="{TemplateBinding Background}"
  1773. BorderBrush="{TemplateBinding BorderBrush}"
  1774. BorderThickness="{TemplateBinding BorderThickness}"
  1775. Opacity="0.3" />
  1776. <Rectangle x:Name="PART_Track" />
  1777. <Grid
  1778. x:Name="PART_Indicator"
  1779. HorizontalAlignment="Left"
  1780. ClipToBounds="true">
  1781. <Rectangle x:Name="dh" Fill="{DynamicResource ProgressBar.动画}">
  1782. <Rectangle.RenderTransform>
  1783. <TransformGroup>
  1784. <ScaleTransform ScaleX="1" ScaleY="1" />
  1785. <SkewTransform AngleX="-45" AngleY="0" />
  1786. <RotateTransform Angle="0" />
  1787. <TranslateTransform X="0" Y="0" />
  1788. </TransformGroup>
  1789. </Rectangle.RenderTransform>
  1790. </Rectangle>
  1791. <Rectangle
  1792. x:Name="Indicator"
  1793. Fill="{TemplateBinding Foreground}"
  1794. Visibility="Collapsed" />
  1795. <Rectangle
  1796. x:Name="Animation"
  1797. Fill="{DynamicResource ProgressBar.动画}"
  1798. RenderTransformOrigin="0.5,0.5">
  1799. <Rectangle.RenderTransform>
  1800. <TransformGroup>
  1801. <ScaleTransform ScaleX="1" ScaleY="1" />
  1802. <SkewTransform AngleX="-45" AngleY="0" />
  1803. <RotateTransform Angle="0" />
  1804. <TranslateTransform X="0" Y="0" />
  1805. </TransformGroup>
  1806. </Rectangle.RenderTransform>
  1807. </Rectangle>
  1808. </Grid>
  1809. <TextBlock
  1810. x:Name="textBlock"
  1811. HorizontalAlignment="Center"
  1812. VerticalAlignment="Center"
  1813. FontFamily="{StaticResource Digital}"
  1814. FontSize="12"
  1815. Foreground="{DynamicResource Titleforeground}"
  1816. Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Value, StringFormat={}百分比: {0} %}"
  1817. Visibility="Visible" />
  1818. <VisualStateManager.VisualStateGroups>
  1819. <VisualStateGroup x:Name="CommonStates">
  1820. <VisualState x:Name="Determinate" />
  1821. <VisualState x:Name="Indeterminate">
  1822. <Storyboard RepeatBehavior="Forever">
  1823. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Animation" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
  1824. <EasingDoubleKeyFrame KeyTime="0" Value="0.25" />
  1825. <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.25" />
  1826. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="0.25" />
  1827. </DoubleAnimationUsingKeyFrames>
  1828. <PointAnimationUsingKeyFrames Storyboard.TargetName="Animation" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)">
  1829. <EasingPointKeyFrame KeyTime="0" Value="-0.5,0.5" />
  1830. <EasingPointKeyFrame KeyTime="0:0:1" Value="0.5,0.5" />
  1831. <EasingPointKeyFrame KeyTime="0:0:2" Value="1.5,0.5" />
  1832. </PointAnimationUsingKeyFrames>
  1833. </Storyboard>
  1834. </VisualState>
  1835. </VisualStateGroup>
  1836. </VisualStateManager.VisualStateGroups>
  1837. </Grid>
  1838. <ControlTemplate.Triggers>
  1839. <Trigger Property="Orientation" Value="Vertical">
  1840. <Setter TargetName="TemplateRoot" Property="LayoutTransform">
  1841. <Setter.Value>
  1842. <RotateTransform Angle="90" />
  1843. </Setter.Value>
  1844. </Setter>
  1845. </Trigger>
  1846. <Trigger Property="IsIndeterminate" Value="true">
  1847. <Setter TargetName="Indicator" Property="Visibility" Value="Collapsed" />
  1848. <Setter TargetName="dh" Property="Visibility" Value="Collapsed" />
  1849. <Setter TargetName="Animation" Property="Visibility" Value="Visible" />
  1850. </Trigger>
  1851. <Trigger Property="IsIndeterminate" Value="False">
  1852. <Setter TargetName="Indicator" Property="Visibility" Value="Visible" />
  1853. <Setter TargetName="dh" Property="Visibility" Value="Visible" />
  1854. <Setter TargetName="Animation" Property="Visibility" Value="Collapsed" />
  1855. </Trigger>
  1856. <EventTrigger RoutedEvent="Loaded">
  1857. <BeginStoryboard Storyboard="{StaticResource maindh}" />
  1858. </EventTrigger>
  1859. </ControlTemplate.Triggers>
  1860. </ControlTemplate>
  1861. </Setter.Value>
  1862. </Setter>
  1863. </Style>
  1864. <Style x:Key="TabItemFocusVisual">
  1865. <Setter Property="Control.Template">
  1866. <Setter.Value>
  1867. <ControlTemplate>
  1868. <Rectangle
  1869. Margin="4,4,4,2"
  1870. SnapsToDevicePixels="true"
  1871. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  1872. StrokeDashArray="1 2"
  1873. StrokeThickness="1" />
  1874. </ControlTemplate>
  1875. </Setter.Value>
  1876. </Setter>
  1877. </Style>
  1878. <Style x:Key="TheTabItem" TargetType="{x:Type TabItem}">
  1879. <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}" />
  1880. <Setter Property="Foreground">
  1881. <Setter.Value>
  1882. #A5FFFFFF
  1883. </Setter.Value>
  1884. </Setter>
  1885. <Setter Property="Padding" Value="6,1,6,1" />
  1886. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  1887. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  1888. <Setter Property="Cursor" Value="Hand" />
  1889. <Setter Property="Template">
  1890. <Setter.Value>
  1891. <ControlTemplate TargetType="{x:Type TabItem}">
  1892. <Border
  1893. x:Name="Bd"
  1894. Height="35"
  1895. Margin="5"
  1896. Padding="{TemplateBinding Padding}"
  1897. BorderThickness="1"
  1898. CornerRadius="2">
  1899. <ContentPresenter
  1900. x:Name="Content"
  1901. HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  1902. VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  1903. ContentSource="Header"
  1904. Cursor="Hand"
  1905. RecognizesAccessKey="True"
  1906. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1907. </Border>
  1908. <ControlTemplate.Triggers>
  1909. <Trigger Property="IsSelected" Value="true">
  1910. <Setter Property="Foreground" Value="{DynamicResource MeunSelectForeground}" />
  1911. <Setter TargetName="Bd" Property="Background">
  1912. <Setter.Value>
  1913. <ImageBrush ImageSource="../Images/Tab4_Select.png" />
  1914. </Setter.Value>
  1915. </Setter>
  1916. </Trigger>
  1917. <Trigger Property="IsSelected" Value="False">
  1918. <Setter Property="Foreground" Value="{DynamicResource MeunUnSelectForeground}" />
  1919. <Setter TargetName="Bd" Property="Background">
  1920. <Setter.Value>
  1921. <ImageBrush ImageSource="../Images/Tab4_No.png" />
  1922. </Setter.Value>
  1923. </Setter>
  1924. </Trigger>
  1925. <Trigger Property="IsMouseOver" Value="True">
  1926. <Setter Property="Foreground" Value="#8f723c" />
  1927. <Setter TargetName="Bd" Property="Background">
  1928. <Setter.Value>
  1929. <ImageBrush ImageSource="../Images/Tab4_Select.png" />
  1930. </Setter.Value>
  1931. </Setter>
  1932. </Trigger>
  1933. </ControlTemplate.Triggers>
  1934. </ControlTemplate>
  1935. </Setter.Value>
  1936. </Setter>
  1937. </Style>
  1938. </ResourceDictionary>