SliderStyle.xaml 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  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="8"
  350. Height="16"
  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. Fill="#477EDE"
  364. SnapsToDevicePixels="True"
  365. Stretch="Fill"
  366. Stroke="#477EDE"
  367. StrokeThickness="1"
  368. UseLayoutRounding="True">
  369. <Path.Data>
  370. <RectangleGeometry
  371. RadiusX="4"
  372. RadiusY="4"
  373. Rect="0,0,8,16" />
  374. </Path.Data>
  375. </Path>
  376. </Grid>
  377. <ControlTemplate.Triggers>
  378. <Trigger Property="UIElement.IsMouseOver" Value="True">
  379. <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
  380. <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
  381. </Trigger>
  382. <Trigger Property="Thumb.IsDragging" Value="True">
  383. <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
  384. <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
  385. </Trigger>
  386. <Trigger Property="UIElement.IsEnabled" Value="False">
  387. <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
  388. <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
  389. </Trigger>
  390. </ControlTemplate.Triggers>
  391. </ControlTemplate>
  392. </Thumb.Template>
  393. </Thumb>
  394. </Track.Thumb>
  395. <Track.IncreaseRepeatButton>
  396. <RepeatButton>
  397. <RepeatButton.Command>
  398. <RoutedCommand />
  399. </RepeatButton.Command>
  400. <RepeatButton.Style>
  401. <Style TargetType="{x:Type RepeatButton}">
  402. <Setter Property="FrameworkElement.OverridesDefaultStyle" Value="True" />
  403. <Setter Property="Panel.Background" Value="#00FFFFFF" />
  404. <Setter Property="UIElement.Focusable" Value="False" />
  405. <Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
  406. <Setter Property="Control.Template">
  407. <Setter.Value>
  408. <ControlTemplate TargetType="{x:Type RepeatButton}">
  409. <Rectangle
  410. Width="{TemplateBinding FrameworkElement.Width}"
  411. Height="{TemplateBinding FrameworkElement.Height}"
  412. Fill="{TemplateBinding Panel.Background}" />
  413. </ControlTemplate>
  414. </Setter.Value>
  415. </Setter>
  416. </Style>
  417. </RepeatButton.Style>
  418. </RepeatButton>
  419. </Track.IncreaseRepeatButton>
  420. </Track>
  421. </Grid>
  422. </Border>
  423. <ControlTemplate.Triggers>
  424. <Trigger Property="Slider.TickPlacement" Value="TopLeft">
  425. <Setter TargetName="TopTick" Property="UIElement.Visibility" Value="Visible" />
  426. <Setter TargetName="Thumb" Property="Control.Template">
  427. <Setter.Value>
  428. <ControlTemplate TargetType="{x:Type Thumb}">
  429. <Grid
  430. HorizontalAlignment="Center"
  431. VerticalAlignment="Center"
  432. UseLayoutRounding="True">
  433. <Path
  434. Name="grip"
  435. VerticalAlignment="Center"
  436. Fill="#477EDE"
  437. SnapsToDevicePixels="True"
  438. Stretch="Fill"
  439. Stroke="#477EDE"
  440. StrokeThickness="1"
  441. UseLayoutRounding="True">
  442. <Path.Data>
  443. <RectangleGeometry
  444. RadiusX="4"
  445. RadiusY="4"
  446. Rect="0,0,8,16" />
  447. </Path.Data>
  448. </Path>
  449. </Grid>
  450. <ControlTemplate.Triggers>
  451. <Trigger Property="UIElement.IsMouseOver" Value="True">
  452. <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
  453. <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
  454. </Trigger>
  455. <Trigger Property="Thumb.IsDragging" Value="True">
  456. <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
  457. <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
  458. </Trigger>
  459. <Trigger Property="UIElement.IsEnabled" Value="False">
  460. <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
  461. <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
  462. </Trigger>
  463. </ControlTemplate.Triggers>
  464. </ControlTemplate>
  465. </Setter.Value>
  466. </Setter>
  467. <Setter TargetName="TrackBackground" Property="FrameworkElement.Margin" Value="5,2,5,0" />
  468. </Trigger>
  469. <Trigger Property="Slider.TickPlacement" Value="BottomRight">
  470. <Setter TargetName="BottomTick" Property="UIElement.Visibility" Value="Visible" />
  471. <Setter TargetName="Thumb" Property="Control.Template">
  472. <Setter.Value>
  473. <ControlTemplate TargetType="{x:Type Thumb}">
  474. <Grid
  475. HorizontalAlignment="Center"
  476. VerticalAlignment="Center"
  477. UseLayoutRounding="True">
  478. <Path
  479. Name="grip"
  480. VerticalAlignment="Center"
  481. Fill="#477EDE"
  482. SnapsToDevicePixels="True"
  483. Stretch="Fill"
  484. Stroke="#477EDE"
  485. StrokeThickness="1"
  486. UseLayoutRounding="True">
  487. <Path.Data>
  488. <RectangleGeometry
  489. RadiusX="4"
  490. RadiusY="4"
  491. Rect="0,0,8,16" />
  492. </Path.Data>
  493. </Path>
  494. </Grid>
  495. <ControlTemplate.Triggers>
  496. <Trigger Property="UIElement.IsMouseOver" Value="True">
  497. <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
  498. <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
  499. </Trigger>
  500. <Trigger Property="Thumb.IsDragging" Value="True">
  501. <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
  502. <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
  503. </Trigger>
  504. <Trigger Property="UIElement.IsEnabled" Value="False">
  505. <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
  506. <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
  507. </Trigger>
  508. </ControlTemplate.Triggers>
  509. </ControlTemplate>
  510. </Setter.Value>
  511. </Setter>
  512. <Setter TargetName="TrackBackground" Property="FrameworkElement.Margin" Value="5,0,5,2" />
  513. </Trigger>
  514. <Trigger Property="Slider.TickPlacement" Value="Both">
  515. <Setter TargetName="TopTick" Property="UIElement.Visibility" Value="Visible" />
  516. <Setter TargetName="BottomTick" Property="UIElement.Visibility" Value="Visible" />
  517. </Trigger>
  518. <Trigger Property="Slider.IsSelectionRangeEnabled" Value="True">
  519. <Setter TargetName="PART_SelectionRange" Property="UIElement.Visibility" Value="Visible" />
  520. </Trigger>
  521. <Trigger Property="UIElement.IsKeyboardFocused" Value="True">
  522. <Setter TargetName="Thumb" Property="TextElement.Foreground" Value="#0000FF" />
  523. </Trigger>
  524. </ControlTemplate.Triggers>
  525. </ControlTemplate>
  526. </Setter.Value>
  527. </Setter>
  528. <Setter Property="SelectionStart" Value="{Binding Minimum, RelativeSource={RelativeSource Self}}" />
  529. <Setter Property="SelectionEnd" Value="{Binding Value, RelativeSource={RelativeSource Self}}" />
  530. </Style>
  531. </ResourceDictionary>