|
1 | | -<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. --> |
2 | | -<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 | | - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 | | - xmlns:controls="using:CommunityToolkit.WinUI.Controls"> |
| 1 | +<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. --> |
| 2 | +<ResourceDictionary |
| 3 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 4 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 5 | + xmlns:controls="using:CommunityToolkit.WinUI.Controls"> |
5 | 6 |
|
6 | | - <Style BasedOn="{StaticResource DefaultGradientSliderStyle}" |
7 | | - TargetType="controls:GradientSlider" /> |
| 7 | + <SolidColorBrush x:Key="PlaceHolderThumbFillBrush" Color="{ThemeResource ControlSolidFillColorDefault}" /> |
| 8 | + <SolidColorBrush x:Key="PlaceHolderThumbStrokeBrush" Color="{ThemeResource ControlStrongStrokeColorDefault}" /> |
| 9 | + <x:Double x:Key="PlaceHolderThumbStrokeThickness">0.5</x:Double> |
8 | 10 |
|
9 | | - <Style x:Key="DefaultGradientSliderStyle" |
10 | | - TargetType="controls:GradientSlider"> |
| 11 | + <Style BasedOn="{StaticResource DefaultGradientSliderStyle}" TargetType="controls:GradientSlider" /> |
| 12 | + |
| 13 | + <Style x:Key="DefaultGradientSliderStyle" TargetType="controls:GradientSlider"> |
11 | 14 | <Style.Setters> |
12 | 15 | <Setter Property="Template"> |
13 | 16 | <Setter.Value> |
14 | 17 | <ControlTemplate TargetType="controls:GradientSlider"> |
15 | 18 | <Grid MinHeight="20"> |
16 | | - <Rectangle x:Name="BackgroundRectangle" |
17 | | - Height="8" |
18 | | - HorizontalAlignment="Stretch" |
19 | | - VerticalAlignment="Center" /> |
20 | | - <Canvas x:Name="ContainerCanvas" |
21 | | - Background="Transparent" /> |
| 19 | + <Rectangle |
| 20 | + x:Name="BackgroundRectangle" |
| 21 | + Height="8" |
| 22 | + HorizontalAlignment="Stretch" |
| 23 | + VerticalAlignment="Center" /> |
| 24 | + <Canvas x:Name="ContainerCanvas" Background="Transparent"> |
| 25 | + <Thumb |
| 26 | + x:Name="PlaceholderThumb" |
| 27 | + IsEnabled="False" |
| 28 | + Visibility="Collapsed"> |
| 29 | + <Thumb.Style> |
| 30 | + <Style TargetType="Thumb"> |
| 31 | + <Setter Property="UseSystemFocusVisuals" Value="True" /> |
| 32 | + <Setter Property="BorderThickness" Value="1" /> |
| 33 | + <Setter Property="BorderBrush" Value="{ThemeResource SliderThumbBorderBrush}" /> |
| 34 | + <Setter Property="Height" Value="{ThemeResource SliderHorizontalThumbHeight}" /> |
| 35 | + <Setter Property="CornerRadius" Value="{ThemeResource SliderThumbCornerRadius}" /> |
| 36 | + <Setter Property="FocusVisualMargin" Value="-7" /> |
| 37 | + <Setter Property="Template"> |
| 38 | + <Setter.Value> |
| 39 | + <ControlTemplate TargetType="Thumb"> |
| 40 | + <Ellipse |
| 41 | + x:Name="SliderInnerThumb" |
| 42 | + Width="{ThemeResource SliderInnerThumbWidth}" |
| 43 | + Height="{ThemeResource SliderInnerThumbHeight}" |
| 44 | + Fill="{ThemeResource PlaceHolderThumbFillBrush}" |
| 45 | + Stroke="{ThemeResource PlaceHolderThumbStrokeBrush}" |
| 46 | + StrokeThickness="{ThemeResource PlaceHolderThumbStrokeThickness}" |
| 47 | + Margin="-4"/> |
| 48 | + </ControlTemplate> |
| 49 | + </Setter.Value> |
| 50 | + </Setter> |
| 51 | + </Style> |
| 52 | + </Thumb.Style> |
| 53 | + </Thumb> |
| 54 | + </Canvas> |
22 | 55 | </Grid> |
23 | 56 | </ControlTemplate> |
24 | 57 | </Setter.Value> |
25 | 58 | </Setter> |
26 | 59 | </Style.Setters> |
27 | 60 | </Style> |
28 | | - |
29 | 61 | </ResourceDictionary> |
0 commit comments