终端一体化运控平台
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.
 
 
 

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