SliderStyle.xaml 39 KB

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