终端一体化运控平台
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

2979 строки
174 KiB

  1. <ResourceDictionary
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
  5. xmlns:Themes1="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
  6. xmlns:con="clr-namespace:BPASmartClient.SCADAControl.Converters"
  7. xmlns:ctrl="clr-namespace:BPASmartClient.SCADAControl.CustomerControls"
  8. xmlns:input="clr-namespace:System.Windows.Input;assembly=PresentationCore">
  9. <SolidColorBrush x:Key="AccentBrush" Color="#2B79E2" />
  10. <SolidColorBrush x:Key="ControlBorderBrush" Color="LightGray" />
  11. <SolidColorBrush x:Key="ControlBackground" Color="White" />
  12. <SolidColorBrush x:Key="ControlForeground" Color="Black" />
  13. <SolidColorBrush x:Key="foreground" Color="#a2c2e8" />
  14. <SolidColorBrush x:Key="borderBrush" Color="#FF074B92" />
  15. <SolidColorBrush x:Key="Titleforeground" Color="#FF07D7FF" />
  16. <SolidColorBrush x:Key="DataGridColumnHeaderColor" Color="#00c2f4" />
  17. <SolidColorBrush x:Key="LabelColor" Color="#FF00EEF3" />
  18. <SolidColorBrush x:Key="MainTitleforeground" Color="#feffff" />
  19. <SolidColorBrush x:Key="ButtonSelectForeground" Color="#4fade8" />
  20. <SolidColorBrush x:Key="ButtonUnSelectForeground" Color="#3afdff" />
  21. <SolidColorBrush x:Key="MeunSelectForeground" Color="#8f723c" />
  22. <SolidColorBrush x:Key="MeunUnSelectForeground" Color="White" />
  23. <LinearGradientBrush x:Key="NormalBackground" StartPoint="0.5,0" EndPoint="0.5,1">
  24. <GradientStopCollection>
  25. <GradientStop Color="White" />
  26. <GradientStop Offset="0.5" Color="#D0D0D0" />
  27. <GradientStop Offset="1" Color="#E3E3E3" />
  28. </GradientStopCollection>
  29. </LinearGradientBrush>
  30. <con:HalfNumberConverter x:Key="HalfNumber" />
  31. <FontFamily x:Key="Digital">
  32. pack://application:,,,/Fonts/#DS-Digital
  33. </FontFamily>
  34. <Style TargetType="{x:Type ctrl:ArcGauge}">
  35. <Setter Property="Background" Value="#646464" />
  36. <Setter Property="Foreground" Value="Black" />
  37. <Setter Property="Template">
  38. <Setter.Value>
  39. <ControlTemplate TargetType="{x:Type ctrl:ArcGauge}">
  40. <Border Margin="10">
  41. <Grid Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}">
  42. <Ellipse Fill="#FF3B3B3B" />
  43. <Grid Margin="2" RenderTransformOrigin="0.5,0.5">
  44. <Grid.RenderTransform>
  45. <TransformGroup>
  46. <RotateTransform Angle="{Binding Path=Angle, ElementName=PointRotate}" />
  47. </TransformGroup>
  48. </Grid.RenderTransform>
  49. <Ellipse
  50. Width="16"
  51. Height="14"
  52. VerticalAlignment="Top"
  53. Fill="Orange">
  54. <Ellipse.Effect>
  55. <BlurEffect Radius="12" />
  56. </Ellipse.Effect>
  57. </Ellipse>
  58. </Grid>
  59. <Grid
  60. x:Name="bdGrid"
  61. Margin="12"
  62. ClipToBounds="True"
  63. UseLayoutRounding="True">
  64. <Ellipse>
  65. <Ellipse.Fill>
  66. <RadialGradientBrush>
  67. <GradientStop Color="#4D000000" />
  68. </RadialGradientBrush>
  69. </Ellipse.Fill>
  70. </Ellipse>
  71. <Grid>
  72. <Grid.ColumnDefinitions>
  73. <ColumnDefinition />
  74. <ColumnDefinition Width="2*" />
  75. <ColumnDefinition />
  76. </Grid.ColumnDefinitions>
  77. <Grid.RowDefinitions>
  78. <RowDefinition />
  79. <RowDefinition Height="2*" />
  80. <RowDefinition />
  81. </Grid.RowDefinitions>
  82. <Ellipse
  83. Grid.Row="1"
  84. Grid.Column="1"
  85. Stroke="#464646"
  86. StrokeThickness="1" />
  87. <Ellipse
  88. Grid.Row="1"
  89. Grid.Column="1"
  90. Margin="4"
  91. Stroke="#959595"
  92. StrokeThickness="6" />
  93. <Ellipse
  94. Grid.Row="1"
  95. Grid.Column="1"
  96. Margin="14"
  97. Stroke="#464646"
  98. StrokeThickness="1" />
  99. </Grid>
  100. <Grid>
  101. <Grid.RowDefinitions>
  102. <RowDefinition />
  103. <RowDefinition />
  104. </Grid.RowDefinitions>
  105. <Path
  106. Margin="0,30,0,0"
  107. HorizontalAlignment="Center"
  108. Data="M5,0 5,0 10,120 0,120z"
  109. Fill="#0FA9CE"
  110. RenderTransformOrigin="0.5,1"
  111. Stretch="Uniform">
  112. <Path.RenderTransform>
  113. <TransformGroup>
  114. <RotateTransform x:Name="PointRotate" />
  115. </TransformGroup>
  116. </Path.RenderTransform>
  117. </Path>
  118. </Grid>
  119. <Ellipse
  120. Width="28"
  121. Height="28"
  122. Fill="Black">
  123. <Ellipse.Effect>
  124. <DropShadowEffect
  125. BlurRadius="16"
  126. Direction="0"
  127. ShadowDepth="0"
  128. Color="#0FA9CE" />
  129. </Ellipse.Effect>
  130. </Ellipse>
  131. <Border
  132. Margin="0,0,0,12"
  133. Padding="4,2"
  134. HorizontalAlignment="Center"
  135. VerticalAlignment="Bottom"
  136. Background="Black"
  137. BorderBrush="#10ABD1"
  138. BorderThickness="2">
  139. <TextBlock
  140. Width="46"
  141. FontSize="16"
  142. Foreground="White"
  143. Text="{Binding Value, RelativeSource={RelativeSource Mode=TemplatedParent}, StringFormat={}{0:f1}}"
  144. TextAlignment="Center" />
  145. </Border>
  146. </Grid>
  147. </Grid>
  148. </Border>
  149. </ControlTemplate>
  150. </Setter.Value>
  151. </Setter>
  152. </Style>
  153. <Style TargetType="{x:Type ctrl:SwitchButton}">
  154. <Setter Property="Background" Value="{StaticResource ControlBackground}" />
  155. <Setter Property="BorderBrush" Value="LightGray" />
  156. <Setter Property="Foreground" Value="Gray" />
  157. <Setter Property="BorderThickness" Value="0" />
  158. <Setter Property="Template">
  159. <Setter.Value>
  160. <ControlTemplate TargetType="ctrl:SwitchButton">
  161. <Border
  162. Background="{TemplateBinding Background}"
  163. BorderBrush="{TemplateBinding BorderBrush}"
  164. BorderThickness="{TemplateBinding BorderThickness}"
  165. CornerRadius="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ActualHeight, Converter={StaticResource HalfNumber}}">
  166. <Grid>
  167. <Ellipse
  168. x:Name="ELLIPSE"
  169. HorizontalAlignment="Left"
  170. VerticalAlignment="Center"
  171. Fill="Gray"
  172. RenderTransformOrigin="0.5,0.5"
  173. Stroke="{StaticResource ControlBorderBrush}"
  174. StrokeThickness="1">
  175. <Ellipse.RenderTransform>
  176. <TransformGroup>
  177. <TranslateTransform x:Name="TranslateX" X="2" />
  178. </TransformGroup>
  179. </Ellipse.RenderTransform>
  180. </Ellipse>
  181. </Grid>
  182. </Border>
  183. </ControlTemplate>
  184. </Setter.Value>
  185. </Setter>
  186. </Style>
  187. <Style TargetType="ctrl:DigitalNumber">
  188. <Setter Property="Background" Value="#FF1A1E22" />
  189. <Setter Property="Foreground" Value="#FF0AA74D" />
  190. <Setter Property="NumberValue" Value="0.01" />
  191. <Setter Property="FontSize" Value="20" />
  192. <Setter Property="Template">
  193. <Setter.Value>
  194. <ControlTemplate TargetType="ctrl:DigitalNumber">
  195. <Grid Background="{TemplateBinding Background}">
  196. <TextBlock
  197. x:Name="line"
  198. HorizontalAlignment="Center"
  199. VerticalAlignment="Center"
  200. FontFamily="{StaticResource Digital}"
  201. FontSize="{TemplateBinding FontSize}"
  202. Foreground="{TemplateBinding Foreground}"
  203. Text="{Binding NumberValue, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ctrl:DigitalNumber}, Mode=TwoWay}" />
  204. </Grid>
  205. </ControlTemplate>
  206. </Setter.Value>
  207. </Setter>
  208. </Style>
  209. <Style TargetType="{x:Type ctrl:KnobButton}">
  210. <Setter Property="Background" Value="#0068F4" />
  211. <Setter Property="BorderBrush" Value="LightGray" />
  212. <Setter Property="Foreground" Value="Black" />
  213. <Setter Property="FontSize" Value="20" />
  214. <Setter Property="Template">
  215. <Setter.Value>
  216. <ControlTemplate TargetType="ctrl:KnobButton">
  217. <Grid x:Name="bdGrid" Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}">
  218. <Grid Margin="16" RenderTransformOrigin="0.5,0.5">
  219. <Grid.RenderTransform>
  220. <RotateTransform x:Name="rotatevalue" Angle="00" />
  221. </Grid.RenderTransform>
  222. <Ellipse
  223. Margin="4"
  224. Fill="#FFF6F6F6"
  225. Stroke="{StaticResource ControlBorderBrush}">
  226. <Ellipse.Effect>
  227. <DropShadowEffect
  228. BlurRadius="8"
  229. Direction="-90"
  230. ShadowDepth="2"
  231. Color="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Background.(SolidColorBrush.Color)}" />
  232. </Ellipse.Effect>
  233. </Ellipse>
  234. <Ellipse
  235. Width="8"
  236. Height="8"
  237. Margin="12"
  238. VerticalAlignment="Bottom"
  239. Fill="{TemplateBinding Background}" />
  240. </Grid>
  241. <TextBlock
  242. HorizontalAlignment="Center"
  243. VerticalAlignment="Center"
  244. FontSize="{TemplateBinding FontSize}"
  245. Foreground="{TemplateBinding Foreground}"
  246. Text="{Binding Value, RelativeSource={RelativeSource Mode=TemplatedParent}, StringFormat={}{0:F2}}" />
  247. </Grid>
  248. </ControlTemplate>
  249. </Setter.Value>
  250. </Setter>
  251. </Style>
  252. <!--<Style BasedOn="{StaticResource {x:Type Slider}}" TargetType="{x:Type ctrl:TheSlider}">
  253. <Setter Property="Width" Value="140" />
  254. <Setter Property="Maximum" Value="100" />
  255. <Setter Property="IsSnapToTickEnabled" Value="True" />
  256. <Setter Property="Minimum" Value="0" />
  257. <Setter Property="AutoToolTipPlacement" Value="BottomRight" />
  258. <Setter Property="SmallChange" Value="0.1" />
  259. <Setter Property="LargeChange" Value="0.1" />
  260. </Style>-->
  261. <!--<Style TargetType="{x:Type ctrl:TheTextBox}" BasedOn="{StaticResource {x:Type TextBox}}"/>-->
  262. <Style TargetType="{x:Type ctrl:TheTimer}">
  263. <Setter Property="Template">
  264. <Setter.Value>
  265. <ControlTemplate TargetType="{x:Type ctrl:TheTimer}">
  266. <Border
  267. Background="{TemplateBinding Background}"
  268. BorderBrush="{TemplateBinding BorderBrush}"
  269. BorderThickness="{TemplateBinding BorderThickness}">
  270. <Grid>
  271. <Image RenderOptions.BitmapScalingMode="Fant" Source="../Images/timericon.png" />
  272. </Grid>
  273. </Border>
  274. </ControlTemplate>
  275. </Setter.Value>
  276. </Setter>
  277. </Style>
  278. <Style TargetType="{x:Type ctrl:TheButton}">
  279. <Style.Setters>
  280. <Setter Property="VerticalContentAlignment" Value="Center" />
  281. <Setter Property="Cursor" Value="Hand" />
  282. <Setter Property="BorderThickness" Value="0" />
  283. <Setter Property="FontSize" Value="14" />
  284. <Setter Property="BorderBrush" Value="Transparent" />
  285. <Setter Property="Background">
  286. <Setter.Value>
  287. <ImageBrush ImageSource="../Images/button2.png" />
  288. </Setter.Value>
  289. </Setter>
  290. <Setter Property="Foreground" Value="{DynamicResource ButtonSelectForeground}" />
  291. <Setter Property="Height" Value="25" />
  292. <Setter Property="Template">
  293. <Setter.Value>
  294. <ControlTemplate TargetType="{x:Type ctrl:TheButton}">
  295. <Border
  296. x:Name="BD"
  297. Background="{TemplateBinding Background}"
  298. BorderBrush="{TemplateBinding BorderBrush}"
  299. BorderThickness="{TemplateBinding BorderThickness}"
  300. Cursor="Hand">
  301. <StackPanel
  302. HorizontalAlignment="Center"
  303. Cursor="Hand"
  304. Orientation="Horizontal">
  305. <TextBlock
  306. x:Name="textBlock"
  307. Margin="10,0,10,0"
  308. VerticalAlignment="Center"
  309. Cursor="Hand"
  310. FontFamily="{TemplateBinding FontFamily}"
  311. FontSize="{TemplateBinding FontSize}"
  312. FontWeight="{TemplateBinding FontWeight}"
  313. Foreground="{TemplateBinding Foreground}"
  314. Text="{TemplateBinding Content}" />
  315. </StackPanel>
  316. </Border>
  317. <ControlTemplate.Triggers>
  318. <!--<Trigger Property="IsMouseOver" Value="true">
  319. <Setter TargetName="BD" Property="Background" >
  320. <Setter.Value>
  321. <ImageBrush ImageSource="../Images/button2.png" />
  322. </Setter.Value>
  323. </Setter>
  324. -->
  325. <!--<Setter TargetName="textBlock" Property="Foreground" Value="{TemplateBinding Foreground}" />-->
  326. <!--
  327. </Trigger>
  328. <Trigger Property="IsMouseOver" Value="False">
  329. <Setter TargetName="BD" Property="Background" >
  330. <Setter.Value>
  331. <ImageBrush ImageSource="../Images/button2.png" />
  332. </Setter.Value>
  333. </Setter>
  334. -->
  335. <!--<Setter TargetName="textBlock" Property="Foreground" Value="{TemplateBinding Foreground}" />-->
  336. <!--
  337. </Trigger>-->
  338. <Trigger Property="IsEnabled" Value="False">
  339. <Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource ButtonUnSelectForeground}" />
  340. </Trigger>
  341. </ControlTemplate.Triggers>
  342. </ControlTemplate>
  343. </Setter.Value>
  344. </Setter>
  345. </Style.Setters>
  346. </Style>
  347. <Style TargetType="{x:Type ctrl:TheToggleButton}">
  348. <Style.Setters>
  349. <Setter Property="VerticalContentAlignment" Value="Center" />
  350. <Setter Property="Cursor" Value="Hand" />
  351. <Setter Property="BorderThickness" Value="0" />
  352. <Setter Property="FontSize" Value="14" />
  353. <Setter Property="BorderBrush" Value="Transparent" />
  354. <Setter Property="Background">
  355. <Setter.Value>
  356. <ImageBrush ImageSource="../Images/button2.png" />
  357. </Setter.Value>
  358. </Setter>
  359. <Setter Property="Foreground" Value="{DynamicResource ButtonSelectForeground}" />
  360. <Setter Property="Height" Value="25" />
  361. <Setter Property="Template">
  362. <Setter.Value>
  363. <ControlTemplate TargetType="{x:Type ctrl:TheToggleButton}">
  364. <Border
  365. x:Name="BD"
  366. Background="{TemplateBinding Background}"
  367. BorderBrush="{TemplateBinding BorderBrush}"
  368. BorderThickness="{TemplateBinding BorderThickness}"
  369. Cursor="Hand">
  370. <StackPanel
  371. HorizontalAlignment="Center"
  372. Cursor="Hand"
  373. Orientation="Horizontal">
  374. <TextBlock
  375. x:Name="textBlock"
  376. Margin="10,0,10,0"
  377. VerticalAlignment="Center"
  378. Cursor="Hand"
  379. FontFamily="{TemplateBinding FontFamily}"
  380. FontSize="{TemplateBinding FontSize}"
  381. FontWeight="{TemplateBinding FontWeight}"
  382. Foreground="{TemplateBinding Foreground}"
  383. Text="{TemplateBinding Content}" />
  384. </StackPanel>
  385. </Border>
  386. <ControlTemplate.Triggers>
  387. <Trigger Property="IsChecked" Value="true">
  388. <Setter TargetName="BD" Property="Background">
  389. <Setter.Value>
  390. <ImageBrush ImageSource="../Images/button2.png" />
  391. </Setter.Value>
  392. </Setter>
  393. <Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource MeunSelectForeground}" />
  394. </Trigger>
  395. <Trigger Property="IsChecked" Value="False">
  396. <Setter TargetName="BD" Property="Background">
  397. <Setter.Value>
  398. <ImageBrush ImageSource="../Images/button1.png" />
  399. </Setter.Value>
  400. </Setter>
  401. <Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource ButtonSelectForeground}" />
  402. </Trigger>
  403. <Trigger Property="IsEnabled" Value="False">
  404. <Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource ButtonUnSelectForeground}" />
  405. </Trigger>
  406. </ControlTemplate.Triggers>
  407. </ControlTemplate>
  408. </Setter.Value>
  409. </Setter>
  410. </Style.Setters>
  411. </Style>
  412. <Style TargetType="{x:Type ctrl:TheTextBox}">
  413. <Setter Property="BorderBrush" Value="{DynamicResource borderBrush}" />
  414. <Setter Property="BorderThickness" Value="1" />
  415. <Setter Property="Padding" Value="0" />
  416. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  417. <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
  418. <Setter Property="VerticalContentAlignment" Value="Center" />
  419. <Setter Property="Height" Value="24" />
  420. <Setter Property="CaretBrush" Value="White" />
  421. <Setter Property="Padding" Value="0" />
  422. <Setter Property="HorizontalContentAlignment" Value="Left" />
  423. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  424. <Setter Property="AllowDrop" Value="true" />
  425. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  426. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  427. <Setter Property="Template">
  428. <Setter.Value>
  429. <ControlTemplate TargetType="{x:Type TextBox}">
  430. <Themes1:ClassicBorderDecorator
  431. x:Name="Bd"
  432. Background="{TemplateBinding Background}"
  433. BorderBrush="{TemplateBinding BorderBrush}"
  434. BorderStyle="None"
  435. BorderThickness="{TemplateBinding BorderThickness}">
  436. <ScrollViewer x:Name="PART_ContentHost" />
  437. </Themes1:ClassicBorderDecorator>
  438. <ControlTemplate.Triggers>
  439. <Trigger Property="IsEnabled" Value="false">
  440. <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  441. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  442. </Trigger>
  443. </ControlTemplate.Triggers>
  444. </ControlTemplate>
  445. </Setter.Value>
  446. </Setter>
  447. <Style.Triggers>
  448. <MultiTrigger>
  449. <MultiTrigger.Conditions>
  450. <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
  451. <Condition Property="IsSelectionActive" Value="false" />
  452. <Condition Property="IsSelectionActive" Value="false" />
  453. </MultiTrigger.Conditions>
  454. <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
  455. </MultiTrigger>
  456. </Style.Triggers>
  457. </Style>
  458. <Style TargetType="{x:Type ctrl:NumberBox}">
  459. <Setter Property="BorderBrush" Value="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" />
  460. <Setter Property="BorderThickness" Value="1" />
  461. <Setter Property="Padding" Value="0" />
  462. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  463. <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
  464. <Setter Property="VerticalContentAlignment" Value="Center" />
  465. <Setter Property="Height" Value="24" />
  466. <Setter Property="CaretBrush" Value="White" />
  467. <Setter Property="Padding" Value="0" />
  468. <Setter Property="HorizontalContentAlignment" Value="Left" />
  469. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  470. <Setter Property="AllowDrop" Value="true" />
  471. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  472. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  473. <Setter Property="Template">
  474. <Setter.Value>
  475. <ControlTemplate TargetType="{x:Type TextBox}">
  476. <Themes1:ClassicBorderDecorator
  477. x:Name="Bd"
  478. BorderBrush="{DynamicResource borderBrush}"
  479. BorderStyle="None"
  480. BorderThickness="1">
  481. <ScrollViewer x:Name="PART_ContentHost" />
  482. </Themes1:ClassicBorderDecorator>
  483. <ControlTemplate.Triggers>
  484. <Trigger Property="IsEnabled" Value="false">
  485. <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  486. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  487. </Trigger>
  488. </ControlTemplate.Triggers>
  489. </ControlTemplate>
  490. </Setter.Value>
  491. </Setter>
  492. <Style.Triggers>
  493. <MultiTrigger>
  494. <MultiTrigger.Conditions>
  495. <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
  496. <Condition Property="IsSelectionActive" Value="false" />
  497. <Condition Property="IsSelectionActive" Value="false" />
  498. </MultiTrigger.Conditions>
  499. <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
  500. </MultiTrigger>
  501. </Style.Triggers>
  502. </Style>
  503. <Style TargetType="{x:Type ctrl:TheTextBlock}">
  504. <Style.Setters>
  505. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  506. <Setter Property="HorizontalAlignment" Value="Left" />
  507. <Setter Property="VerticalAlignment" Value="Center" />
  508. <Setter Property="FontSize" Value="20" />
  509. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  510. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  511. <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
  512. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  513. <Setter Property="AllowDrop" Value="true" />
  514. <Setter Property="TextWrapping" Value="Wrap" />
  515. </Style.Setters>
  516. </Style>
  517. <Style x:Key="DesignToggleButton" TargetType="ToggleButton">
  518. <Setter Property="Foreground" Value="{StaticResource ControlForeground}" />
  519. <Setter Property="Template">
  520. <Setter.Value>
  521. <ControlTemplate TargetType="ToggleButton">
  522. <Border
  523. Background="{StaticResource NormalBackground}"
  524. BorderBrush="{StaticResource ControlBorderBrush}"
  525. BorderThickness="1"
  526. CornerRadius="2">
  527. <TextBlock
  528. HorizontalAlignment="Center"
  529. VerticalAlignment="Center"
  530. FontSize="{TemplateBinding FontSize}"
  531. FontWeight="{TemplateBinding FontWeight}"
  532. Text="{TemplateBinding Content}" />
  533. </Border>
  534. </ControlTemplate>
  535. </Setter.Value>
  536. </Setter>
  537. </Style>
  538. <Style x:Key="ExecuteToggleButton" TargetType="ToggleButton">
  539. <Setter Property="Foreground" Value="{StaticResource ControlForeground}" />
  540. <Setter Property="Template">
  541. <Setter.Value>
  542. <ControlTemplate TargetType="ToggleButton">
  543. <Border
  544. x:Name="bd"
  545. Background="{StaticResource NormalBackground}"
  546. BorderBrush="{StaticResource ControlBorderBrush}"
  547. BorderThickness="1"
  548. CornerRadius="2">
  549. <TextBlock
  550. HorizontalAlignment="Center"
  551. VerticalAlignment="Center"
  552. FontSize="{TemplateBinding FontSize}"
  553. FontWeight="{TemplateBinding FontWeight}"
  554. Text="{TemplateBinding Content}" />
  555. </Border>
  556. <ControlTemplate.Triggers>
  557. <Trigger Property="IsChecked" Value="True">
  558. <Setter TargetName="bd" Property="Background">
  559. <Setter.Value>
  560. <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
  561. <GradientStopCollection>
  562. <GradientStop Color="#6AD456" />
  563. <GradientStop Offset="0.5" Color="#1DAE06" />
  564. <GradientStop Offset="1" Color="#8BDC7C" />
  565. </GradientStopCollection>
  566. </LinearGradientBrush>
  567. </Setter.Value>
  568. </Setter>
  569. </Trigger>
  570. </ControlTemplate.Triggers>
  571. </ControlTemplate>
  572. </Setter.Value>
  573. </Setter>
  574. </Style>
  575. <Style TargetType="{x:Type ctrl:WaveProgressBar}">
  576. <Setter Property="BorderBrush" Value="{StaticResource borderBrush}" />
  577. <Setter Property="BorderThickness" Value="1" />
  578. <Setter Property="WaveFill" Value="{StaticResource borderBrush}" />
  579. <Setter Property="WaveThickness" Value="2" />
  580. <Setter Property="WaveStroke" Value="{StaticResource borderBrush}" />
  581. <Setter Property="ShowText" Value="True" />
  582. <Setter Property="FontSize" Value="20" />
  583. <Setter Property="Foreground" Value="{StaticResource MeunSelectForeground}" />
  584. <Setter Property="Background" Value="Transparent" />
  585. <Setter Property="Template">
  586. <Setter.Value>
  587. <ControlTemplate TargetType="ctrl:WaveProgressBar">
  588. <ControlTemplate.Resources>
  589. <Storyboard x:Key="StoryboardOnLoaded" RepeatBehavior="Forever">
  590. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_Wave" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)">
  591. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="-400" />
  592. </DoubleAnimationUsingKeyFrames>
  593. </Storyboard>
  594. </ControlTemplate.Resources>
  595. <StackPanel>
  596. <Border Background="{TemplateBinding Background}">
  597. <Viewbox>
  598. <Border
  599. x:Name="PART_Clip"
  600. Width="200"
  601. Height="200"
  602. BorderBrush="{TemplateBinding BorderBrush}"
  603. BorderThickness="{TemplateBinding BorderThickness}"
  604. ClipToBounds="True"
  605. CornerRadius="100">
  606. <Border.Clip>
  607. <EllipseGeometry
  608. Center="100,100"
  609. RadiusX="100"
  610. RadiusY="100" />
  611. </Border.Clip>
  612. <Grid>
  613. <Path
  614. x:Name="PART_Wave"
  615. Width="600"
  616. Height="250"
  617. Margin="0,0,-400,-20"
  618. HorizontalAlignment="Left"
  619. VerticalAlignment="Top"
  620. ClipToBounds="True"
  621. Fill="{TemplateBinding WaveFill}"
  622. RenderTransformOrigin="0.5,0.5"
  623. Stretch="Fill"
  624. Stroke="{TemplateBinding WaveStroke}"
  625. StrokeThickness="{TemplateBinding WaveThickness}"
  626. UseLayoutRounding="False">
  627. <Path.Data>
  628. <PathGeometry>
  629. <PathFigure StartPoint="0,1">
  630. <PolyBezierSegment Points="0.5,1 0.5,0 1,0" />
  631. <PolyBezierSegment Points="1.5,0 1.5,1 2,1" />
  632. <PolyBezierSegment Points="2.5,1 2.5,0 3,0" />
  633. <PolyLineSegment Points="3,0 3,10, 0,10 0,1" />
  634. </PathFigure>
  635. </PathGeometry>
  636. </Path.Data>
  637. </Path>
  638. <TextBlock
  639. HorizontalAlignment="Center"
  640. VerticalAlignment="Center"
  641. FontFamily="{StaticResource Digital}"
  642. FontSize="{TemplateBinding FontSize}"
  643. Foreground="{TemplateBinding Foreground}"
  644. Text="{Binding Value, RelativeSource={RelativeSource Mode=TemplatedParent}, StringFormat={}{0:f2}%}"
  645. Visibility="{Binding ShowText, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static con:BoolToVisibilityConverter.Instance}}" />
  646. </Grid>
  647. </Border>
  648. </Viewbox>
  649. </Border>
  650. </StackPanel>
  651. <ControlTemplate.Triggers>
  652. <EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="PART_Wave">
  653. <BeginStoryboard Name="BeginStoryboardWave" Storyboard="{StaticResource StoryboardOnLoaded}" />
  654. </EventTrigger>
  655. <EventTrigger RoutedEvent="FrameworkElement.Unloaded" SourceName="PART_Wave">
  656. <StopStoryboard BeginStoryboardName="BeginStoryboardWave" />
  657. </EventTrigger>
  658. </ControlTemplate.Triggers>
  659. </ControlTemplate>
  660. </Setter.Value>
  661. </Setter>
  662. </Style>
  663. <Style TargetType="{x:Type ctrl:StatusLight}">
  664. <Setter Property="Template">
  665. <Setter.Value>
  666. <ControlTemplate TargetType="{x:Type ctrl:StatusLight}">
  667. <Border Width="{Binding Path=ActualHeight, RelativeSource={RelativeSource Self}}">
  668. <Grid>
  669. <Image
  670. x:Name="ima"
  671. RenderOptions.BitmapScalingMode="Fant"
  672. Source="../Images/State0.png" />
  673. </Grid>
  674. </Border>
  675. </ControlTemplate>
  676. </Setter.Value>
  677. </Setter>
  678. </Style>
  679. <Style TargetType="{x:Type ctrl:TheCheckBox}">
  680. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  681. <Setter Property="VerticalContentAlignment" Value="Center" />
  682. <Setter Property="FocusVisualStyle">
  683. <Setter.Value>
  684. <Style>
  685. <Setter Property="Control.Template">
  686. <Setter.Value>
  687. <ControlTemplate>
  688. <Rectangle
  689. Margin="1"
  690. SnapsToDevicePixels="True"
  691. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  692. StrokeDashArray="1 2"
  693. StrokeThickness="1" />
  694. </ControlTemplate>
  695. </Setter.Value>
  696. </Setter>
  697. </Style>
  698. </Setter.Value>
  699. </Setter>
  700. <Setter Property="Template">
  701. <Setter.Value>
  702. <ControlTemplate TargetType="{x:Type CheckBox}">
  703. <StackPanel
  704. Background="Transparent"
  705. Orientation="Horizontal"
  706. SnapsToDevicePixels="True">
  707. <Grid>
  708. <Image
  709. Width="12"
  710. Height="14"
  711. Source="../Images/Cb_HalfChecked.png" />
  712. <Image
  713. x:Name="image1"
  714. Width="12"
  715. Height="14"
  716. Source="../Images/Cb_HalfChecked.png" />
  717. </Grid>
  718. <ContentPresenter
  719. Margin="{TemplateBinding Padding}"
  720. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  721. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  722. Content="{TemplateBinding Content}"
  723. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  724. RecognizesAccessKey="True"
  725. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  726. </StackPanel>
  727. <ControlTemplate.Triggers>
  728. <Trigger Property="HasContent" Value="True">
  729. <Setter Property="FocusVisualStyle">
  730. <Setter.Value>
  731. <Style>
  732. <Setter Property="Control.Template">
  733. <Setter.Value>
  734. <ControlTemplate>
  735. <Rectangle
  736. Margin="14,0,0,0"
  737. SnapsToDevicePixels="True"
  738. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  739. StrokeDashArray="1 2"
  740. StrokeThickness="1" />
  741. </ControlTemplate>
  742. </Setter.Value>
  743. </Setter>
  744. </Style>
  745. </Setter.Value>
  746. </Setter>
  747. <Setter Property="Padding" Value="4,0,0,0" />
  748. </Trigger>
  749. <Trigger Property="IsEnabled" Value="False">
  750. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  751. </Trigger>
  752. <Trigger Property="IsChecked" Value="true">
  753. <Setter TargetName="image1" Property="Source" Value="../Images/Cb_Checked.png" />
  754. </Trigger>
  755. <Trigger Property="IsChecked" Value="{x:Null}">
  756. <Setter TargetName="image1" Property="Source" Value="../Images/Cb_HalfChecked.png" />
  757. </Trigger>
  758. </ControlTemplate.Triggers>
  759. </ControlTemplate>
  760. </Setter.Value>
  761. </Setter>
  762. </Style>
  763. <Style x:Key="ComboBoxFocusVisual">
  764. <Setter Property="Control.Template">
  765. <Setter.Value>
  766. <ControlTemplate>
  767. <Rectangle
  768. Margin="4,4,21,4"
  769. SnapsToDevicePixels="true"
  770. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  771. StrokeDashArray="1 2"
  772. StrokeThickness="1" />
  773. </ControlTemplate>
  774. </Setter.Value>
  775. </Setter>
  776. </Style>
  777. <Geometry x:Key="DownArrowGeometry">M 0 0 L 3.5 4 L 7 0 Z</Geometry>
  778. <Style x:Key="ComboBoxTransparentButtonStyle" TargetType="{x:Type ToggleButton}">
  779. <Setter Property="MinWidth" Value="0" />
  780. <Setter Property="MinHeight" Value="0" />
  781. <Setter Property="Width" Value="Auto" />
  782. <Setter Property="Height" Value="Auto" />
  783. <Setter Property="Background" Value="Transparent" />
  784. <Setter Property="Foreground" Value="White" />
  785. <Setter Property="BorderBrush" Value="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" />
  786. <Setter Property="BorderThickness" Value="2" />
  787. <Setter Property="Template">
  788. <Setter.Value>
  789. <ControlTemplate TargetType="{x:Type ToggleButton}">
  790. <DockPanel
  791. Background="{TemplateBinding Background}"
  792. LastChildFill="false"
  793. SnapsToDevicePixels="true">
  794. <Themes1:ClassicBorderDecorator
  795. x:Name="Border"
  796. Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
  797. BorderBrush="{TemplateBinding BorderBrush}"
  798. BorderStyle="None"
  799. BorderThickness="{TemplateBinding BorderThickness}"
  800. DockPanel.Dock="Right">
  801. <Path
  802. HorizontalAlignment="Center"
  803. VerticalAlignment="Center"
  804. Data="{StaticResource DownArrowGeometry}"
  805. Fill="{TemplateBinding Foreground}" />
  806. </Themes1:ClassicBorderDecorator>
  807. </DockPanel>
  808. <ControlTemplate.Triggers>
  809. <Trigger Property="IsChecked" Value="true">
  810. <Setter TargetName="Border" Property="BorderStyle" Value="AltPressed" />
  811. </Trigger>
  812. </ControlTemplate.Triggers>
  813. </ControlTemplate>
  814. </Setter.Value>
  815. </Setter>
  816. <Style.Triggers>
  817. <Trigger Property="IsEnabled" Value="false">
  818. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" />
  819. </Trigger>
  820. </Style.Triggers>
  821. </Style>
  822. <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
  823. <Setter Property="OverridesDefaultStyle" Value="true" />
  824. <Setter Property="AllowDrop" Value="true" />
  825. <Setter Property="MinWidth" Value="0" />
  826. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  827. <Setter Property="MinHeight" Value="0" />
  828. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  829. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  830. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  831. <Setter Property="Template">
  832. <Setter.Value>
  833. <ControlTemplate TargetType="{x:Type TextBox}">
  834. <ScrollViewer
  835. x:Name="PART_ContentHost"
  836. Background="Transparent"
  837. Focusable="false"
  838. HorizontalScrollBarVisibility="Hidden"
  839. VerticalScrollBarVisibility="Hidden" />
  840. </ControlTemplate>
  841. </Setter.Value>
  842. </Setter>
  843. </Style>
  844. <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
  845. <Border
  846. Background="{TemplateBinding Background}"
  847. BorderBrush="{TemplateBinding BorderBrush}"
  848. BorderThickness="{TemplateBinding BorderThickness}"
  849. SnapsToDevicePixels="true">
  850. <Grid>
  851. <Themes1:ClassicBorderDecorator
  852. x:Name="Border"
  853. BorderBrush="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}"
  854. BorderStyle="None"
  855. BorderThickness="2">
  856. <Popup
  857. x:Name="PART_Popup"
  858. AllowsTransparency="true"
  859. Focusable="False"
  860. IsOpen="{TemplateBinding IsDropDownOpen}"
  861. Placement="Bottom"
  862. PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
  863. <Themes1:SystemDropShadowChrome
  864. x:Name="Shdw"
  865. MinWidth="{Binding ActualWidth, ElementName=Border}"
  866. MaxHeight="{TemplateBinding MaxDropDownHeight}"
  867. Color="Transparent">
  868. <Border
  869. x:Name="DropDownBorder"
  870. BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
  871. BorderThickness="1">
  872. <Border.Background>
  873. <ImageBrush
  874. ImageSource="../Images/nbbj.png"
  875. Opacity="0.5"
  876. Stretch="Fill" />
  877. </Border.Background>
  878. <ScrollViewer x:Name="DropDownScrollViewer">
  879. <Grid RenderOptions.ClearTypeHint="Enabled">
  880. <Canvas
  881. Width="0"
  882. Height="0"
  883. HorizontalAlignment="Left"
  884. VerticalAlignment="Top">
  885. <Rectangle
  886. x:Name="OpaqueRect"
  887. Width="{Binding ActualWidth, ElementName=DropDownBorder}"
  888. Height="{Binding ActualHeight, ElementName=DropDownBorder}"
  889. Fill="{Binding Background, ElementName=DropDownBorder}" />
  890. </Canvas>
  891. <ItemsPresenter
  892. x:Name="ItemsPresenter"
  893. KeyboardNavigation.DirectionalNavigation="Contained"
  894. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  895. </Grid>
  896. </ScrollViewer>
  897. </Border>
  898. </Themes1:SystemDropShadowChrome>
  899. </Popup>
  900. </Themes1:ClassicBorderDecorator>
  901. <ToggleButton
  902. Width="Auto"
  903. MinWidth="0"
  904. MinHeight="0"
  905. ClickMode="Press"
  906. Focusable="false"
  907. IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  908. Style="{StaticResource ComboBoxTransparentButtonStyle}" />
  909. <DockPanel>
  910. <FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right" />
  911. <TextBox
  912. x:Name="PART_EditableTextBox"
  913. Margin="{TemplateBinding Padding}"
  914. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  915. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  916. CaretBrush="White"
  917. IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
  918. Style="{StaticResource ComboBoxEditableTextBox}" />
  919. </DockPanel>
  920. </Grid>
  921. </Border>
  922. <ControlTemplate.Triggers>
  923. <Trigger Property="HasItems" Value="false">
  924. <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
  925. </Trigger>
  926. <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
  927. <Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
  928. <Setter TargetName="Shdw" Property="Color" Value="#71000000" />
  929. </Trigger>
  930. <Trigger Property="IsEnabled" Value="false">
  931. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  932. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  933. </Trigger>
  934. <MultiTrigger>
  935. <MultiTrigger.Conditions>
  936. <Condition Property="IsGrouping" Value="true" />
  937. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
  938. </MultiTrigger.Conditions>
  939. <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
  940. </MultiTrigger>
  941. <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
  942. <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
  943. <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
  944. </Trigger>
  945. </ControlTemplate.Triggers>
  946. </ControlTemplate>
  947. <Style TargetType="{x:Type ctrl:TheComboBox}">
  948. <Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}" />
  949. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  950. <Setter Property="Background" Value="Transparent" />
  951. <Setter Property="BorderBrush" Value="{DynamicResource borderBrush}" />
  952. <Setter Property="BorderThickness" Value="1" />
  953. <Setter Property="Margin" Value="0,0,0,0" />
  954. <Setter Property="Padding" Value="0" />
  955. <Setter Property="Height" Value="24" />
  956. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
  957. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
  958. <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
  959. <Setter Property="ScrollViewer.PanningMode" Value="Both" />
  960. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  961. <Setter Property="VerticalContentAlignment" Value="Center" />
  962. <Setter Property="IsTextSearchCaseSensitive" Value="true" />
  963. <Setter Property="IsEditable" Value="true" />
  964. <Setter Property="StaysOpenOnEdit" Value="true" />
  965. <Setter Property="Template">
  966. <Setter.Value>
  967. <ControlTemplate TargetType="{x:Type ctrl:TheComboBox}">
  968. <Border
  969. Background="{TemplateBinding Background}"
  970. BorderBrush="{TemplateBinding BorderBrush}"
  971. BorderThickness="{TemplateBinding BorderThickness}"
  972. SnapsToDevicePixels="true">
  973. <Grid>
  974. <Themes1:ClassicBorderDecorator
  975. x:Name="Border"
  976. BorderBrush="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}"
  977. BorderStyle="None"
  978. BorderThickness="2">
  979. <Popup
  980. x:Name="PART_Popup"
  981. AllowsTransparency="true"
  982. Focusable="False"
  983. IsOpen="{TemplateBinding IsDropDownOpen}"
  984. Placement="Bottom"
  985. PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
  986. <Themes1:SystemDropShadowChrome
  987. x:Name="Shdw"
  988. MinWidth="{Binding ActualWidth, ElementName=Border}"
  989. MaxHeight="{TemplateBinding MaxDropDownHeight}"
  990. Color="Transparent">
  991. <Border
  992. x:Name="DropDownBorder"
  993. BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
  994. BorderThickness="1">
  995. <Border.Background>
  996. <ImageBrush ImageSource="../Images/nbbj.png" />
  997. </Border.Background>
  998. <ScrollViewer x:Name="DropDownScrollViewer">
  999. <Grid RenderOptions.ClearTypeHint="Enabled">
  1000. <Canvas
  1001. Width="0"
  1002. Height="0"
  1003. HorizontalAlignment="Left"
  1004. VerticalAlignment="Top">
  1005. <Rectangle
  1006. x:Name="OpaqueRect"
  1007. Width="{Binding ActualWidth, ElementName=DropDownBorder}"
  1008. Height="{Binding ActualHeight, ElementName=DropDownBorder}"
  1009. Fill="{Binding Background, ElementName=DropDownBorder}" />
  1010. </Canvas>
  1011. <ItemsPresenter
  1012. x:Name="ItemsPresenter"
  1013. KeyboardNavigation.DirectionalNavigation="Contained"
  1014. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1015. </Grid>
  1016. </ScrollViewer>
  1017. </Border>
  1018. </Themes1:SystemDropShadowChrome>
  1019. </Popup>
  1020. </Themes1:ClassicBorderDecorator>
  1021. <DockPanel Margin="2">
  1022. <FrameworkElement Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" DockPanel.Dock="Right" />
  1023. <Border x:Name="SelectedItemBorder" Margin="{TemplateBinding Padding}">
  1024. <ContentPresenter
  1025. Margin="1,1,1,1"
  1026. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1027. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1028. Content="{TemplateBinding SelectionBoxItem}"
  1029. ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
  1030. ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
  1031. ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
  1032. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1033. </Border>
  1034. </DockPanel>
  1035. <ToggleButton
  1036. Width="Auto"
  1037. MinWidth="0"
  1038. MinHeight="0"
  1039. Margin="2"
  1040. ClickMode="Press"
  1041. Focusable="false"
  1042. IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  1043. Style="{StaticResource ComboBoxTransparentButtonStyle}" />
  1044. </Grid>
  1045. </Border>
  1046. <ControlTemplate.Triggers>
  1047. <MultiTrigger>
  1048. <MultiTrigger.Conditions>
  1049. <!--<Condition Property="IsSelectionBoxHighlighted" Value="true"/>-->
  1050. <Condition Property="IsDropDownOpen" Value="false" />
  1051. </MultiTrigger.Conditions>
  1052. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  1053. </MultiTrigger>
  1054. <!--<Trigger Property="IsSelectionBoxHighlighted" Value="true">
  1055. <Setter Property="Background" TargetName="SelectedItemBorder" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
  1056. </Trigger>-->
  1057. <Trigger Property="HasItems" Value="false">
  1058. <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" />
  1059. </Trigger>
  1060. <Trigger Property="IsEnabled" Value="false">
  1061. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  1062. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  1063. </Trigger>
  1064. <MultiTrigger>
  1065. <MultiTrigger.Conditions>
  1066. <Condition Property="IsGrouping" Value="true" />
  1067. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
  1068. </MultiTrigger.Conditions>
  1069. <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
  1070. </MultiTrigger>
  1071. <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
  1072. <Setter TargetName="Shdw" Property="Margin" Value="0,0,5,5" />
  1073. <Setter TargetName="Shdw" Property="Color" Value="#71000000" />
  1074. </Trigger>
  1075. <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
  1076. <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
  1077. <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
  1078. </Trigger>
  1079. </ControlTemplate.Triggers>
  1080. </ControlTemplate>
  1081. </Setter.Value>
  1082. </Setter>
  1083. <Style.Triggers>
  1084. <Trigger Property="IsEditable" Value="true">
  1085. <Setter Property="IsTabStop" Value="false" />
  1086. <Setter Property="Padding" Value="1" />
  1087. <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
  1088. </Trigger>
  1089. </Style.Triggers>
  1090. </Style>
  1091. <Style TargetType="{x:Type ctrl:TheDataGrid}">
  1092. <Setter Property="AutoGenerateColumns" Value="False" />
  1093. <Setter Property="Background" Value="Transparent" />
  1094. <Setter Property="CanUserAddRows" Value="False" />
  1095. <Setter Property="CanUserDeleteRows" Value="False" />
  1096. <Setter Property="BorderThickness" Value="0" />
  1097. <Setter Property="HeadersVisibility" Value="Column" />
  1098. <Setter Property="GridLinesVisibility" Value="None" />
  1099. <Setter Property="SelectionMode" Value="Single" />
  1100. <!--<Setter Property="Template">
  1101. <Setter.Value>
  1102. <ControlTemplate TargetType="ctrl:TheDataGrid">
  1103. <Border BorderBrush="{StaticResource ControlBorderBrush}" BorderThickness="1" Background="{StaticResource ControlBackground}">
  1104. <TextBlock Margin="4 0 0 0" Text="{TemplateBinding Text}" VerticalAlignment="Center" Foreground="BlueViolet"/>
  1105. </Border>
  1106. </ControlTemplate>
  1107. </Setter.Value>
  1108. </Setter>-->
  1109. </Style>
  1110. <Style TargetType="{x:Type DataGridRow}">
  1111. <Setter Property="Background" Value="Transparent" />
  1112. <Setter Property="HorizontalContentAlignment" Value="Center" />
  1113. <Setter Property="HorizontalAlignment" Value="Right" />
  1114. <Setter Property="SnapsToDevicePixels" Value="true" />
  1115. <Setter Property="Foreground" Value="#abf4ff" />
  1116. <Setter Property="BorderBrush" Value="#abf4ff" />
  1117. <Setter Property="FontSize" Value="14" />
  1118. <Setter Property="Template">
  1119. <Setter.Value>
  1120. <ControlTemplate TargetType="{x:Type DataGridRow}">
  1121. <Border
  1122. x:Name="DGR_Border"
  1123. BorderThickness="{TemplateBinding BorderThickness}"
  1124. SnapsToDevicePixels="True">
  1125. <SelectiveScrollingGrid x:Name="selectiveScrollingGrid">
  1126. <SelectiveScrollingGrid.ColumnDefinitions>
  1127. <ColumnDefinition Width="Auto" />
  1128. <ColumnDefinition Width="*" />
  1129. </SelectiveScrollingGrid.ColumnDefinitions>
  1130. <SelectiveScrollingGrid.RowDefinitions>
  1131. <RowDefinition Height="*" />
  1132. <RowDefinition Height="Auto" />
  1133. </SelectiveScrollingGrid.RowDefinitions>
  1134. <DataGridCellsPresenter
  1135. Grid.Column="1"
  1136. ItemsPanel="{TemplateBinding ItemsPanel}"
  1137. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1138. <DataGridDetailsPresenter
  1139. Grid.Row="1"
  1140. Grid.Column="1"
  1141. SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding AreRowDetailsFrozen, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
  1142. Visibility="{TemplateBinding DetailsVisibility}" />
  1143. <DataGridRowHeader
  1144. Grid.RowSpan="2"
  1145. SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
  1146. Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
  1147. </SelectiveScrollingGrid>
  1148. <VisualStateManager.VisualStateGroups>
  1149. <VisualStateGroup x:Name="CommonStates">
  1150. <VisualState x:Name="Normal" />
  1151. <VisualState x:Name="MouseOver">
  1152. <Storyboard>
  1153. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DGR_Border" Storyboard.TargetProperty="(Panel.Background)">
  1154. <DiscreteObjectKeyFrame KeyTime="0">
  1155. <DiscreteObjectKeyFrame.Value>
  1156. <SolidColorBrush Color="#230077BC" />
  1157. </DiscreteObjectKeyFrame.Value>
  1158. </DiscreteObjectKeyFrame>
  1159. </ObjectAnimationUsingKeyFrames>
  1160. </Storyboard>
  1161. </VisualState>
  1162. <VisualState x:Name="Normal_Selected">
  1163. <Storyboard>
  1164. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DGR_Border" Storyboard.TargetProperty="(Panel.Background)">
  1165. <DiscreteObjectKeyFrame KeyTime="0">
  1166. <DiscreteObjectKeyFrame.Value>
  1167. <SolidColorBrush Color="#3D0077BC" />
  1168. </DiscreteObjectKeyFrame.Value>
  1169. </DiscreteObjectKeyFrame>
  1170. </ObjectAnimationUsingKeyFrames>
  1171. </Storyboard>
  1172. </VisualState>
  1173. </VisualStateGroup>
  1174. <VisualStateGroup x:Name="ValidationStates">
  1175. <VisualState x:Name="Valid" />
  1176. <VisualState x:Name="InvalidFocused" />
  1177. <VisualState x:Name="InvalidUnfocused" />
  1178. </VisualStateGroup>
  1179. </VisualStateManager.VisualStateGroups>
  1180. </Border>
  1181. </ControlTemplate>
  1182. </Setter.Value>
  1183. </Setter>
  1184. </Style>
  1185. <Style TargetType="{x:Type GridSplitter}">
  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 x:Key="ColumnHeaderGripperStyle" TargetType="{x:Type Thumb}">
  1203. <Setter Property="Width" Value="1" />
  1204. <Setter Property="Background" Value="#175c86" />
  1205. <Setter Property="Cursor" Value="SizeWE" />
  1206. <Setter Property="Margin" Value="0,0,0,0" />
  1207. <Setter Property="Template">
  1208. <Setter.Value>
  1209. <ControlTemplate TargetType="{x:Type Thumb}">
  1210. <Border
  1211. Width="{TemplateBinding Width}"
  1212. Margin="{TemplateBinding Margin}"
  1213. Background="{TemplateBinding Background}"
  1214. Opacity="0.4" />
  1215. </ControlTemplate>
  1216. </Setter.Value>
  1217. </Setter>
  1218. </Style>
  1219. <Style TargetType="{x:Type DataGridColumnHeader}">
  1220. <Setter Property="HorizontalContentAlignment" Value="Center" />
  1221. <Setter Property="VerticalContentAlignment" Value="Center" />
  1222. <Setter Property="Height" Value="30" />
  1223. <Setter Property="Background">
  1224. <Setter.Value>
  1225. <ImageBrush ImageSource="../Images/biogebj.png" Opacity="0.2" />
  1226. </Setter.Value>
  1227. </Setter>
  1228. <Setter Property="BorderThickness" Value="0" />
  1229. <Setter Property="Foreground" Value="{DynamicResource DataGridColumnHeaderColor}" />
  1230. <Setter Property="FontSize" Value="14" />
  1231. <Setter Property="Template">
  1232. <Setter.Value>
  1233. <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
  1234. <Grid>
  1235. <Border
  1236. Padding="{TemplateBinding Padding}"
  1237. Background="{TemplateBinding Background}"
  1238. BorderBrush="{TemplateBinding BorderBrush}"
  1239. BorderThickness="{TemplateBinding BorderThickness}">
  1240. <ContentPresenter
  1241. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1242. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1243. RecognizesAccessKey="True"
  1244. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1245. </Border>
  1246. <GridSplitter
  1247. HorizontalAlignment="Right"
  1248. Background="#FF0BAE3F"
  1249. BorderBrush="#FFBD2A2A" />
  1250. <Thumb
  1251. x:Name="PART_RightHeaderGripper"
  1252. Width="2"
  1253. HorizontalAlignment="Right"
  1254. Background="#FF1D9B9E"
  1255. Style="{StaticResource ColumnHeaderGripperStyle}" />
  1256. </Grid>
  1257. </ControlTemplate>
  1258. </Setter.Value>
  1259. </Setter>
  1260. </Style>
  1261. <Style x:Key="DataGridColumnHeader" TargetType="{x:Type DataGridColumnHeader}">
  1262. <Setter Property="HorizontalContentAlignment" Value="Center" />
  1263. <Setter Property="VerticalContentAlignment" Value="Center" />
  1264. <Setter Property="Height" Value="30" />
  1265. <Setter Property="Background">
  1266. <Setter.Value>
  1267. <ImageBrush ImageSource="../Images/databj.png" />
  1268. </Setter.Value>
  1269. </Setter>
  1270. <Setter Property="BorderThickness" Value="0" />
  1271. <Setter Property="Foreground" Value="White" />
  1272. <Setter Property="FontSize" Value="10" />
  1273. <Setter Property="Template">
  1274. <Setter.Value>
  1275. <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
  1276. <Grid>
  1277. <Border
  1278. Padding="{TemplateBinding Padding}"
  1279. Background="{TemplateBinding Background}"
  1280. BorderBrush="{TemplateBinding BorderBrush}"
  1281. BorderThickness="{TemplateBinding BorderThickness}">
  1282. <ContentPresenter
  1283. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1284. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1285. RecognizesAccessKey="True"
  1286. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1287. </Border>
  1288. <Thumb
  1289. x:Name="PART_RightHeaderGripper"
  1290. HorizontalAlignment="Right"
  1291. Style="{StaticResource ColumnHeaderGripperStyle}" />
  1292. </Grid>
  1293. </ControlTemplate>
  1294. </Setter.Value>
  1295. </Setter>
  1296. </Style>
  1297. <Style TargetType="{x:Type DataGridCell}">
  1298. <Setter Property="Background" Value="Transparent" />
  1299. <Setter Property="BorderBrush" Value="#FF31879E" />
  1300. <Setter Property="BorderThickness" Value="0" />
  1301. <Setter Property="Template">
  1302. <Setter.Value>
  1303. <ControlTemplate TargetType="{x:Type DataGridCell}">
  1304. <Border
  1305. Background="{TemplateBinding Background}"
  1306. BorderBrush="{TemplateBinding BorderBrush}"
  1307. BorderThickness="{TemplateBinding BorderThickness}"
  1308. SnapsToDevicePixels="True">
  1309. <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1310. </Border>
  1311. </ControlTemplate>
  1312. </Setter.Value>
  1313. </Setter>
  1314. <Style.Triggers>
  1315. <Trigger Property="IsSelected" Value="True">
  1316. <!--<Setter Property="Background" Value="#FF2281EC"/>-->
  1317. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
  1318. <!--<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>-->
  1319. </Trigger>
  1320. <!--<Trigger Property="IsKeyboardFocusWithin" Value="True">
  1321. <Setter Property="BorderBrush" Value="{DynamicResource {x:Static DataGrid.FocusBorderBrushKey}}"/>
  1322. </Trigger>-->
  1323. <Trigger Property="IsEnabled" Value="false">
  1324. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  1325. </Trigger>
  1326. </Style.Triggers>
  1327. </Style>
  1328. <SolidColorBrush x:Key="ListBorder" Color="#828790" />
  1329. <Style TargetType="{x:Type ctrl:TheListBox}">
  1330. <Setter Property="Background" Value="Transparent" />
  1331. <Setter Property="BorderBrush" Value="{StaticResource ListBorder}" />
  1332. <Setter Property="BorderThickness" Value="0" />
  1333. <Setter Property="Padding" Value="10" />
  1334. <Setter Property="Foreground" Value="White" />
  1335. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
  1336. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
  1337. <Setter Property="ScrollViewer.PanningMode" Value="Both" />
  1338. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  1339. <Setter Property="VerticalContentAlignment" Value="Center" />
  1340. </Style>
  1341. <BorderGapMaskConverter x:Key="BorderGapMaskConverter" />
  1342. <Style TargetType="{x:Type ctrl:TheGroupBox}">
  1343. <Setter Property="BorderThickness" Value="0" />
  1344. <Setter Property="Background" Value="Transparent" />
  1345. <Setter Property="Foreground" Value="{DynamicResource Titleforeground}" />
  1346. <Setter Property="Template">
  1347. <Setter.Value>
  1348. <ControlTemplate TargetType="{x:Type GroupBox}">
  1349. <Grid SnapsToDevicePixels="true">
  1350. <Grid.ColumnDefinitions>
  1351. <ColumnDefinition Width="6" />
  1352. <ColumnDefinition Width="Auto" />
  1353. <ColumnDefinition Width="*" />
  1354. <ColumnDefinition Width="6" />
  1355. </Grid.ColumnDefinitions>
  1356. <Grid.RowDefinitions>
  1357. <RowDefinition Height="Auto" />
  1358. <RowDefinition Height="Auto" />
  1359. <RowDefinition Height="*" />
  1360. <RowDefinition Height="6" />
  1361. </Grid.RowDefinitions>
  1362. <Rectangle Grid.RowSpan="2" Grid.ColumnSpan="4" />
  1363. <Border
  1364. Grid.Row="2"
  1365. Grid.RowSpan="2"
  1366. Grid.ColumnSpan="4"
  1367. Margin="0,0,0,0"
  1368. BorderThickness="0"
  1369. CornerRadius="0" />
  1370. <Image
  1371. Grid.Row="0"
  1372. Grid.RowSpan="2"
  1373. Grid.Column="1"
  1374. Height="4"
  1375. Margin="0,5,0,0"
  1376. HorizontalAlignment="Left"
  1377. Source="../Images/2609.png" />
  1378. <Border
  1379. x:Name="Header"
  1380. Grid.Row="0"
  1381. Grid.RowSpan="2"
  1382. Grid.Column="1"
  1383. Height="30"
  1384. Margin="30,0,0,0"
  1385. Padding="3,1,3,0">
  1386. <ContentPresenter
  1387. VerticalAlignment="Center"
  1388. ContentSource="Header"
  1389. RecognizesAccessKey="True"
  1390. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1391. </Border>
  1392. <ContentPresenter
  1393. Grid.Row="2"
  1394. Grid.Column="1"
  1395. Grid.ColumnSpan="2"
  1396. Margin="{TemplateBinding Padding}"
  1397. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1398. </Grid>
  1399. </ControlTemplate>
  1400. </Setter.Value>
  1401. </Setter>
  1402. </Style>
  1403. <Style x:Key="CheckRadioFocusVisual">
  1404. <Setter Property="Control.Template">
  1405. <Setter.Value>
  1406. <ControlTemplate>
  1407. <Rectangle
  1408. Margin="14,0,0,0"
  1409. SnapsToDevicePixels="true"
  1410. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  1411. StrokeDashArray="1 2"
  1412. StrokeThickness="1" />
  1413. </ControlTemplate>
  1414. </Setter.Value>
  1415. </Setter>
  1416. </Style>
  1417. <Style TargetType="{x:Type ctrl:TheRadioButton}">
  1418. <Setter Property="FocusVisualStyle" Value="{StaticResource CheckRadioFocusVisual}" />
  1419. <Setter Property="Foreground" Value="{DynamicResource foreground}" />
  1420. <Setter Property="VerticalContentAlignment" Value="Center" />
  1421. <Setter Property="Background">
  1422. <Setter.Value>
  1423. <ImageBrush ImageSource="/BPASmartClient.SCADAControl;component/Images/btnkeys.png" />
  1424. </Setter.Value>
  1425. </Setter>
  1426. <Setter Property="Padding" Value="2,0,0,0" />
  1427. <Setter Property="Template">
  1428. <Setter.Value>
  1429. <ControlTemplate TargetType="{x:Type RadioButton}">
  1430. <BulletDecorator VerticalAlignment="Center" Background="Transparent">
  1431. <BulletDecorator.Bullet>
  1432. <Grid>
  1433. <Ellipse
  1434. x:Name="Border"
  1435. Width="10"
  1436. Height="10"
  1437. Fill="{TemplateBinding Background}" />
  1438. <Ellipse
  1439. x:Name="Dot"
  1440. Width="5"
  1441. Height="5"
  1442. Fill="#ff8a03"
  1443. Visibility="Hidden" />
  1444. </Grid>
  1445. </BulletDecorator.Bullet>
  1446. <ContentPresenter
  1447. Margin="{TemplateBinding Padding}"
  1448. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  1449. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  1450. RecognizesAccessKey="True" />
  1451. </BulletDecorator>
  1452. <ControlTemplate.Triggers>
  1453. <Trigger Property="IsChecked" Value="true">
  1454. <Setter TargetName="Dot" Property="Visibility" Value="Visible" />
  1455. </Trigger>
  1456. <Trigger Property="IsChecked" Value="False">
  1457. <Setter TargetName="Dot" Property="Visibility" Value="Collapsed" />
  1458. </Trigger>
  1459. <Trigger Property="IsChecked" Value="{x:Null}">
  1460. <Setter TargetName="Dot" Property="Visibility" Value="Collapsed" />
  1461. </Trigger>
  1462. <Trigger Property="IsPressed" Value="true">
  1463. <Setter TargetName="Border" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  1464. </Trigger>
  1465. <Trigger Property="IsEnabled" Value="false">
  1466. <Setter TargetName="Border" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
  1467. <Setter TargetName="Dot" Property="Fill" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  1468. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  1469. </Trigger>
  1470. </ControlTemplate.Triggers>
  1471. </ControlTemplate>
  1472. </Setter.Value>
  1473. </Setter>
  1474. </Style>
  1475. <SolidColorBrush x:Key="ProgressBar.Progress.圆形蓝.Text" Color="#FF0089E6" />
  1476. <SolidColorBrush x:Key="ProgressBar.Progress.圆形蓝.UnSelect" Color="#330089E6" />
  1477. <SolidColorBrush x:Key="ProgressBar.Progress.圆形蓝.Select" Color="#FF0089E6" />
  1478. <LinearGradientBrush x:Key="ProgressBar.Progress.动画蓝" StartPoint="1,0" EndPoint="0,0">
  1479. <GradientStop Offset="0" Color="#00000000" />
  1480. <GradientStop Offset="0.4" Color="#4C57B9FB" />
  1481. <GradientStop Offset="0.6" Color="#FF57B9FB" />
  1482. <GradientStop Offset="0.8" Color="#4C57B9FB" />
  1483. <GradientStop Offset="1" Color="#00000000" />
  1484. </LinearGradientBrush>
  1485. <SolidColorBrush x:Key="ProgressBar.Progress.圆形绿.Text" Color="#FF00DC00" />
  1486. <SolidColorBrush x:Key="ProgressBar.Progress.圆形绿.UnSelect" Color="#3300DC00" />
  1487. <SolidColorBrush x:Key="ProgressBar.Progress.圆形绿.Select" Color="#FF00DC00" />
  1488. <LinearGradientBrush x:Key="ProgressBar.Progress.动画绿" StartPoint="1,0" EndPoint="0,0">
  1489. <GradientStop Offset="0" Color="#00000000" />
  1490. <GradientStop Offset="0.4" Color="#4C72F972" />
  1491. <GradientStop Offset="0.6" Color="#FF72F972" />
  1492. <GradientStop Offset="0.8" Color="#4C72F972" />
  1493. <GradientStop Offset="1" Color="#00000000" />
  1494. </LinearGradientBrush>
  1495. <SolidColorBrush x:Key="ProgressBar.Progress.圆形红.Text" Color="#FFF10000" />
  1496. <SolidColorBrush x:Key="ProgressBar.Progress.圆形红.UnSelect" Color="#33F10000" />
  1497. <SolidColorBrush x:Key="ProgressBar.Progress.圆形红.Select" Color="#FFF10000" />
  1498. <LinearGradientBrush x:Key="ProgressBar.Progress.动画红" StartPoint="1,0" EndPoint="0,0">
  1499. <GradientStop Offset="0" Color="#00000000" />
  1500. <GradientStop Offset="0.4" Color="#4CFF5858" />
  1501. <GradientStop Offset="0.6" Color="#FFFF5858" />
  1502. <GradientStop Offset="0.8" Color="#4CFF5858" />
  1503. <GradientStop Offset="1" Color="#00000000" />
  1504. </LinearGradientBrush>
  1505. <LinearGradientBrush x:Key="ProgressBar.动画" StartPoint="1,0" EndPoint="0,0">
  1506. <GradientStop Offset="0" Color="#00000000" />
  1507. <GradientStop Offset="0.4" Color="#6F06F11F" />
  1508. <GradientStop Offset="0.6" Color="LightBlue" />
  1509. <GradientStop Offset="0.8" Color="#6F06F11F" />
  1510. <GradientStop Offset="1" Color="#00000000" />
  1511. </LinearGradientBrush>
  1512. <LinearGradientBrush x:Key="ProgressBar.Progress" StartPoint="0,0" EndPoint="1,0">
  1513. <GradientStop Offset="0" Color="#4F05CE10" />
  1514. <GradientStop Offset="1" Color="#6F06F11F" />
  1515. </LinearGradientBrush>
  1516. <SolidColorBrush x:Key="ProgressBar.Background" Color="#072a56" />
  1517. <SolidColorBrush x:Key="ProgressBar.Border" Color="#072a56" />
  1518. <con:Style3DashConverter x:Key="Style3Dash" />
  1519. <con:Style3ArcConverter x:Key="Style3Arc" />
  1520. <Style TargetType="{x:Type ctrl:TheBlueProgressBar}">
  1521. <Setter Property="Width" Value="100" />
  1522. <Setter Property="Height" Value="100" />
  1523. <Setter Property="Template">
  1524. <Setter.Value>
  1525. <ControlTemplate TargetType="{x:Type ProgressBar}">
  1526. <ControlTemplate.Resources>
  1527. <Storyboard x:Key="maindh" RepeatBehavior="Forever">
  1528. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ell动画" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)">
  1529. <EasingDoubleKeyFrame KeyTime="0" Value="-90" />
  1530. <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
  1531. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="90" />
  1532. </DoubleAnimationUsingKeyFrames>
  1533. </Storyboard>
  1534. </ControlTemplate.Resources>
  1535. <Grid>
  1536. <Rectangle
  1537. Fill="#ef426f"
  1538. RadiusX="5"
  1539. RadiusY="5"
  1540. Visibility="Collapsed" />
  1541. <Ellipse
  1542. x:Name="ell动画"
  1543. Width="80"
  1544. Height="80"
  1545. RenderTransformOrigin="0.5,0.5"
  1546. Stroke="{DynamicResource ProgressBar.Progress.动画蓝}"
  1547. StrokeDashCap="Flat"
  1548. StrokeThickness="10">
  1549. <Ellipse.RenderTransform>
  1550. <TransformGroup>
  1551. <!-- 旋转变换 -->
  1552. <RotateTransform Angle="-90" />
  1553. <!-- 缩放变换 -->
  1554. <ScaleTransform ScaleX="1" ScaleY="1" />
  1555. <!-- 倾斜变换 -->
  1556. <SkewTransform AngleX="0" AngleY="0" />
  1557. <!-- 移动变换 -->
  1558. <TranslateTransform X="0" Y="0" />
  1559. </TransformGroup>
  1560. </Ellipse.RenderTransform>
  1561. <Ellipse.StrokeDashArray>
  1562. <MultiBinding Converter="{StaticResource Style3Arc}">
  1563. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1564. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1565. </MultiBinding>
  1566. </Ellipse.StrokeDashArray>
  1567. </Ellipse>
  1568. <Ellipse
  1569. Width="80"
  1570. Height="80"
  1571. Stroke="{DynamicResource ProgressBar.Progress.圆形蓝.UnSelect}"
  1572. StrokeThickness="10" />
  1573. <Ellipse
  1574. Width="80"
  1575. Height="80"
  1576. RenderTransformOrigin="0.5,0.5"
  1577. Stroke="{DynamicResource ProgressBar.Progress.圆形蓝.Select}"
  1578. StrokeDashCap="Flat"
  1579. StrokeThickness="10">
  1580. <Ellipse.RenderTransform>
  1581. <RotateTransform Angle="-90" />
  1582. </Ellipse.RenderTransform>
  1583. <Ellipse.StrokeDashArray>
  1584. <MultiBinding Converter="{StaticResource Style3Arc}">
  1585. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1586. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1587. </MultiBinding>
  1588. </Ellipse.StrokeDashArray>
  1589. </Ellipse>
  1590. <TextBlock
  1591. HorizontalAlignment="Center"
  1592. VerticalAlignment="Center"
  1593. FontFamily="Fonts/#Quartz M"
  1594. FontSize="20"
  1595. Foreground="{DynamicResource ProgressBar.Progress.圆形蓝.Text}"
  1596. Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat={}{0:f1}%}" />
  1597. </Grid>
  1598. <ControlTemplate.Triggers>
  1599. <EventTrigger RoutedEvent="Loaded">
  1600. <BeginStoryboard Storyboard="{StaticResource maindh}" />
  1601. </EventTrigger>
  1602. </ControlTemplate.Triggers>
  1603. </ControlTemplate>
  1604. </Setter.Value>
  1605. </Setter>
  1606. </Style>
  1607. <Style TargetType="{x:Type ctrl:TheGreenProgressBar}">
  1608. <Setter Property="Width" Value="100" />
  1609. <Setter Property="Height" Value="100" />
  1610. <Setter Property="Template">
  1611. <Setter.Value>
  1612. <ControlTemplate TargetType="{x:Type ProgressBar}">
  1613. <ControlTemplate.Resources>
  1614. <Storyboard x:Key="maindh" RepeatBehavior="Forever">
  1615. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ell动画" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)">
  1616. <EasingDoubleKeyFrame KeyTime="0" Value="-90" />
  1617. <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
  1618. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="90" />
  1619. </DoubleAnimationUsingKeyFrames>
  1620. </Storyboard>
  1621. </ControlTemplate.Resources>
  1622. <Grid>
  1623. <Rectangle
  1624. Fill="#ef426f"
  1625. RadiusX="5"
  1626. RadiusY="5"
  1627. Visibility="Collapsed" />
  1628. <Ellipse
  1629. x:Name="ell动画"
  1630. Width="80"
  1631. Height="80"
  1632. RenderTransformOrigin="0.5,0.5"
  1633. Stroke="{DynamicResource ProgressBar.Progress.动画绿}"
  1634. StrokeDashCap="Flat"
  1635. StrokeThickness="10">
  1636. <Ellipse.RenderTransform>
  1637. <TransformGroup>
  1638. <!-- 旋转变换 -->
  1639. <RotateTransform Angle="-90" />
  1640. <!-- 缩放变换 -->
  1641. <ScaleTransform ScaleX="1" ScaleY="1" />
  1642. <!-- 倾斜变换 -->
  1643. <SkewTransform AngleX="0" AngleY="0" />
  1644. <!-- 移动变换 -->
  1645. <TranslateTransform X="0" Y="0" />
  1646. </TransformGroup>
  1647. </Ellipse.RenderTransform>
  1648. <Ellipse.StrokeDashArray>
  1649. <MultiBinding Converter="{StaticResource Style3Arc}">
  1650. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1651. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1652. </MultiBinding>
  1653. </Ellipse.StrokeDashArray>
  1654. </Ellipse>
  1655. <Ellipse
  1656. Width="80"
  1657. Height="80"
  1658. Stroke="{DynamicResource ProgressBar.Progress.圆形绿.UnSelect}"
  1659. StrokeThickness="10" />
  1660. <Ellipse
  1661. Width="80"
  1662. Height="80"
  1663. RenderTransformOrigin="0.5,0.5"
  1664. Stroke="{DynamicResource ProgressBar.Progress.圆形绿.Select}"
  1665. StrokeDashCap="Flat"
  1666. StrokeThickness="10">
  1667. <Ellipse.RenderTransform>
  1668. <RotateTransform Angle="-90" />
  1669. </Ellipse.RenderTransform>
  1670. <Ellipse.StrokeDashArray>
  1671. <MultiBinding Converter="{StaticResource Style3Arc}">
  1672. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1673. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1674. </MultiBinding>
  1675. </Ellipse.StrokeDashArray>
  1676. </Ellipse>
  1677. <TextBlock
  1678. HorizontalAlignment="Center"
  1679. VerticalAlignment="Center"
  1680. FontFamily="Fonts/#Quartz M"
  1681. FontSize="20"
  1682. Foreground="{DynamicResource ProgressBar.Progress.圆形绿.Text}"
  1683. Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat={}{0:f1}%}" />
  1684. </Grid>
  1685. <ControlTemplate.Triggers>
  1686. <EventTrigger RoutedEvent="Loaded">
  1687. <BeginStoryboard Storyboard="{StaticResource maindh}" />
  1688. </EventTrigger>
  1689. </ControlTemplate.Triggers>
  1690. </ControlTemplate>
  1691. </Setter.Value>
  1692. </Setter>
  1693. </Style>
  1694. <Style TargetType="{x:Type ctrl:TheRedProgressBar}">
  1695. <Setter Property="Width" Value="100" />
  1696. <Setter Property="Height" Value="100" />
  1697. <Setter Property="Template">
  1698. <Setter.Value>
  1699. <ControlTemplate TargetType="{x:Type ProgressBar}">
  1700. <ControlTemplate.Resources>
  1701. <Storyboard x:Key="maindh" RepeatBehavior="Forever">
  1702. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ell动画" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)">
  1703. <EasingDoubleKeyFrame KeyTime="0" Value="-90" />
  1704. <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
  1705. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="90" />
  1706. </DoubleAnimationUsingKeyFrames>
  1707. </Storyboard>
  1708. </ControlTemplate.Resources>
  1709. <Grid>
  1710. <Rectangle
  1711. Fill="#ef426f"
  1712. RadiusX="5"
  1713. RadiusY="5"
  1714. Visibility="Collapsed" />
  1715. <Ellipse
  1716. x:Name="ell动画"
  1717. Width="80"
  1718. Height="80"
  1719. RenderTransformOrigin="0.5,0.5"
  1720. Stroke="{DynamicResource ProgressBar.Progress.动画红}"
  1721. StrokeDashCap="Flat"
  1722. StrokeThickness="10">
  1723. <Ellipse.RenderTransform>
  1724. <TransformGroup>
  1725. <!-- 旋转变换 -->
  1726. <RotateTransform Angle="-90" />
  1727. <!-- 缩放变换 -->
  1728. <ScaleTransform ScaleX="1" ScaleY="1" />
  1729. <!-- 倾斜变换 -->
  1730. <SkewTransform AngleX="0" AngleY="0" />
  1731. <!-- 移动变换 -->
  1732. <TranslateTransform X="0" Y="0" />
  1733. </TransformGroup>
  1734. </Ellipse.RenderTransform>
  1735. <Ellipse.StrokeDashArray>
  1736. <MultiBinding Converter="{StaticResource Style3Arc}">
  1737. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1738. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1739. </MultiBinding>
  1740. </Ellipse.StrokeDashArray>
  1741. </Ellipse>
  1742. <Ellipse
  1743. Width="80"
  1744. Height="80"
  1745. Stroke="{DynamicResource ProgressBar.Progress.圆形红.UnSelect}"
  1746. StrokeThickness="10" />
  1747. <Ellipse
  1748. Width="80"
  1749. Height="80"
  1750. RenderTransformOrigin="0.5,0.5"
  1751. Stroke="{DynamicResource ProgressBar.Progress.圆形红.Select}"
  1752. StrokeDashCap="Flat"
  1753. StrokeThickness="10">
  1754. <Ellipse.RenderTransform>
  1755. <RotateTransform Angle="-90" />
  1756. </Ellipse.RenderTransform>
  1757. <Ellipse.StrokeDashArray>
  1758. <MultiBinding Converter="{StaticResource Style3Arc}">
  1759. <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
  1760. <Binding Path="StrokeThickness" RelativeSource="{RelativeSource Self}" />
  1761. </MultiBinding>
  1762. </Ellipse.StrokeDashArray>
  1763. </Ellipse>
  1764. <TextBlock
  1765. HorizontalAlignment="Center"
  1766. VerticalAlignment="Center"
  1767. FontFamily="Fonts/#Quartz M"
  1768. FontSize="20"
  1769. Foreground="{DynamicResource ProgressBar.Progress.圆形红.Text}"
  1770. Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat={}{0:f1}%}" />
  1771. </Grid>
  1772. <ControlTemplate.Triggers>
  1773. <EventTrigger RoutedEvent="Loaded">
  1774. <BeginStoryboard Storyboard="{StaticResource maindh}" />
  1775. </EventTrigger>
  1776. <Trigger Property="IsEnabled" Value="True">
  1777. <Trigger.EnterActions>
  1778. <BeginStoryboard Storyboard="{StaticResource maindh}" />
  1779. </Trigger.EnterActions>
  1780. </Trigger>
  1781. </ControlTemplate.Triggers>
  1782. </ControlTemplate>
  1783. </Setter.Value>
  1784. </Setter>
  1785. </Style>
  1786. <Style TargetType="{x:Type ctrl:TheProgressBar}">
  1787. <Setter Property="Foreground" Value="{StaticResource ProgressBar.Progress}" />
  1788. <Setter Property="Background" Value="{StaticResource ProgressBar.Background}" />
  1789. <Setter Property="BorderBrush" Value="{StaticResource ProgressBar.Border}" />
  1790. <Setter Property="BorderThickness" Value="1" />
  1791. <Setter Property="Height" Value="16" />
  1792. <Setter Property="Template">
  1793. <Setter.Value>
  1794. <ControlTemplate TargetType="{x:Type ProgressBar}">
  1795. <ControlTemplate.Resources>
  1796. <Storyboard x:Key="maindh" RepeatBehavior="Forever">
  1797. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="dh" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
  1798. <EasingDoubleKeyFrame KeyTime="0" Value="0.25" />
  1799. <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.25" />
  1800. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="0.25" />
  1801. </DoubleAnimationUsingKeyFrames>
  1802. <PointAnimationUsingKeyFrames Storyboard.TargetName="dh" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)">
  1803. <EasingPointKeyFrame KeyTime="0" Value="-0.5,0.5" />
  1804. <EasingPointKeyFrame KeyTime="0:0:1" Value="0.5,0.5" />
  1805. <EasingPointKeyFrame KeyTime="0:0:2" Value="1.5,0.5" />
  1806. </PointAnimationUsingKeyFrames>
  1807. </Storyboard>
  1808. </ControlTemplate.Resources>
  1809. <Grid x:Name="TemplateRoot">
  1810. <Border
  1811. Background="{TemplateBinding Background}"
  1812. BorderBrush="{TemplateBinding BorderBrush}"
  1813. BorderThickness="{TemplateBinding BorderThickness}"
  1814. Opacity="0.3" />
  1815. <Rectangle x:Name="PART_Track" />
  1816. <Grid
  1817. x:Name="PART_Indicator"
  1818. HorizontalAlignment="Left"
  1819. ClipToBounds="true">
  1820. <Rectangle x:Name="dh" Fill="{DynamicResource ProgressBar.动画}">
  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. <Rectangle
  1831. x:Name="Indicator"
  1832. Fill="{TemplateBinding Foreground}"
  1833. Visibility="Collapsed" />
  1834. <Rectangle
  1835. x:Name="Animation"
  1836. Fill="{DynamicResource ProgressBar.动画}"
  1837. RenderTransformOrigin="0.5,0.5">
  1838. <Rectangle.RenderTransform>
  1839. <TransformGroup>
  1840. <ScaleTransform ScaleX="1" ScaleY="1" />
  1841. <SkewTransform AngleX="-45" AngleY="0" />
  1842. <RotateTransform Angle="0" />
  1843. <TranslateTransform X="0" Y="0" />
  1844. </TransformGroup>
  1845. </Rectangle.RenderTransform>
  1846. </Rectangle>
  1847. </Grid>
  1848. <TextBlock
  1849. x:Name="textBlock"
  1850. HorizontalAlignment="Center"
  1851. VerticalAlignment="Center"
  1852. FontFamily="{StaticResource Digital}"
  1853. FontSize="12"
  1854. Foreground="{DynamicResource Titleforeground}"
  1855. Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Value, StringFormat={}百分比: {0:f2} %}"
  1856. Visibility="Visible" />
  1857. <VisualStateManager.VisualStateGroups>
  1858. <VisualStateGroup x:Name="CommonStates">
  1859. <VisualState x:Name="Determinate" />
  1860. <VisualState x:Name="Indeterminate">
  1861. <Storyboard RepeatBehavior="Forever">
  1862. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Animation" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
  1863. <EasingDoubleKeyFrame KeyTime="0" Value="0.25" />
  1864. <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.25" />
  1865. <EasingDoubleKeyFrame KeyTime="0:0:2" Value="0.25" />
  1866. </DoubleAnimationUsingKeyFrames>
  1867. <PointAnimationUsingKeyFrames Storyboard.TargetName="Animation" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)">
  1868. <EasingPointKeyFrame KeyTime="0" Value="-0.5,0.5" />
  1869. <EasingPointKeyFrame KeyTime="0:0:1" Value="0.5,0.5" />
  1870. <EasingPointKeyFrame KeyTime="0:0:2" Value="1.5,0.5" />
  1871. </PointAnimationUsingKeyFrames>
  1872. </Storyboard>
  1873. </VisualState>
  1874. </VisualStateGroup>
  1875. </VisualStateManager.VisualStateGroups>
  1876. </Grid>
  1877. <ControlTemplate.Triggers>
  1878. <Trigger Property="Orientation" Value="Vertical">
  1879. <Setter TargetName="TemplateRoot" Property="LayoutTransform">
  1880. <Setter.Value>
  1881. <RotateTransform Angle="90" />
  1882. </Setter.Value>
  1883. </Setter>
  1884. </Trigger>
  1885. <Trigger Property="IsIndeterminate" Value="true">
  1886. <Setter TargetName="Indicator" Property="Visibility" Value="Collapsed" />
  1887. <Setter TargetName="dh" Property="Visibility" Value="Collapsed" />
  1888. <Setter TargetName="Animation" Property="Visibility" Value="Visible" />
  1889. </Trigger>
  1890. <Trigger Property="IsIndeterminate" Value="False">
  1891. <Setter TargetName="Indicator" Property="Visibility" Value="Visible" />
  1892. <Setter TargetName="dh" Property="Visibility" Value="Visible" />
  1893. <Setter TargetName="Animation" Property="Visibility" Value="Collapsed" />
  1894. </Trigger>
  1895. <EventTrigger RoutedEvent="Loaded">
  1896. <BeginStoryboard Storyboard="{StaticResource maindh}" />
  1897. </EventTrigger>
  1898. </ControlTemplate.Triggers>
  1899. </ControlTemplate>
  1900. </Setter.Value>
  1901. </Setter>
  1902. </Style>
  1903. <Style x:Key="TabItemFocusVisual">
  1904. <Setter Property="Control.Template">
  1905. <Setter.Value>
  1906. <ControlTemplate>
  1907. <Rectangle
  1908. Margin="4,4,4,2"
  1909. SnapsToDevicePixels="true"
  1910. Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
  1911. StrokeDashArray="1 2"
  1912. StrokeThickness="1" />
  1913. </ControlTemplate>
  1914. </Setter.Value>
  1915. </Setter>
  1916. </Style>
  1917. <Style x:Key="TheTabItem" TargetType="{x:Type TabItem}">
  1918. <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}" />
  1919. <Setter Property="Foreground">
  1920. <Setter.Value>
  1921. #A5FFFFFF
  1922. </Setter.Value>
  1923. </Setter>
  1924. <Setter Property="Padding" Value="6,1,6,1" />
  1925. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  1926. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  1927. <Setter Property="Cursor" Value="Hand" />
  1928. <Setter Property="Template">
  1929. <Setter.Value>
  1930. <ControlTemplate TargetType="{x:Type TabItem}">
  1931. <Border
  1932. x:Name="Bd"
  1933. Height="35"
  1934. Margin="5"
  1935. Padding="{TemplateBinding Padding}"
  1936. Background="{TemplateBinding Background}"
  1937. BorderBrush="{TemplateBinding BorderBrush}"
  1938. BorderThickness="{TemplateBinding BorderThickness}"
  1939. CornerRadius="2">
  1940. <ContentPresenter
  1941. x:Name="Content"
  1942. HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  1943. VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
  1944. ContentSource="Header"
  1945. Cursor="Hand"
  1946. RecognizesAccessKey="True"
  1947. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  1948. </Border>
  1949. <ControlTemplate.Triggers>
  1950. <Trigger Property="IsSelected" Value="true">
  1951. <Setter Property="Foreground" Value="{DynamicResource MeunSelectForeground}" />
  1952. <Setter TargetName="Bd" Property="Background">
  1953. <Setter.Value>
  1954. <ImageBrush ImageSource="../Images/Tab4_Select.png" />
  1955. </Setter.Value>
  1956. </Setter>
  1957. </Trigger>
  1958. <Trigger Property="IsSelected" Value="False">
  1959. <Setter Property="Foreground" Value="{DynamicResource MeunUnSelectForeground}" />
  1960. <Setter TargetName="Bd" Property="Background">
  1961. <Setter.Value>
  1962. <ImageBrush ImageSource="../Images/Tab4_No.png" />
  1963. </Setter.Value>
  1964. </Setter>
  1965. </Trigger>
  1966. <Trigger Property="IsMouseOver" Value="True">
  1967. <Setter Property="Foreground" Value="#8f723c" />
  1968. <Setter TargetName="Bd" Property="Background">
  1969. <Setter.Value>
  1970. <ImageBrush ImageSource="../Images/Tab4_Select.png" />
  1971. </Setter.Value>
  1972. </Setter>
  1973. </Trigger>
  1974. </ControlTemplate.Triggers>
  1975. </ControlTemplate>
  1976. </Setter.Value>
  1977. </Setter>
  1978. </Style>
  1979. <!--#region ScrollBar-->
  1980. <Style x:Key="UpScrollBarButton" TargetType="{x:Type RepeatButton}">
  1981. <Setter Property="OverridesDefaultStyle" Value="true" />
  1982. <Setter Property="Cursor" Value="Hand" />
  1983. <Setter Property="Focusable" Value="false" />
  1984. <Setter Property="IsTabStop" Value="false" />
  1985. <Setter Property="Template">
  1986. <Setter.Value>
  1987. <ControlTemplate TargetType="{x:Type RepeatButton}">
  1988. <Image
  1989. Width="8"
  1990. Height="5"
  1991. Source="../Images/Scroll_↑.png" />
  1992. </ControlTemplate>
  1993. </Setter.Value>
  1994. </Setter>
  1995. </Style>
  1996. <Style x:Key="DownScrollBarButton" TargetType="{x:Type RepeatButton}">
  1997. <Setter Property="OverridesDefaultStyle" Value="true" />
  1998. <Setter Property="Cursor" Value="Hand" />
  1999. <Setter Property="Focusable" Value="false" />
  2000. <Setter Property="IsTabStop" Value="false" />
  2001. <Setter Property="Template">
  2002. <Setter.Value>
  2003. <ControlTemplate TargetType="{x:Type RepeatButton}">
  2004. <Image
  2005. Width="8"
  2006. Height="5"
  2007. Source="../Images/Scroll_↓.png" />
  2008. </ControlTemplate>
  2009. </Setter.Value>
  2010. </Setter>
  2011. </Style>
  2012. <Style x:Key="LeftScrollBarButton" TargetType="{x:Type RepeatButton}">
  2013. <Setter Property="OverridesDefaultStyle" Value="true" />
  2014. <Setter Property="Cursor" Value="Hand" />
  2015. <Setter Property="Focusable" Value="false" />
  2016. <Setter Property="IsTabStop" Value="false" />
  2017. <Setter Property="Template">
  2018. <Setter.Value>
  2019. <ControlTemplate TargetType="{x:Type RepeatButton}">
  2020. <Image
  2021. Width="5"
  2022. Height="8"
  2023. Source="../Images/Scroll_←.png" />
  2024. </ControlTemplate>
  2025. </Setter.Value>
  2026. </Setter>
  2027. </Style>
  2028. <Style x:Key="RightScrollBarButton" TargetType="{x:Type RepeatButton}">
  2029. <Setter Property="OverridesDefaultStyle" Value="true" />
  2030. <Setter Property="Cursor" Value="Hand" />
  2031. <Setter Property="Focusable" Value="false" />
  2032. <Setter Property="IsTabStop" Value="false" />
  2033. <Setter Property="Template">
  2034. <Setter.Value>
  2035. <ControlTemplate TargetType="{x:Type RepeatButton}">
  2036. <Image
  2037. Width="5"
  2038. Height="8"
  2039. Source="../Images/Scroll_→.png" />
  2040. </ControlTemplate>
  2041. </Setter.Value>
  2042. </Setter>
  2043. </Style>
  2044. <Style x:Key="VerticalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
  2045. <Setter Property="OverridesDefaultStyle" Value="true" />
  2046. <Setter Property="Background" Value="Transparent" />
  2047. <Setter Property="Focusable" Value="false" />
  2048. <Setter Property="IsTabStop" Value="false" />
  2049. <Setter Property="Template">
  2050. <Setter.Value>
  2051. <ControlTemplate TargetType="{x:Type RepeatButton}">
  2052. <Rectangle
  2053. Width="{TemplateBinding Width}"
  2054. Height="{TemplateBinding Height}"
  2055. Fill="{TemplateBinding Background}" />
  2056. </ControlTemplate>
  2057. </Setter.Value>
  2058. </Setter>
  2059. </Style>
  2060. <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
  2061. <Setter Property="OverridesDefaultStyle" Value="true" />
  2062. <Setter Property="IsTabStop" Value="false" />
  2063. <Setter Property="Template">
  2064. <Setter.Value>
  2065. <ControlTemplate TargetType="{x:Type Thumb}">
  2066. <Border
  2067. x:Name="bd1"
  2068. Margin="2,2,2,2"
  2069. Background="#00c2f4"
  2070. CornerRadius="3"
  2071. Cursor="Hand"
  2072. Opacity="1"
  2073. SnapsToDevicePixels="true" />
  2074. <ControlTemplate.Triggers>
  2075. <Trigger Property="IsMouseOver" Value="true">
  2076. <Setter TargetName="bd1" Property="Margin" Value="-1,-1,-1,-1" />
  2077. </Trigger>
  2078. </ControlTemplate.Triggers>
  2079. </ControlTemplate>
  2080. </Setter.Value>
  2081. </Setter>
  2082. </Style>
  2083. <LinearGradientBrush x:Key="HorizontalScrollBarBackground" StartPoint="0,0" EndPoint="0,1">
  2084. <GradientStop Offset="0" Color="#E1E1E1" />
  2085. <GradientStop Offset="0.20" Color="#EDEDED" />
  2086. <GradientStop Offset="0.80" Color="#EDEDED" />
  2087. <GradientStop Offset="1" Color="#E3E3E3" />
  2088. </LinearGradientBrush>
  2089. <Style x:Key="HorizontalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
  2090. <Setter Property="OverridesDefaultStyle" Value="true" />
  2091. <Setter Property="Background" Value="Transparent" />
  2092. <Setter Property="Focusable" Value="false" />
  2093. <Setter Property="IsTabStop" Value="false" />
  2094. <Setter Property="Template">
  2095. <Setter.Value>
  2096. <ControlTemplate TargetType="{x:Type RepeatButton}">
  2097. <Rectangle
  2098. Width="{TemplateBinding Width}"
  2099. Height="{TemplateBinding Height}"
  2100. Fill="{TemplateBinding Background}" />
  2101. </ControlTemplate>
  2102. </Setter.Value>
  2103. </Setter>
  2104. </Style>
  2105. <Style TargetType="{x:Type ScrollBar}">
  2106. <Setter Property="Background">
  2107. <Setter.Value>
  2108. <ImageBrush ImageSource="../Images/biogebj.png" Opacity="0.2" />
  2109. </Setter.Value>
  2110. </Setter>
  2111. <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
  2112. <Setter Property="Stylus.IsFlicksEnabled" Value="false" />
  2113. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  2114. <Setter Property="Opacity" Value="1" />
  2115. <Setter Property="MinWidth" Value="3" />
  2116. <Setter Property="Template">
  2117. <Setter.Value>
  2118. <ControlTemplate TargetType="{x:Type ScrollBar}">
  2119. <Border
  2120. Width="10"
  2121. Margin="0,0,0,0"
  2122. Background="{TemplateBinding Background}"
  2123. CornerRadius="2"
  2124. Opacity="{TemplateBinding Opacity}">
  2125. <Grid x:Name="Bg" SnapsToDevicePixels="true">
  2126. <Grid.RowDefinitions>
  2127. <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}" />
  2128. <RowDefinition Height="*" />
  2129. <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}" />
  2130. </Grid.RowDefinitions>
  2131. <RepeatButton
  2132. Themes:ScrollChrome.ScrollGlyph="UpArrow"
  2133. Command="{x:Static ScrollBar.LineUpCommand}"
  2134. IsEnabled="{TemplateBinding IsMouseOver}"
  2135. Style="{StaticResource UpScrollBarButton}" />
  2136. <Track
  2137. x:Name="PART_Track"
  2138. Grid.Row="1"
  2139. IsDirectionReversed="true"
  2140. IsEnabled="{TemplateBinding IsMouseOver}">
  2141. <Track.DecreaseRepeatButton>
  2142. <RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource VerticalScrollBarPageButton}" />
  2143. </Track.DecreaseRepeatButton>
  2144. <Track.IncreaseRepeatButton>
  2145. <RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource VerticalScrollBarPageButton}" />
  2146. </Track.IncreaseRepeatButton>
  2147. <Track.Thumb>
  2148. <Thumb Themes:ScrollChrome.ScrollGlyph="VerticalGripper" Style="{StaticResource ScrollBarThumb}" />
  2149. </Track.Thumb>
  2150. </Track>
  2151. <RepeatButton
  2152. Grid.Row="2"
  2153. Themes:ScrollChrome.ScrollGlyph="DownArrow"
  2154. Command="{x:Static ScrollBar.LineDownCommand}"
  2155. IsEnabled="{TemplateBinding IsMouseOver}"
  2156. Style="{StaticResource DownScrollBarButton}" />
  2157. </Grid>
  2158. </Border>
  2159. </ControlTemplate>
  2160. </Setter.Value>
  2161. </Setter>
  2162. <Style.Triggers>
  2163. <Trigger Property="Orientation" Value="Horizontal">
  2164. <Setter Property="Template">
  2165. <Setter.Value>
  2166. <ControlTemplate TargetType="{x:Type ScrollBar}">
  2167. <Border
  2168. Height="10"
  2169. Margin="0,0,0,0"
  2170. Background="{TemplateBinding Background}"
  2171. CornerRadius="2"
  2172. Opacity="{TemplateBinding Opacity}">
  2173. <Grid
  2174. x:Name="Bg"
  2175. Background="{TemplateBinding Background}"
  2176. SnapsToDevicePixels="true">
  2177. <Grid.ColumnDefinitions>
  2178. <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}" />
  2179. <ColumnDefinition Width="*" />
  2180. <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}" />
  2181. </Grid.ColumnDefinitions>
  2182. <RepeatButton
  2183. Themes:ScrollChrome.ScrollGlyph="LeftArrow"
  2184. Command="{x:Static ScrollBar.LineLeftCommand}"
  2185. IsEnabled="{TemplateBinding IsMouseOver}"
  2186. Style="{StaticResource LeftScrollBarButton}" />
  2187. <Track
  2188. x:Name="PART_Track"
  2189. Grid.Column="1"
  2190. IsEnabled="{TemplateBinding IsMouseOver}">
  2191. <Track.DecreaseRepeatButton>
  2192. <RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}" Style="{StaticResource HorizontalScrollBarPageButton}" />
  2193. </Track.DecreaseRepeatButton>
  2194. <Track.IncreaseRepeatButton>
  2195. <RepeatButton Command="{x:Static ScrollBar.PageRightCommand}" Style="{StaticResource HorizontalScrollBarPageButton}" />
  2196. </Track.IncreaseRepeatButton>
  2197. <Track.Thumb>
  2198. <Thumb Themes:ScrollChrome.ScrollGlyph="HorizontalGripper" Style="{StaticResource ScrollBarThumb}" />
  2199. </Track.Thumb>
  2200. </Track>
  2201. <RepeatButton
  2202. Grid.Column="2"
  2203. Themes:ScrollChrome.ScrollGlyph="RightArrow"
  2204. Command="{x:Static ScrollBar.LineRightCommand}"
  2205. IsEnabled="{TemplateBinding IsMouseOver}"
  2206. Style="{StaticResource RightScrollBarButton}" />
  2207. </Grid>
  2208. </Border>
  2209. </ControlTemplate>
  2210. </Setter.Value>
  2211. </Setter>
  2212. </Trigger>
  2213. </Style.Triggers>
  2214. </Style>
  2215. <LinearGradientBrush x:Key="VerticalScrollBarBackground" StartPoint="0,0" EndPoint="1,0">
  2216. <GradientStop Offset="0" Color="#E1E1E1" />
  2217. <GradientStop Offset="0.20" Color="#EDEDED" />
  2218. <GradientStop Offset="0.80" Color="#EDEDED" />
  2219. <GradientStop Offset="1" Color="#E3E3E3" />
  2220. </LinearGradientBrush>
  2221. <!--#endregion-->
  2222. <!--#region Slider-->
  2223. <LinearGradientBrush x:Key="HorizontalSliderThumbHoverBackgroundInverted" EndPoint="0,0" StartPoint="0,1">
  2224. <GradientStop Color="white" Offset="0"/>
  2225. <GradientStop Color="#B8E2F9" Offset="0.5"/>
  2226. <GradientStop Color="#B0DFF8" Offset="1"/>
  2227. </LinearGradientBrush>
  2228. <SolidColorBrush x:Key="HorizontalSliderThumbHoverBorder" Color="#3C7FB1"/>
  2229. <LinearGradientBrush x:Key="HorizontalSliderThumbPressedBackgroundInverted" EndPoint="0,0" StartPoint="0,1">
  2230. <GradientStop Color="#B8E4FA" Offset="0.25"/>
  2231. <GradientStop Color="#5EB4E3" Offset="0.5"/>
  2232. <GradientStop Color="#4C8BB4" Offset="1"/>
  2233. </LinearGradientBrush>
  2234. <SolidColorBrush x:Key="HorizontalSliderThumbPressedBorder" Color="#2C628B"/>
  2235. <Geometry x:Key="SliderThumbDisabledGeometry">M -5,-10.5 L 5,-10.5 L 5,10.5 L -5,10.5 Z</Geometry>
  2236. <Geometry x:Key="SliderPointedThumbDisabledGeometry">M 4.5,-8.5 L -4.5,-8.5 L -4.5,4.5 L -0.5,8.5 L 0.5,8.5 L 4.5,4.5 Z</Geometry>
  2237. <Geometry x:Key="SliderPointedThumbOuterBorderGeometry">M 4.5,-7.5 A 1 1 0 0 0 3.5,-8.5 L -3.5,-8.5 A 1 1 0 0 0 -4.5,-7.5 L -4.5,4.5 L -0.5,8.5 L 0.5,8.5 L 4.5,4.5 Z</Geometry>
  2238. <LinearGradientBrush x:Key="HorizontalSliderThumbNormalBackgroundInverted" EndPoint="0,0" StartPoint="0,1">
  2239. <GradientStop Color="White" Offset="0"/>
  2240. <GradientStop Color="#F0EFEF" Offset="0.4"/>
  2241. <GradientStop Color="#D6D5D5" Offset=".8"/>
  2242. </LinearGradientBrush>
  2243. <Geometry x:Key="SliderPointedThumbMiddleBorderGeometry">M 3.5,-7.5 L -3.5,-7.5 L -3.5,4.5 L 0,8 L 3.5,4.5 Z</Geometry>
  2244. <Style x:Key="HorizontalSliderUpThumbStyle" TargetType="{x:Type Thumb}">
  2245. <Setter Property="Focusable" Value="false"/>
  2246. <Setter Property="OverridesDefaultStyle" Value="true"/>
  2247. <Setter Property="Height" Value="18"/>
  2248. <Setter Property="Width" Value="10"/>
  2249. <Setter Property="Foreground" Value="Gray"/>
  2250. <Setter Property="Template">
  2251. <Setter.Value>
  2252. <ControlTemplate TargetType="{x:Type Thumb}">
  2253. <Canvas SnapsToDevicePixels="true">
  2254. <Canvas.RenderTransform>
  2255. <TransformGroup>
  2256. <TransformGroup.Children>
  2257. <TransformCollection>
  2258. <RotateTransform Angle="180"/>
  2259. <TranslateTransform X="5" Y="9"/>
  2260. </TransformCollection>
  2261. </TransformGroup.Children>
  2262. </TransformGroup>
  2263. </Canvas.RenderTransform>
  2264. <Path x:Name="Background" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Fill="{StaticResource HorizontalSliderThumbNormalBackgroundInverted}"/>
  2265. <Path x:Name="InnerBorder" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}" Stroke="White" StrokeThickness="1"/>
  2266. <Path x:Name="OuterBorder" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Stroke="#FF929292" StrokeThickness="1"/>
  2267. </Canvas>
  2268. <ControlTemplate.Triggers>
  2269. <Trigger Property="IsMouseOver" Value="true">
  2270. <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackgroundInverted}"/>
  2271. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2272. </Trigger>
  2273. <Trigger Property="Foreground" Value="Blue">
  2274. <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackgroundInverted}"/>
  2275. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2276. </Trigger>
  2277. <Trigger Property="IsDragging" Value="true">
  2278. <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbPressedBackgroundInverted}"/>
  2279. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
  2280. </Trigger>
  2281. <Trigger Property="IsEnabled" Value="false">
  2282. <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
  2283. <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
  2284. <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
  2285. <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
  2286. <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
  2287. </Trigger>
  2288. </ControlTemplate.Triggers>
  2289. </ControlTemplate>
  2290. </Setter.Value>
  2291. </Setter>
  2292. </Style>
  2293. <Style x:Key="ButtonStyle2" TargetType="{x:Type Button}">
  2294. <Setter Property="BorderThickness" Value="1"/>
  2295. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  2296. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  2297. <Setter Property="VerticalContentAlignment" Value="Center"/>
  2298. <Setter Property="Padding" Value="1"/>
  2299. <Setter Property="Foreground" Value="#b3e8f0"></Setter>
  2300. <Setter Property="Height" Value="20"></Setter>
  2301. <Setter Property="Template">
  2302. <Setter.Value>
  2303. <ControlTemplate TargetType="{x:Type Button}">
  2304. <Grid Height="20" Width="Auto" Margin="0">
  2305. <VisualStateManager.VisualStateGroups>
  2306. <VisualStateGroup x:Name="CommonStates">
  2307. <VisualState x:Name="Normal"/>
  2308. <VisualState x:Name="MouseOver">
  2309. <Storyboard>
  2310. <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="rectangle">
  2311. <EasingColorKeyFrame KeyTime="0" Value="#FFFF9700"/>
  2312. </ColorAnimationUsingKeyFrames>
  2313. </Storyboard>
  2314. </VisualState>
  2315. <VisualState x:Name="Pressed"/>
  2316. <VisualState x:Name="Disabled"/>
  2317. </VisualStateGroup>
  2318. </VisualStateManager.VisualStateGroups>
  2319. <Rectangle x:Name="rectangle" Fill="#409eff" RadiusY="0" RadiusX="0"/>
  2320. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
  2321. </Grid>
  2322. <ControlTemplate.Triggers>
  2323. <Trigger Property="IsEnabled" Value="false">
  2324. <Setter Property="Foreground" Value="#b3e8f0"/>
  2325. </Trigger>
  2326. </ControlTemplate.Triggers>
  2327. </ControlTemplate>
  2328. </Setter.Value>
  2329. </Setter>
  2330. </Style>
  2331. <LinearGradientBrush x:Key="HorizontalSliderThumbHoverBackground" EndPoint="0,1" StartPoint="0,0">
  2332. <GradientStop Color="white" Offset="0"/>
  2333. <GradientStop Color="#B8E2F9" Offset="0.5"/>
  2334. <GradientStop Color="#B0DFF8" Offset="1"/>
  2335. </LinearGradientBrush>
  2336. <LinearGradientBrush x:Key="HorizontalSliderThumbPressedBackground" EndPoint="0,1" StartPoint="0,0">
  2337. <GradientStop Color="#B8E4FA" Offset="0.25"/>
  2338. <GradientStop Color="#5EB4E3" Offset="0.5"/>
  2339. <GradientStop Color="#4C8BB4" Offset="1"/>
  2340. </LinearGradientBrush>
  2341. <LinearGradientBrush x:Key="HorizontalSliderThumbNormalBackground" EndPoint="0,1" StartPoint="0,0">
  2342. <GradientStop Color="White" Offset="0"/>
  2343. <GradientStop Color="#F0EFEF" Offset="0.4"/>
  2344. <GradientStop Color="#D6D5D5" Offset=".8"/>
  2345. </LinearGradientBrush>
  2346. <Style x:Key="HorizontalSliderDownThumbStyle" TargetType="{x:Type Thumb}">
  2347. <Setter Property="Focusable" Value="false"/>
  2348. <Setter Property="OverridesDefaultStyle" Value="true"/>
  2349. <Setter Property="Height" Value="18"/>
  2350. <Setter Property="Width" Value="10"/>
  2351. <Setter Property="Foreground" Value="Gray"/>
  2352. <Setter Property="Template">
  2353. <Setter.Value>
  2354. <ControlTemplate TargetType="{x:Type Thumb}">
  2355. <Canvas SnapsToDevicePixels="true">
  2356. <Canvas.RenderTransform>
  2357. <TranslateTransform X="5" Y="9"/>
  2358. </Canvas.RenderTransform>
  2359. <Path x:Name="Background" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Fill="{StaticResource HorizontalSliderThumbNormalBackground}"/>
  2360. <Path x:Name="InnerBorder" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}" Stroke="White" StrokeThickness="1"/>
  2361. <Path x:Name="OuterBorder" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Stroke="#FF929292" StrokeThickness="1"/>
  2362. </Canvas>
  2363. <ControlTemplate.Triggers>
  2364. <Trigger Property="IsMouseOver" Value="true">
  2365. <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
  2366. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2367. </Trigger>
  2368. <Trigger Property="Foreground" Value="Blue">
  2369. <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
  2370. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2371. </Trigger>
  2372. <Trigger Property="IsDragging" Value="true">
  2373. <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbPressedBackground}"/>
  2374. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
  2375. </Trigger>
  2376. <Trigger Property="IsEnabled" Value="false">
  2377. <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
  2378. <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
  2379. <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
  2380. <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
  2381. <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
  2382. </Trigger>
  2383. </ControlTemplate.Triggers>
  2384. </ControlTemplate>
  2385. </Setter.Value>
  2386. </Setter>
  2387. </Style>
  2388. <LinearGradientBrush x:Key="HorizontalSliderTrackNormalBorder" EndPoint="0,1" StartPoint="0,0">
  2389. <GradientStop Color="#FFAEB1AF" Offset="0.1"/>
  2390. <GradientStop Color="White" Offset=".9"/>
  2391. </LinearGradientBrush>
  2392. <SolidColorBrush x:Key="HorizontalSliderTrackNormalBackground" Color="#FFE7EAEA"/>
  2393. <Style x:Key="SliderRepeatButtonStyle" TargetType="{x:Type RepeatButton}">
  2394. <Setter Property="OverridesDefaultStyle" Value="true"/>
  2395. <Setter Property="IsTabStop" Value="false"/>
  2396. <Setter Property="Focusable" Value="false"/>
  2397. <Setter Property="Template">
  2398. <Setter.Value>
  2399. <ControlTemplate TargetType="{x:Type RepeatButton}">
  2400. <Rectangle Height="4">
  2401. <Rectangle.Fill>
  2402. <SolidColorBrush Color="#FF6A6B80" Opacity="0.6"/>
  2403. </Rectangle.Fill>
  2404. </Rectangle>
  2405. </ControlTemplate>
  2406. </Setter.Value>
  2407. </Setter>
  2408. </Style>
  2409. <Style x:Key="SliderRepeatButtonStyle1" TargetType="{x:Type RepeatButton}">
  2410. <Setter Property="OverridesDefaultStyle" Value="true"/>
  2411. <Setter Property="IsTabStop" Value="false"/>
  2412. <Setter Property="Focusable" Value="false"/>
  2413. <Setter Property="Template">
  2414. <Setter.Value>
  2415. <ControlTemplate TargetType="{x:Type RepeatButton}">
  2416. <Rectangle Fill="#FF6262F0" Height="4"/>
  2417. </ControlTemplate>
  2418. </Setter.Value>
  2419. </Setter>
  2420. </Style>
  2421. <Geometry x:Key="SliderThumbOuterBorderGeometry">M -5,-9.5 A 1 1 0 0 1 -4,-10.5 L 4,-10.5 A 1 1 0 0 1 5,-9.5 L 5,9.5 A 1 1 0 0 1 4,10.5 L -4,10.5 A 1 1 0 0 1 -5,9.5 Z</Geometry>
  2422. <Geometry x:Key="SliderThumbMiddleBorderGeometry">M -4,-9.5 L 4,-9.5 L 4,9.5 L -4,9.5 Z</Geometry>
  2423. <Style x:Key="HorizontalSliderThumbStyle" TargetType="{x:Type Thumb}">
  2424. <Setter Property="Focusable" Value="false"/>
  2425. <Setter Property="OverridesDefaultStyle" Value="true"/>
  2426. <Setter Property="Height" Value="22"/>
  2427. <Setter Property="Width" Value="11"/>
  2428. <Setter Property="Foreground" Value="Gray"/>
  2429. <Setter Property="Template">
  2430. <Setter.Value>
  2431. <ControlTemplate TargetType="{x:Type Thumb}">
  2432. <Canvas SnapsToDevicePixels="true">
  2433. <Canvas.RenderTransform>
  2434. <TranslateTransform X="-2" Y="4"/>
  2435. </Canvas.RenderTransform>
  2436. <Ellipse x:Name="ces" Width="23" Height="23" Margin="-4,-4,0,0" Fill="#7FE0751C"></Ellipse>
  2437. <Ellipse Width="15" Height="15" Fill="#FFE0751C"></Ellipse>
  2438. <Path Visibility="Collapsed" x:Name="Background" Data="{StaticResource SliderThumbOuterBorderGeometry}" Fill="{StaticResource HorizontalSliderThumbNormalBackground}"/>
  2439. <Path Visibility="Collapsed" x:Name="InnerBorder" Data="{StaticResource SliderThumbMiddleBorderGeometry}" Stroke="White"/>
  2440. <Path Visibility="Collapsed" x:Name="OuterBorder" Data="{StaticResource SliderThumbOuterBorderGeometry}" Stroke="#FF929292"/>
  2441. </Canvas>
  2442. <ControlTemplate.Triggers>
  2443. <Trigger Property="IsMouseOver" Value="true">
  2444. <Setter Property="Visibility" TargetName="ces" Value="Visible"/>
  2445. <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
  2446. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2447. </Trigger>
  2448. <Trigger Property="IsMouseOver" Value="False">
  2449. <Setter Property="Visibility" TargetName="ces" Value="Collapsed"/>
  2450. </Trigger>
  2451. <Trigger Property="Foreground" Value="Blue">
  2452. <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
  2453. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2454. </Trigger>
  2455. <Trigger Property="IsDragging" Value="true">
  2456. <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbPressedBackground}"/>
  2457. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
  2458. </Trigger>
  2459. <Trigger Property="IsEnabled" Value="false">
  2460. <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
  2461. <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
  2462. <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
  2463. <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
  2464. </Trigger>
  2465. </ControlTemplate.Triggers>
  2466. </ControlTemplate>
  2467. </Setter.Value>
  2468. </Setter>
  2469. </Style>
  2470. <LinearGradientBrush x:Key="VerticalSliderThumbHoverBackground" EndPoint="1,0" StartPoint="0,0">
  2471. <GradientStop Color="white" Offset="0"/>
  2472. <GradientStop Color="#B8E2F9" Offset="0.5"/>
  2473. <GradientStop Color="#B0DFF8" Offset="1"/>
  2474. </LinearGradientBrush>
  2475. <LinearGradientBrush x:Key="VerticalSliderThumbPressedBackground" EndPoint="1,0" StartPoint="0,0">
  2476. <GradientStop Color="#B8E4FA" Offset="0.25"/>
  2477. <GradientStop Color="#5EB4E3" Offset="0.5"/>
  2478. <GradientStop Color="#4C8BB4" Offset="1"/>
  2479. </LinearGradientBrush>
  2480. <LinearGradientBrush x:Key="VerticalSliderThumbNormalBackground" EndPoint="1,0" StartPoint="0,0">
  2481. <GradientStop Color="White" Offset="0"/>
  2482. <GradientStop Color="#F0EFEF" Offset="0.4"/>
  2483. <GradientStop Color="#D6D5D5" Offset=".8"/>
  2484. </LinearGradientBrush>
  2485. <Style x:Key="VerticalSliderLeftThumbStyle" TargetType="{x:Type Thumb}">
  2486. <Setter Property="Focusable" Value="false"/>
  2487. <Setter Property="OverridesDefaultStyle" Value="true"/>
  2488. <Setter Property="Height" Value="10"/>
  2489. <Setter Property="Width" Value="18"/>
  2490. <Setter Property="Foreground" Value="Gray"/>
  2491. <Setter Property="Template">
  2492. <Setter.Value>
  2493. <ControlTemplate TargetType="{x:Type Thumb}">
  2494. <Canvas SnapsToDevicePixels="true">
  2495. <Canvas.RenderTransform>
  2496. <TransformGroup>
  2497. <TransformGroup.Children>
  2498. <TransformCollection>
  2499. <RotateTransform Angle="90"/>
  2500. <TranslateTransform X="9" Y="5"/>
  2501. </TransformCollection>
  2502. </TransformGroup.Children>
  2503. </TransformGroup>
  2504. </Canvas.RenderTransform>
  2505. <Path x:Name="Background" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Fill="{StaticResource VerticalSliderThumbNormalBackground}"/>
  2506. <Path x:Name="InnerBorder" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}" Stroke="White" StrokeThickness="1"/>
  2507. <Path x:Name="OuterBorder" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Stroke="#FF929292" StrokeThickness="1"/>
  2508. </Canvas>
  2509. <ControlTemplate.Triggers>
  2510. <Trigger Property="IsMouseOver" Value="true">
  2511. <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
  2512. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2513. </Trigger>
  2514. <Trigger Property="Foreground" Value="Blue">
  2515. <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
  2516. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2517. </Trigger>
  2518. <Trigger Property="IsDragging" Value="true">
  2519. <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbPressedBackground}"/>
  2520. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
  2521. </Trigger>
  2522. <Trigger Property="IsEnabled" Value="false">
  2523. <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
  2524. <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
  2525. <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
  2526. <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
  2527. </Trigger>
  2528. </ControlTemplate.Triggers>
  2529. </ControlTemplate>
  2530. </Setter.Value>
  2531. </Setter>
  2532. </Style>
  2533. <LinearGradientBrush x:Key="VerticalSliderThumbHoverBackgroundInverted" EndPoint="0,0" StartPoint="1,0">
  2534. <GradientStop Color="white" Offset="0"/>
  2535. <GradientStop Color="#B8E2F9" Offset="0.5"/>
  2536. <GradientStop Color="#B0DFF8" Offset="1"/>
  2537. </LinearGradientBrush>
  2538. <LinearGradientBrush x:Key="VerticalSliderThumbPressedBackgroundInverted" EndPoint="0,0" StartPoint="1,0">
  2539. <GradientStop Color="#B8E4FA" Offset="0.25"/>
  2540. <GradientStop Color="#5EB4E3" Offset="0.5"/>
  2541. <GradientStop Color="#4C8BB4" Offset="1"/>
  2542. </LinearGradientBrush>
  2543. <LinearGradientBrush x:Key="VerticalSliderThumbNormalBackgroundInverted" EndPoint="0,0" StartPoint="1,0">
  2544. <GradientStop Color="White" Offset="0"/>
  2545. <GradientStop Color="#F0EFEF" Offset="0.4"/>
  2546. <GradientStop Color="#D6D5D5" Offset=".8"/>
  2547. </LinearGradientBrush>
  2548. <Style x:Key="VerticalSliderRightThumbStyle" TargetType="{x:Type Thumb}">
  2549. <Setter Property="Focusable" Value="false"/>
  2550. <Setter Property="OverridesDefaultStyle" Value="true"/>
  2551. <Setter Property="Height" Value="10"/>
  2552. <Setter Property="Width" Value="18"/>
  2553. <Setter Property="Foreground" Value="Gray"/>
  2554. <Setter Property="Template">
  2555. <Setter.Value>
  2556. <ControlTemplate TargetType="{x:Type Thumb}">
  2557. <Canvas SnapsToDevicePixels="true">
  2558. <Canvas.RenderTransform>
  2559. <TransformGroup>
  2560. <TransformGroup.Children>
  2561. <TransformCollection>
  2562. <RotateTransform Angle="-90"/>
  2563. <TranslateTransform X="9" Y="5"/>
  2564. </TransformCollection>
  2565. </TransformGroup.Children>
  2566. </TransformGroup>
  2567. </Canvas.RenderTransform>
  2568. <Path x:Name="Background" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Fill="{StaticResource VerticalSliderThumbNormalBackgroundInverted}"/>
  2569. <Path x:Name="InnerBorder" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}" Stroke="White" StrokeThickness="1"/>
  2570. <Path x:Name="OuterBorder" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Stroke="#FF929292" StrokeThickness="1"/>
  2571. </Canvas>
  2572. <ControlTemplate.Triggers>
  2573. <Trigger Property="IsMouseOver" Value="true">
  2574. <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackgroundInverted}"/>
  2575. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2576. </Trigger>
  2577. <Trigger Property="Foreground" Value="Blue">
  2578. <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackgroundInverted}"/>
  2579. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2580. </Trigger>
  2581. <Trigger Property="IsDragging" Value="true">
  2582. <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbPressedBackgroundInverted}"/>
  2583. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
  2584. </Trigger>
  2585. <Trigger Property="IsEnabled" Value="false">
  2586. <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
  2587. <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
  2588. <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
  2589. <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
  2590. </Trigger>
  2591. </ControlTemplate.Triggers>
  2592. </ControlTemplate>
  2593. </Setter.Value>
  2594. </Setter>
  2595. </Style>
  2596. <LinearGradientBrush x:Key="VerticalSliderTrackNormalBorder" EndPoint="1,0" StartPoint="0,0">
  2597. <GradientStop Color="#FFAEB1AF" Offset="0.1"/>
  2598. <GradientStop Color="White" Offset=".9"/>
  2599. </LinearGradientBrush>
  2600. <Style x:Key="VerticalSliderThumbStyle" TargetType="{x:Type Thumb}">
  2601. <Setter Property="Focusable" Value="false"/>
  2602. <Setter Property="OverridesDefaultStyle" Value="true"/>
  2603. <Setter Property="Height" Value="11"/>
  2604. <Setter Property="Width" Value="22"/>
  2605. <Setter Property="Foreground" Value="Gray"/>
  2606. <Setter Property="Template">
  2607. <Setter.Value>
  2608. <ControlTemplate TargetType="{x:Type Thumb}">
  2609. <Canvas SnapsToDevicePixels="true">
  2610. <Canvas.RenderTransform>
  2611. <TransformGroup>
  2612. <TransformGroup.Children>
  2613. <TransformCollection>
  2614. <RotateTransform Angle="90"/>
  2615. <TranslateTransform X="11" Y="5.5"/>
  2616. </TransformCollection>
  2617. </TransformGroup.Children>
  2618. </TransformGroup>
  2619. </Canvas.RenderTransform>
  2620. <Ellipse x:Name="ces" Width="23" Height="23" Margin="-4,-4,0,0" Fill="#7FE0751C"></Ellipse>
  2621. <Ellipse Width="15" Height="15" Fill="#FFE0751C"></Ellipse>
  2622. <Path x:Name="Background" Visibility="Collapsed" Data="{StaticResource SliderThumbOuterBorderGeometry}" Fill="{StaticResource VerticalSliderThumbNormalBackground}"/>
  2623. <Path x:Name="InnerBorder" Visibility="Collapsed" Data="{StaticResource SliderThumbMiddleBorderGeometry}" Stroke="White" StrokeThickness="1"/>
  2624. <Path x:Name="OuterBorder" Visibility="Collapsed" Data="{StaticResource SliderThumbOuterBorderGeometry}" Stroke="#FF929292" StrokeThickness="1"/>
  2625. </Canvas>
  2626. <ControlTemplate.Triggers>
  2627. <Trigger Property="IsMouseOver" Value="true">
  2628. <Setter Property="Visibility" TargetName="ces" Value="Visible"/>
  2629. <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
  2630. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2631. </Trigger>
  2632. <Trigger Property="IsMouseOver" Value="False">
  2633. <Setter Property="Visibility" TargetName="ces" Value="Collapsed"/>
  2634. </Trigger>
  2635. <Trigger Property="Foreground" Value="Blue">
  2636. <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
  2637. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
  2638. </Trigger>
  2639. <Trigger Property="IsDragging" Value="true">
  2640. <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbPressedBackground}"/>
  2641. <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
  2642. </Trigger>
  2643. <Trigger Property="IsEnabled" Value="false">
  2644. <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
  2645. <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
  2646. <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
  2647. <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
  2648. </Trigger>
  2649. </ControlTemplate.Triggers>
  2650. </ControlTemplate>
  2651. </Setter.Value>
  2652. </Setter>
  2653. </Style>
  2654. <Style TargetType="{x:Type Slider}">
  2655. <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
  2656. <Setter Property="Background" Value="Transparent"/>
  2657. <Setter Property="Cursor" Value="Hand"/>
  2658. <Setter Property="Foreground" Value="#FFC4C4C4"/>
  2659. <Setter Property="Template">
  2660. <Setter.Value>
  2661. <ControlTemplate TargetType="{x:Type Slider}">
  2662. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
  2663. <Grid>
  2664. <Grid.RowDefinitions>
  2665. <RowDefinition Height="Auto"/>
  2666. <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
  2667. <RowDefinition Height="Auto"/>
  2668. </Grid.RowDefinitions>
  2669. <TickBar x:Name="TopTick" Fill="{TemplateBinding Foreground}" Height="4" Placement="Top" Grid.Row="0" Visibility="Collapsed"/>
  2670. <TickBar x:Name="BottomTick" Fill="{TemplateBinding Foreground}" Height="4" Placement="Bottom" Grid.Row="2" Visibility="Collapsed"/>
  2671. <Border x:Name="TrackBackground" BorderBrush="{StaticResource HorizontalSliderTrackNormalBorder}" BorderThickness="1" Background="{StaticResource HorizontalSliderTrackNormalBackground}" Cursor="Hand" CornerRadius="1" Height="4.0" Margin="5,0" Grid.Row="1" VerticalAlignment="center">
  2672. <Canvas Margin="-6,-1">
  2673. <Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Height="4.0" Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" Visibility="Hidden"/>
  2674. </Canvas>
  2675. </Border>
  2676. <Track x:Name="PART_Track" Grid.Row="1">
  2677. <Track.DecreaseRepeatButton>
  2678. <RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle1}"/>
  2679. </Track.DecreaseRepeatButton>
  2680. <Track.IncreaseRepeatButton>
  2681. <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}"/>
  2682. </Track.IncreaseRepeatButton>
  2683. <Track.Thumb>
  2684. <Thumb x:Name="Thumb" Style="{StaticResource HorizontalSliderThumbStyle}"/>
  2685. </Track.Thumb>
  2686. </Track>
  2687. </Grid>
  2688. </Border>
  2689. <ControlTemplate.Triggers>
  2690. <Trigger Property="TickPlacement" Value="TopLeft">
  2691. <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
  2692. <Setter Property="Style" TargetName="Thumb" Value="{StaticResource HorizontalSliderUpThumbStyle}"/>
  2693. <Setter Property="Margin" TargetName="TrackBackground" Value="5,2,5,0"/>
  2694. </Trigger>
  2695. <Trigger Property="TickPlacement" Value="BottomRight">
  2696. <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
  2697. <Setter Property="Style" TargetName="Thumb" Value="{StaticResource HorizontalSliderDownThumbStyle}"/>
  2698. <Setter Property="Margin" TargetName="TrackBackground" Value="5,0,5,2"/>
  2699. </Trigger>
  2700. <Trigger Property="TickPlacement" Value="Both">
  2701. <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
  2702. <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
  2703. </Trigger>
  2704. <Trigger Property="IsSelectionRangeEnabled" Value="true">
  2705. <Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/>
  2706. </Trigger>
  2707. <Trigger Property="IsKeyboardFocused" Value="true">
  2708. <Setter Property="Foreground" TargetName="Thumb" Value="Blue"/>
  2709. </Trigger>
  2710. </ControlTemplate.Triggers>
  2711. </ControlTemplate>
  2712. </Setter.Value>
  2713. </Setter>
  2714. <Style.Triggers>
  2715. <Trigger Property="Orientation" Value="Vertical">
  2716. <Setter Property="Template">
  2717. <Setter.Value>
  2718. <ControlTemplate TargetType="{x:Type Slider}">
  2719. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
  2720. <Grid>
  2721. <Grid.ColumnDefinitions>
  2722. <ColumnDefinition Width="Auto"/>
  2723. <ColumnDefinition MinWidth="{TemplateBinding MinWidth}" Width="Auto"/>
  2724. <ColumnDefinition Width="Auto"/>
  2725. </Grid.ColumnDefinitions>
  2726. <TickBar x:Name="TopTick" Grid.Column="0" Fill="{TemplateBinding Foreground}" Placement="Left" Visibility="Collapsed" Width="4"/>
  2727. <TickBar x:Name="BottomTick" Grid.Column="2" Fill="{TemplateBinding Foreground}" Placement="Right" Visibility="Collapsed" Width="4"/>
  2728. <Border x:Name="TrackBackground" BorderBrush="{StaticResource VerticalSliderTrackNormalBorder}" BorderThickness="1" Background="{StaticResource HorizontalSliderTrackNormalBackground}" Grid.Column="1" CornerRadius="1" HorizontalAlignment="center" Margin="0,5" Width="4.0">
  2729. <Canvas Margin="-1,-6">
  2730. <Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" Visibility="Hidden" Width="4.0"/>
  2731. </Canvas>
  2732. </Border>
  2733. <Track x:Name="PART_Track" Grid.Column="1">
  2734. <Track.DecreaseRepeatButton>
  2735. <RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}"/>
  2736. </Track.DecreaseRepeatButton>
  2737. <Track.IncreaseRepeatButton>
  2738. <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}"/>
  2739. </Track.IncreaseRepeatButton>
  2740. <Track.Thumb>
  2741. <Thumb x:Name="Thumb" Style="{StaticResource VerticalSliderThumbStyle}"/>
  2742. </Track.Thumb>
  2743. </Track>
  2744. </Grid>
  2745. </Border>
  2746. <ControlTemplate.Triggers>
  2747. <Trigger Property="TickPlacement" Value="TopLeft">
  2748. <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
  2749. <Setter Property="Style" TargetName="Thumb" Value="{StaticResource VerticalSliderLeftThumbStyle}"/>
  2750. <Setter Property="Margin" TargetName="TrackBackground" Value="2,5,0,5"/>
  2751. </Trigger>
  2752. <Trigger Property="TickPlacement" Value="BottomRight">
  2753. <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
  2754. <Setter Property="Style" TargetName="Thumb" Value="{StaticResource VerticalSliderRightThumbStyle}"/>
  2755. <Setter Property="Margin" TargetName="TrackBackground" Value="0,5,2,5"/>
  2756. </Trigger>
  2757. <Trigger Property="TickPlacement" Value="Both">
  2758. <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
  2759. <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
  2760. </Trigger>
  2761. <Trigger Property="IsSelectionRangeEnabled" Value="true">
  2762. <Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/>
  2763. </Trigger>
  2764. <Trigger Property="IsKeyboardFocused" Value="true">
  2765. <Setter Property="Foreground" TargetName="Thumb" Value="Blue"/>
  2766. </Trigger>
  2767. </ControlTemplate.Triggers>
  2768. </ControlTemplate>
  2769. </Setter.Value>
  2770. </Setter>
  2771. </Trigger>
  2772. </Style.Triggers>
  2773. </Style>
  2774. <Style TargetType="{x:Type ctrl:TheSlider}">
  2775. <Setter Property="Width" Value="140" />
  2776. <Setter Property="Height" Value="24" />
  2777. <Setter Property="Maximum" Value="100" />
  2778. <Setter Property="Cursor" Value="Hand"/>
  2779. <Setter Property="Minimum" Value="0" />
  2780. <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
  2781. <Setter Property="Background" Value="Transparent"/>
  2782. <Setter Property="Foreground" Value="#FFC4C4C4"/>
  2783. <Setter Property="Template">
  2784. <Setter.Value>
  2785. <ControlTemplate TargetType="{x:Type ctrl:TheSlider}">
  2786. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
  2787. <Grid>
  2788. <Grid.RowDefinitions>
  2789. <RowDefinition Height="Auto"/>
  2790. <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
  2791. <RowDefinition Height="Auto"/>
  2792. </Grid.RowDefinitions>
  2793. <TickBar x:Name="TopTick" Fill="{TemplateBinding Foreground}" Height="4" Placement="Top" Grid.Row="0" Visibility="Collapsed"/>
  2794. <TickBar x:Name="BottomTick" Fill="{TemplateBinding Foreground}" Height="4" Placement="Bottom" Grid.Row="2" Visibility="Collapsed"/>
  2795. <Border x:Name="TrackBackground" BorderBrush="{StaticResource HorizontalSliderTrackNormalBorder}" BorderThickness="1" Background="{StaticResource HorizontalSliderTrackNormalBackground}" CornerRadius="1" Height="4.0" Margin="5,0" Grid.Row="1" VerticalAlignment="center">
  2796. <Canvas Margin="-6,-1">
  2797. <Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Height="4.0" Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" Visibility="Hidden"/>
  2798. </Canvas>
  2799. </Border>
  2800. <Track x:Name="PART_Track" Grid.Row="1">
  2801. <Track.DecreaseRepeatButton>
  2802. <RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle1}"/>
  2803. </Track.DecreaseRepeatButton>
  2804. <Track.IncreaseRepeatButton>
  2805. <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}"/>
  2806. </Track.IncreaseRepeatButton>
  2807. <Track.Thumb>
  2808. <Thumb x:Name="Thumb" Style="{StaticResource HorizontalSliderThumbStyle}"/>
  2809. </Track.Thumb>
  2810. </Track>
  2811. </Grid>
  2812. </Border>
  2813. <ControlTemplate.Triggers>
  2814. <Trigger Property="TickPlacement" Value="TopLeft">
  2815. <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
  2816. <Setter Property="Style" TargetName="Thumb" Value="{StaticResource HorizontalSliderUpThumbStyle}"/>
  2817. <Setter Property="Margin" TargetName="TrackBackground" Value="5,2,5,0"/>
  2818. </Trigger>
  2819. <Trigger Property="TickPlacement" Value="BottomRight">
  2820. <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
  2821. <Setter Property="Style" TargetName="Thumb" Value="{StaticResource HorizontalSliderDownThumbStyle}"/>
  2822. <Setter Property="Margin" TargetName="TrackBackground" Value="5,0,5,2"/>
  2823. </Trigger>
  2824. <Trigger Property="TickPlacement" Value="Both">
  2825. <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
  2826. <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
  2827. </Trigger>
  2828. <Trigger Property="IsSelectionRangeEnabled" Value="true">
  2829. <Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/>
  2830. </Trigger>
  2831. <Trigger Property="IsKeyboardFocused" Value="true">
  2832. <Setter Property="Foreground" TargetName="Thumb" Value="Blue"/>
  2833. </Trigger>
  2834. </ControlTemplate.Triggers>
  2835. </ControlTemplate>
  2836. </Setter.Value>
  2837. </Setter>
  2838. <Style.Triggers>
  2839. <Trigger Property="Orientation" Value="Vertical">
  2840. <Setter Property="Template">
  2841. <Setter.Value>
  2842. <ControlTemplate TargetType="{x:Type ctrl:TheSlider}">
  2843. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
  2844. <Grid>
  2845. <Grid.ColumnDefinitions>
  2846. <ColumnDefinition Width="Auto"/>
  2847. <ColumnDefinition MinWidth="{TemplateBinding MinWidth}" Width="Auto"/>
  2848. <ColumnDefinition Width="Auto"/>
  2849. </Grid.ColumnDefinitions>
  2850. <TickBar x:Name="TopTick" Grid.Column="0" Fill="{TemplateBinding Foreground}" Placement="Left" Visibility="Collapsed" Width="4"/>
  2851. <TickBar x:Name="BottomTick" Grid.Column="2" Fill="{TemplateBinding Foreground}" Placement="Right" Visibility="Collapsed" Width="4"/>
  2852. <Border x:Name="TrackBackground" BorderBrush="{StaticResource VerticalSliderTrackNormalBorder}" BorderThickness="1" Background="{StaticResource HorizontalSliderTrackNormalBackground}" Grid.Column="1" CornerRadius="1" HorizontalAlignment="center" Margin="0,5" Width="4.0">
  2853. <Canvas Margin="-1,-6">
  2854. <Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" Visibility="Hidden" Width="4.0"/>
  2855. </Canvas>
  2856. </Border>
  2857. <Track x:Name="PART_Track" Grid.Column="1">
  2858. <Track.DecreaseRepeatButton>
  2859. <RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}"/>
  2860. </Track.DecreaseRepeatButton>
  2861. <Track.IncreaseRepeatButton>
  2862. <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}"/>
  2863. </Track.IncreaseRepeatButton>
  2864. <Track.Thumb>
  2865. <Thumb x:Name="Thumb" Style="{StaticResource VerticalSliderThumbStyle}"/>
  2866. </Track.Thumb>
  2867. </Track>
  2868. </Grid>
  2869. </Border>
  2870. <ControlTemplate.Triggers>
  2871. <Trigger Property="TickPlacement" Value="TopLeft">
  2872. <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
  2873. <Setter Property="Style" TargetName="Thumb" Value="{StaticResource VerticalSliderLeftThumbStyle}"/>
  2874. <Setter Property="Margin" TargetName="TrackBackground" Value="2,5,0,5"/>
  2875. </Trigger>
  2876. <Trigger Property="TickPlacement" Value="BottomRight">
  2877. <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
  2878. <Setter Property="Style" TargetName="Thumb" Value="{StaticResource VerticalSliderRightThumbStyle}"/>
  2879. <Setter Property="Margin" TargetName="TrackBackground" Value="0,5,2,5"/>
  2880. </Trigger>
  2881. <Trigger Property="TickPlacement" Value="Both">
  2882. <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
  2883. <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
  2884. </Trigger>
  2885. <Trigger Property="IsSelectionRangeEnabled" Value="true">
  2886. <Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/>
  2887. </Trigger>
  2888. <Trigger Property="IsKeyboardFocused" Value="true">
  2889. <Setter Property="Foreground" TargetName="Thumb" Value="Blue"/>
  2890. </Trigger>
  2891. </ControlTemplate.Triggers>
  2892. </ControlTemplate>
  2893. </Setter.Value>
  2894. </Setter>
  2895. </Trigger>
  2896. </Style.Triggers>
  2897. </Style>
  2898. <!--#endregion-->
  2899. </ResourceDictionary>