SliderStyle.xaml 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  3. <Style TargetType="{x:Type Slider}" x:Key="SliderStyle"
  4. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  5. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  6. xmlns:s="clr-namespace:System;assembly=mscorlib">
  7. <Style.Triggers>
  8. <Trigger Property="Slider.Orientation"
  9. Value="Vertical">
  10. <Setter Property="Control.Template">
  11. <Setter.Value>
  12. <ControlTemplate TargetType="{x:Type Slider}">
  13. <Border BorderThickness="{TemplateBinding Border.BorderThickness}"
  14. BorderBrush="{TemplateBinding Border.BorderBrush}"
  15. Background="{TemplateBinding Panel.Background}"
  16. Name="border"
  17. SnapsToDevicePixels="True">
  18. <Grid>
  19. <Grid.ColumnDefinitions>
  20. <ColumnDefinition Width="Auto" />
  21. <ColumnDefinition Width="Auto"
  22. MinWidth="{TemplateBinding FrameworkElement.MinWidth}" />
  23. <ColumnDefinition Width="Auto" />
  24. </Grid.ColumnDefinitions>
  25. <TickBar Fill="{TemplateBinding TextElement.Foreground}"
  26. Placement="Left"
  27. Name="TopTick"
  28. Width="4"
  29. Margin="0,0,2,0"
  30. Visibility="Collapsed"
  31. Grid.Column="0" />
  32. <TickBar Fill="{TemplateBinding TextElement.Foreground}"
  33. Placement="Right"
  34. Name="BottomTick"
  35. Width="4"
  36. Margin="2,0,0,0"
  37. Visibility="Collapsed"
  38. Grid.Column="2" />
  39. <Border BorderThickness="1"
  40. BorderBrush="#D6D6D6"
  41. Background="#E7EAEA"
  42. Name="TrackBackground"
  43. Width="4"
  44. Margin="0,5"
  45. HorizontalAlignment="Center"
  46. Grid.Column="1">
  47. <Canvas Margin="-1,-6">
  48. <Rectangle Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"
  49. Name="PART_SelectionRange"
  50. Width="4"
  51. Visibility="Hidden" />
  52. </Canvas>
  53. </Border>
  54. <Track Name="PART_Track"
  55. Grid.Column="1">
  56. <Track.DecreaseRepeatButton>
  57. <RepeatButton>
  58. <RepeatButton.Command>
  59. <RoutedCommand />
  60. </RepeatButton.Command>
  61. <RepeatButton.Style>
  62. <Style TargetType="{x:Type RepeatButton}">
  63. <Setter Property="FrameworkElement.OverridesDefaultStyle"
  64. Value="True" />
  65. <Setter Property="Panel.Background"
  66. Value="#00FFFFFF" />
  67. <Setter Property="UIElement.Focusable"
  68. Value="False" />
  69. <Setter Property="KeyboardNavigation.IsTabStop"
  70. Value="False" />
  71. <Setter Property="Control.Template">
  72. <Setter.Value>
  73. <ControlTemplate TargetType="{x:Type RepeatButton}">
  74. <Rectangle Fill="{TemplateBinding Panel.Background}"
  75. Width="{TemplateBinding FrameworkElement.Width}"
  76. Height="2" />
  77. </ControlTemplate>
  78. </Setter.Value>
  79. </Setter>
  80. </Style>
  81. </RepeatButton.Style>
  82. </RepeatButton>
  83. </Track.DecreaseRepeatButton>
  84. <Track.Thumb>
  85. <Thumb OverridesDefaultStyle="True"
  86. Name="Thumb"
  87. Width="18"
  88. Height="11"
  89. VerticalAlignment="Top"
  90. Focusable="False">
  91. <Thumb.Template>
  92. <ControlTemplate TargetType="{x:Type Thumb}">
  93. <Grid UseLayoutRounding="True"
  94. HorizontalAlignment="Center"
  95. VerticalAlignment="Center">
  96. <Path
  97. Stretch="Fill"
  98. Fill="#477EDE"
  99. Stroke="#477EDE"
  100. StrokeThickness="1"
  101. UseLayoutRounding="True"
  102. Name="grip"
  103. VerticalAlignment="Center"
  104. SnapsToDevicePixels="True" >
  105. <Path.Data>
  106. <RectangleGeometry Rect="0,0,8,16" RadiusX="4" RadiusY="4"></RectangleGeometry>
  107. </Path.Data>
  108. </Path>
  109. </Grid>
  110. <ControlTemplate.Triggers>
  111. <Trigger Property="UIElement.IsMouseOver"
  112. Value="True">
  113. <Setter Property="Shape.Fill"
  114. TargetName="grip"
  115. Value="#477EDE" />
  116. <Setter Property="Shape.Stroke"
  117. TargetName="grip"
  118. Value="#477EDE" />
  119. </Trigger>
  120. <Trigger Property="Thumb.IsDragging"
  121. Value="True">
  122. <Setter Property="Shape.Fill"
  123. TargetName="grip"
  124. Value="#477EDE" />
  125. <Setter Property="Shape.Stroke"
  126. TargetName="grip"
  127. Value="#477EDE" />
  128. </Trigger>
  129. <Trigger Property="UIElement.IsEnabled"
  130. Value="False">
  131. <Setter Property="Shape.Fill"
  132. TargetName="grip"
  133. Value="#477EDE" />
  134. <Setter Property="Shape.Stroke"
  135. TargetName="grip"
  136. Value="#477EDE" />
  137. </Trigger>
  138. </ControlTemplate.Triggers>
  139. </ControlTemplate>
  140. </Thumb.Template>
  141. </Thumb>
  142. </Track.Thumb>
  143. <Track.IncreaseRepeatButton>
  144. <RepeatButton>
  145. <RepeatButton.Command>
  146. <RoutedCommand />
  147. </RepeatButton.Command>
  148. <RepeatButton.Style>
  149. <Style TargetType="{x:Type RepeatButton}">
  150. <Setter Property="FrameworkElement.OverridesDefaultStyle"
  151. Value="True" />
  152. <Setter Property="Panel.Background"
  153. Value="#00FFFFFF" />
  154. <Setter Property="UIElement.Focusable"
  155. Value="False" />
  156. <Setter Property="KeyboardNavigation.IsTabStop"
  157. Value="False" />
  158. <Setter Property="Control.Template">
  159. <Setter.Value>
  160. <ControlTemplate TargetType="{x:Type RepeatButton}">
  161. <Rectangle Fill="{TemplateBinding Panel.Background}"
  162. Width="{TemplateBinding FrameworkElement.Width}"
  163. Height="2" />
  164. </ControlTemplate>
  165. </Setter.Value>
  166. </Setter>
  167. </Style>
  168. </RepeatButton.Style>
  169. </RepeatButton>
  170. </Track.IncreaseRepeatButton>
  171. </Track>
  172. </Grid>
  173. </Border>
  174. <ControlTemplate.Triggers>
  175. <Trigger Property="Slider.TickPlacement"
  176. Value="TopLeft">
  177. <Setter Property="UIElement.Visibility"
  178. TargetName="TopTick"
  179. Value="Visible" />
  180. <Setter Property="Control.Template"
  181. TargetName="Thumb">
  182. <Setter.Value>
  183. <ControlTemplate TargetType="{x:Type Thumb}">
  184. <Grid UseLayoutRounding="True"
  185. HorizontalAlignment="Center"
  186. VerticalAlignment="Center">
  187. <Path
  188. Stretch="Fill"
  189. Fill="#477EDE"
  190. Stroke="#477EDE"
  191. StrokeThickness="1"
  192. UseLayoutRounding="True"
  193. Name="grip"
  194. VerticalAlignment="Center"
  195. SnapsToDevicePixels="True" >
  196. <Path.Data>
  197. <RectangleGeometry Rect="0,0,8,16" RadiusX="4" RadiusY="4"></RectangleGeometry>
  198. </Path.Data>
  199. </Path>
  200. </Grid>
  201. <ControlTemplate.Triggers>
  202. <Trigger Property="UIElement.IsMouseOver"
  203. Value="True">
  204. <Setter Property="Shape.Fill"
  205. TargetName="grip"
  206. Value="#477EDE" />
  207. <Setter Property="Shape.Stroke"
  208. TargetName="grip"
  209. Value="#477EDE" />
  210. </Trigger>
  211. <Trigger Property="Thumb.IsDragging"
  212. Value="True">
  213. <Setter Property="Shape.Fill"
  214. TargetName="grip"
  215. Value="#477EDE" />
  216. <Setter Property="Shape.Stroke"
  217. TargetName="grip"
  218. Value="#477EDE" />
  219. </Trigger>
  220. <Trigger Property="UIElement.IsEnabled"
  221. Value="False">
  222. <Setter Property="Shape.Fill"
  223. TargetName="grip"
  224. Value="#477EDE" />
  225. <Setter Property="Shape.Stroke"
  226. TargetName="grip"
  227. Value="#477EDE" />
  228. </Trigger>
  229. </ControlTemplate.Triggers>
  230. </ControlTemplate>
  231. </Setter.Value>
  232. </Setter>
  233. <Setter Property="FrameworkElement.Margin"
  234. TargetName="TrackBackground"
  235. Value="2,5,0,5" />
  236. </Trigger>
  237. <Trigger Property="Slider.TickPlacement"
  238. Value="BottomRight">
  239. <Setter Property="UIElement.Visibility"
  240. TargetName="BottomTick"
  241. Value="Visible" />
  242. <Setter Property="Control.Template"
  243. TargetName="Thumb">
  244. <Setter.Value>
  245. <ControlTemplate TargetType="{x:Type Thumb}">
  246. <Grid UseLayoutRounding="True"
  247. HorizontalAlignment="Center"
  248. VerticalAlignment="Center">
  249. <Path
  250. Stretch="Fill"
  251. Fill="#477EDE"
  252. Stroke="#477EDE"
  253. StrokeThickness="1"
  254. UseLayoutRounding="True"
  255. Name="grip"
  256. VerticalAlignment="Center"
  257. SnapsToDevicePixels="True" >
  258. <Path.Data>
  259. <RectangleGeometry Rect="0,0,8,16" RadiusX="4" RadiusY="4"></RectangleGeometry>
  260. </Path.Data>
  261. </Path>
  262. </Grid>
  263. <ControlTemplate.Triggers>
  264. <Trigger Property="UIElement.IsMouseOver"
  265. Value="True">
  266. <Setter Property="Shape.Fill"
  267. TargetName="grip"
  268. Value="#477EDE" />
  269. <Setter Property="Shape.Stroke"
  270. TargetName="grip"
  271. Value="#477EDE" />
  272. </Trigger>
  273. <Trigger Property="Thumb.IsDragging"
  274. Value="True">
  275. <Setter Property="Shape.Fill"
  276. TargetName="grip"
  277. Value="#477EDE" />
  278. <Setter Property="Shape.Stroke"
  279. TargetName="grip"
  280. Value="#477EDE" />
  281. </Trigger>
  282. <Trigger Property="UIElement.IsEnabled"
  283. Value="False">
  284. <Setter Property="Shape.Fill"
  285. TargetName="grip"
  286. Value="#477EDE" />
  287. <Setter Property="Shape.Stroke"
  288. TargetName="grip"
  289. Value="#477EDE" />
  290. </Trigger>
  291. </ControlTemplate.Triggers>
  292. </ControlTemplate>
  293. </Setter.Value>
  294. </Setter>
  295. <Setter Property="FrameworkElement.Margin"
  296. TargetName="TrackBackground"
  297. Value="0,5,2,5" />
  298. </Trigger>
  299. <Trigger Property="Slider.TickPlacement"
  300. Value="Both">
  301. <Setter Property="UIElement.Visibility"
  302. TargetName="TopTick"
  303. Value="Visible" />
  304. <Setter Property="UIElement.Visibility"
  305. TargetName="BottomTick"
  306. Value="Visible" />
  307. </Trigger>
  308. <Trigger Property="Slider.IsSelectionRangeEnabled"
  309. Value="True">
  310. <Setter Property="UIElement.Visibility"
  311. TargetName="PART_SelectionRange"
  312. Value="Visible" />
  313. </Trigger>
  314. <Trigger Property="UIElement.IsKeyboardFocused"
  315. Value="True">
  316. <Setter Property="TextElement.Foreground"
  317. TargetName="Thumb"
  318. Value="#0000FF" />
  319. </Trigger>
  320. </ControlTemplate.Triggers>
  321. </ControlTemplate>
  322. </Setter.Value>
  323. </Setter>
  324. </Trigger>
  325. </Style.Triggers>
  326. <Setter Property="Stylus.IsPressAndHoldEnabled"
  327. Value="False" />
  328. <Setter Property="Panel.Background"
  329. Value="#00FFFFFF" />
  330. <Setter Property="Border.BorderBrush"
  331. Value="#00FFFFFF" />
  332. <Setter Property="TextElement.Foreground"
  333. Value="#E5E5E5" />
  334. <Setter Property="Control.Template">
  335. <Setter.Value>
  336. <ControlTemplate TargetType="{x:Type Slider}">
  337. <Border BorderThickness="{TemplateBinding Border.BorderThickness}"
  338. BorderBrush="{TemplateBinding Border.BorderBrush}"
  339. Background="{TemplateBinding Panel.Background}"
  340. Name="border"
  341. SnapsToDevicePixels="True">
  342. <Grid>
  343. <Grid.RowDefinitions>
  344. <RowDefinition Height="Auto" />
  345. <RowDefinition Height="Auto"
  346. MinHeight="{TemplateBinding FrameworkElement.MinHeight}" />
  347. <RowDefinition Height="Auto" />
  348. </Grid.RowDefinitions>
  349. <TickBar Fill="{TemplateBinding TextElement.Foreground}"
  350. Placement="Top"
  351. Name="TopTick"
  352. Height="4"
  353. Margin="0,2,0,0"
  354. Visibility="Collapsed"
  355. Grid.Row="0" />
  356. <TickBar Fill="{TemplateBinding TextElement.Foreground}"
  357. Placement="Bottom"
  358. Name="BottomTick"
  359. Height="4"
  360. Margin="0,0,0,2"
  361. Visibility="Collapsed"
  362. Grid.Row="2" />
  363. <Border BorderThickness="0"
  364. BorderBrush="#D6D6D6"
  365. Background="#FFE2E3E6"
  366. Name="TrackBackground"
  367. Height="4"
  368. Margin="5,0"
  369. VerticalAlignment="Center"
  370. Grid.Row="1">
  371. <Canvas Margin="-6,-1">
  372. <Rectangle Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"
  373. Name="PART_SelectionRange"
  374. Height="4"
  375. Visibility="Hidden" />
  376. </Canvas>
  377. </Border>
  378. <Track Name="PART_Track"
  379. Grid.Row="1">
  380. <Track.DecreaseRepeatButton>
  381. <RepeatButton>
  382. <RepeatButton.Command>
  383. <RoutedCommand />
  384. </RepeatButton.Command>
  385. <RepeatButton.Style>
  386. <Style TargetType="{x:Type RepeatButton}">
  387. <Setter Property="FrameworkElement.OverridesDefaultStyle"
  388. Value="True" />
  389. <Setter Property="Panel.Background"
  390. Value="#00FFFFFF" />
  391. <Setter Property="UIElement.Focusable"
  392. Value="False" />
  393. <Setter Property="KeyboardNavigation.IsTabStop"
  394. Value="False" />
  395. <Setter Property="Control.Template">
  396. <Setter.Value>
  397. <ControlTemplate TargetType="{x:Type RepeatButton}">
  398. <Rectangle Fill="{TemplateBinding Panel.Background}"
  399. Width="{TemplateBinding FrameworkElement.Width}"
  400. Height="{TemplateBinding FrameworkElement.Height}" />
  401. </ControlTemplate>
  402. </Setter.Value>
  403. </Setter>
  404. </Style>
  405. </RepeatButton.Style>
  406. </RepeatButton>
  407. </Track.DecreaseRepeatButton>
  408. <Track.Thumb>
  409. <Thumb OverridesDefaultStyle="True"
  410. Name="Thumb"
  411. Width="8"
  412. Height="16"
  413. VerticalAlignment="Center"
  414. Focusable="False">
  415. <Thumb.Template>
  416. <ControlTemplate TargetType="{x:Type Thumb}">
  417. <Grid UseLayoutRounding="True"
  418. HorizontalAlignment="Center"
  419. VerticalAlignment="Center">
  420. <Path
  421. Stretch="Fill"
  422. Fill="#477EDE"
  423. Stroke="#477EDE"
  424. StrokeThickness="1"
  425. UseLayoutRounding="True"
  426. Name="grip"
  427. VerticalAlignment="Center"
  428. SnapsToDevicePixels="True" >
  429. <Path.Data>
  430. <RectangleGeometry Rect="0,0,8,16" RadiusX="4" RadiusY="4"></RectangleGeometry>
  431. </Path.Data>
  432. </Path>
  433. </Grid>
  434. <ControlTemplate.Triggers>
  435. <Trigger Property="UIElement.IsMouseOver"
  436. Value="True">
  437. <Setter Property="Shape.Fill"
  438. TargetName="grip"
  439. Value="#477EDE" />
  440. <Setter Property="Shape.Stroke"
  441. TargetName="grip"
  442. Value="#477EDE" />
  443. </Trigger>
  444. <Trigger Property="Thumb.IsDragging"
  445. Value="True">
  446. <Setter Property="Shape.Fill"
  447. TargetName="grip"
  448. Value="#477EDE" />
  449. <Setter Property="Shape.Stroke"
  450. TargetName="grip"
  451. Value="#477EDE" />
  452. </Trigger>
  453. <Trigger Property="UIElement.IsEnabled"
  454. Value="False">
  455. <Setter Property="Shape.Fill"
  456. TargetName="grip"
  457. Value="#477EDE" />
  458. <Setter Property="Shape.Stroke"
  459. TargetName="grip"
  460. Value="#477EDE" />
  461. </Trigger>
  462. </ControlTemplate.Triggers>
  463. </ControlTemplate>
  464. </Thumb.Template>
  465. </Thumb>
  466. </Track.Thumb>
  467. <Track.IncreaseRepeatButton>
  468. <RepeatButton>
  469. <RepeatButton.Command>
  470. <RoutedCommand />
  471. </RepeatButton.Command>
  472. <RepeatButton.Style>
  473. <Style TargetType="{x:Type RepeatButton}">
  474. <Setter Property="FrameworkElement.OverridesDefaultStyle"
  475. Value="True" />
  476. <Setter Property="Panel.Background"
  477. Value="#00FFFFFF" />
  478. <Setter Property="UIElement.Focusable"
  479. Value="False" />
  480. <Setter Property="KeyboardNavigation.IsTabStop"
  481. Value="False" />
  482. <Setter Property="Control.Template">
  483. <Setter.Value>
  484. <ControlTemplate TargetType="{x:Type RepeatButton}">
  485. <Rectangle Fill="{TemplateBinding Panel.Background}"
  486. Width="{TemplateBinding FrameworkElement.Width}"
  487. Height="{TemplateBinding FrameworkElement.Height}"
  488. />
  489. </ControlTemplate>
  490. </Setter.Value>
  491. </Setter>
  492. </Style>
  493. </RepeatButton.Style>
  494. </RepeatButton>
  495. </Track.IncreaseRepeatButton>
  496. </Track>
  497. </Grid>
  498. </Border>
  499. <ControlTemplate.Triggers>
  500. <Trigger Property="Slider.TickPlacement"
  501. Value="TopLeft">
  502. <Setter Property="UIElement.Visibility"
  503. TargetName="TopTick"
  504. Value="Visible" />
  505. <Setter Property="Control.Template"
  506. TargetName="Thumb">
  507. <Setter.Value>
  508. <ControlTemplate TargetType="{x:Type Thumb}">
  509. <Grid UseLayoutRounding="True"
  510. HorizontalAlignment="Center"
  511. VerticalAlignment="Center">
  512. <Path
  513. Stretch="Fill"
  514. Fill="#477EDE"
  515. Stroke="#477EDE"
  516. StrokeThickness="1"
  517. UseLayoutRounding="True"
  518. Name="grip"
  519. VerticalAlignment="Center"
  520. SnapsToDevicePixels="True" >
  521. <Path.Data>
  522. <RectangleGeometry Rect="0,0,8,16" RadiusX="4" RadiusY="4"></RectangleGeometry>
  523. </Path.Data>
  524. </Path>
  525. </Grid>
  526. <ControlTemplate.Triggers>
  527. <Trigger Property="UIElement.IsMouseOver"
  528. Value="True">
  529. <Setter Property="Shape.Fill"
  530. TargetName="grip"
  531. Value="#477EDE" />
  532. <Setter Property="Shape.Stroke"
  533. TargetName="grip"
  534. Value="#477EDE" />
  535. </Trigger>
  536. <Trigger Property="Thumb.IsDragging"
  537. Value="True">
  538. <Setter Property="Shape.Fill"
  539. TargetName="grip"
  540. Value="#477EDE" />
  541. <Setter Property="Shape.Stroke"
  542. TargetName="grip"
  543. Value="#477EDE" />
  544. </Trigger>
  545. <Trigger Property="UIElement.IsEnabled"
  546. Value="False">
  547. <Setter Property="Shape.Fill"
  548. TargetName="grip"
  549. Value="#477EDE" />
  550. <Setter Property="Shape.Stroke"
  551. TargetName="grip"
  552. Value="#477EDE" />
  553. </Trigger>
  554. </ControlTemplate.Triggers>
  555. </ControlTemplate>
  556. </Setter.Value>
  557. </Setter>
  558. <Setter Property="FrameworkElement.Margin"
  559. TargetName="TrackBackground"
  560. Value="5,2,5,0" />
  561. </Trigger>
  562. <Trigger Property="Slider.TickPlacement"
  563. Value="BottomRight">
  564. <Setter Property="UIElement.Visibility"
  565. TargetName="BottomTick"
  566. Value="Visible" />
  567. <Setter Property="Control.Template"
  568. TargetName="Thumb">
  569. <Setter.Value>
  570. <ControlTemplate TargetType="{x:Type Thumb}">
  571. <Grid UseLayoutRounding="True"
  572. HorizontalAlignment="Center"
  573. VerticalAlignment="Center">
  574. <Path
  575. Stretch="Fill"
  576. Fill="#477EDE"
  577. Stroke="#477EDE"
  578. StrokeThickness="1"
  579. UseLayoutRounding="True"
  580. Name="grip"
  581. VerticalAlignment="Center"
  582. SnapsToDevicePixels="True" >
  583. <Path.Data>
  584. <RectangleGeometry Rect="0,0,8,16" RadiusX="4" RadiusY="4"></RectangleGeometry>
  585. </Path.Data>
  586. </Path>
  587. </Grid>
  588. <ControlTemplate.Triggers>
  589. <Trigger Property="UIElement.IsMouseOver"
  590. Value="True">
  591. <Setter Property="Shape.Fill"
  592. TargetName="grip"
  593. Value="#477EDE" />
  594. <Setter Property="Shape.Stroke"
  595. TargetName="grip"
  596. Value="#477EDE" />
  597. </Trigger>
  598. <Trigger Property="Thumb.IsDragging"
  599. Value="True">
  600. <Setter Property="Shape.Fill"
  601. TargetName="grip"
  602. Value="#477EDE" />
  603. <Setter Property="Shape.Stroke"
  604. TargetName="grip"
  605. Value="#477EDE" />
  606. </Trigger>
  607. <Trigger Property="UIElement.IsEnabled"
  608. Value="False">
  609. <Setter Property="Shape.Fill"
  610. TargetName="grip"
  611. Value="#477EDE" />
  612. <Setter Property="Shape.Stroke"
  613. TargetName="grip"
  614. Value="#477EDE" />
  615. </Trigger>
  616. </ControlTemplate.Triggers>
  617. </ControlTemplate>
  618. </Setter.Value>
  619. </Setter>
  620. <Setter Property="FrameworkElement.Margin"
  621. TargetName="TrackBackground"
  622. Value="5,0,5,2" />
  623. </Trigger>
  624. <Trigger Property="Slider.TickPlacement"
  625. Value="Both">
  626. <Setter Property="UIElement.Visibility"
  627. TargetName="TopTick"
  628. Value="Visible" />
  629. <Setter Property="UIElement.Visibility"
  630. TargetName="BottomTick"
  631. Value="Visible" />
  632. </Trigger>
  633. <Trigger Property="Slider.IsSelectionRangeEnabled"
  634. Value="True">
  635. <Setter Property="UIElement.Visibility"
  636. TargetName="PART_SelectionRange"
  637. Value="Visible" />
  638. </Trigger>
  639. <Trigger Property="UIElement.IsKeyboardFocused"
  640. Value="True">
  641. <Setter Property="TextElement.Foreground"
  642. TargetName="Thumb"
  643. Value="#0000FF" />
  644. </Trigger>
  645. </ControlTemplate.Triggers>
  646. </ControlTemplate>
  647. </Setter.Value>
  648. </Setter>
  649. <Setter Property="SelectionStart" Value="{Binding Minimum, RelativeSource={RelativeSource Self}}" />
  650. <Setter Property="SelectionEnd" Value="{Binding Value, RelativeSource={RelativeSource Self}}" />
  651. </Style>
  652. </ResourceDictionary>