Skip to content

Commit b192287

Browse files
ranjeshjkarkarl
authored andcommitted
update controls to use design token colors, update styles (#3728)
1 parent 7f83c6c commit b192287

File tree

2 files changed

+49
-4
lines changed

2 files changed

+49
-4
lines changed

Diff for: dev/ProgressBar/ProgressBar_themeresources_v2.5.xaml

+7-4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
<SolidColorBrush x:Key="ProgressBarBorderThemeBrush" Color="{ThemeResource SystemColorButtonTextColor}" />
2828
<SolidColorBrush x:Key="ProgressBarForegroundThemeBrush" Color="{ThemeResource SystemColorHighlightColor}" />
2929
<SolidColorBrush x:Key="ProgressBarIndeterminateForegroundThemeBrush" Color="{ThemeResource SystemColorHighlightColor}" />
30+
<StaticResource x:Key="ProgressBarForeground" ResourceKey="SystemControlHighlightAccentBrush" />
31+
<StaticResource x:Key="ProgressBarBackground" ResourceKey="SystemControlBackgroundBaseLowBrush" />
32+
<StaticResource x:Key="ProgressBarBorderBrush" ResourceKey="SystemControlForegroundBaseHighBrush" />
3033
</ResourceDictionary>
3134
<ResourceDictionary x:Key="Light">
3235
<x:Double x:Key="ProgressBarIndicatorPauseOpacity">0.6</x:Double>
@@ -46,10 +49,10 @@
4649
<Style TargetType="ProgressBar" BasedOn="{StaticResource DefaultProgressBarStyle}" />
4750

4851
<Style x:Key="DefaultProgressBarStyle" TargetType="ProgressBar">
49-
<Setter Property="Foreground" Value="{ThemeResource SystemControlHighlightAccentBrush}" />
50-
<Setter Property="Background" Value="{ThemeResource SystemControlBackgroundBaseLowBrush}" />
52+
<Setter Property="Foreground" Value="{ThemeResource ProgressBarForeground}" />
53+
<Setter Property="Background" Value="{ThemeResource ProgressBarBackground}" />
5154
<Setter Property="BorderThickness" Value="{ThemeResource ProgressBarBorderThemeThickness}" />
52-
<Setter Property="BorderBrush" Value="{ThemeResource SystemControlHighlightTransparentBrush}" />
55+
<Setter Property="BorderBrush" Value="{ThemeResource ProgressBarBorderBrush}" />
5356
<Setter Property="Maximum" Value="100" />
5457
<Setter Property="MinHeight" Value="{ThemeResource ProgressBarThemeMinHeight}" />
5558
<Setter Property="IsTabStop" Value="False" />
@@ -192,7 +195,7 @@
192195
<VisualState x:Name="Paused">
193196
<Storyboard>
194197
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ProgressBarIndicator" Storyboard.TargetProperty="Fill">
195-
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlForegroundAccentBrush}" />
198+
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ProgressBarForeground}" />
196199
</ObjectAnimationUsingKeyFrames>
197200
<DoubleAnimation Storyboard.TargetName="ProgressBarIndicator" Storyboard.TargetProperty="Opacity" To="{ThemeResource ProgressBarIndicatorPauseOpacity}" Duration="0:0:0.25" />
198201
</Storyboard>

Diff for: dev/Slider/Slider_themeresources.xaml

+42
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,27 @@
1313
<Thickness x:Key="SliderBorderThemeThickness">0</Thickness>
1414
<Thickness x:Key="SliderHeaderThemeMargin">0,0,0,4</Thickness>
1515
<FontWeight x:Key="SliderHeaderThemeFontWeight">Normal</FontWeight>
16+
<StaticResource x:Key="SliderContainerBackground" ResourceKey="GhostFillColorTransparentBrush" />
17+
<StaticResource x:Key="SliderContainerBackgroundPointerOver" ResourceKey="GhostFillColorTransparentBrush" />
18+
<StaticResource x:Key="SliderContainerBackgroundPressed" ResourceKey="GhostFillColorTransparentBrush" />
19+
<StaticResource x:Key="SliderContainerBackgroundDisabled" ResourceKey="GhostFillColorTransparentBrush" />
20+
<StaticResource x:Key="SliderThumbBackground" ResourceKey="AccentAAFillColorDefaultBrush" />
21+
<StaticResource x:Key="SliderThumbBackgroundPointerOver" ResourceKey="AccentAAFillColorSecondaryBrush" />
22+
<StaticResource x:Key="SliderThumbBackgroundPressed" ResourceKey="AccentAAFillColorTertiaryBrush" />
23+
<StaticResource x:Key="SliderThumbBackgroundDisabled" ResourceKey="ControlAAFillColorDisabledBrush" />
24+
<StaticResource x:Key="SliderTrackFill" ResourceKey="ControlAltFillColorTertiaryBrush" />
25+
<StaticResource x:Key="SliderTrackFillPointerOver" ResourceKey="ControlAltFillColorTertiaryBrush" />
26+
<StaticResource x:Key="SliderTrackFillPressed" ResourceKey="ControlAltFillColorTertiaryBrush" />
27+
<StaticResource x:Key="SliderTrackFillDisabled" ResourceKey="ControlAAFillColorDisabledBrush" />
28+
<StaticResource x:Key="SliderTrackValueFill" ResourceKey="AccentAAFillColorDefaultBrush" />
29+
<StaticResource x:Key="SliderTrackValueFillPointerOver" ResourceKey="AccentAAFillColorDefaultBrush" />
30+
<StaticResource x:Key="SliderTrackValueFillPressed" ResourceKey="AccentAAFillColorDefaultBrush" />
31+
<StaticResource x:Key="SliderTrackValueFillDisabled" ResourceKey="ControlAAFillColorDisabledBrush" />
32+
<StaticResource x:Key="SliderHeaderForeground" ResourceKey="TextFillColorPrimaryBrush" />
33+
<StaticResource x:Key="SliderHeaderForegroundDisabled" ResourceKey="TextFillColorDisabledBrush" />
34+
<StaticResource x:Key="SliderTickBarFill" ResourceKey="ControlAltFillColorTertiaryBrush" />
35+
<StaticResource x:Key="SliderTickBarFillDisabled" ResourceKey="TextFillColorDisabledBrush" />
36+
<StaticResource x:Key="SliderInlineTickBarFill" ResourceKey="ControlFillColorInputActiveBrush" />
1637

1738
<!-- ColorAnimation requires TargetProperty to be Color thus some resources point to the colour instead of brush-->
1839
<StaticResource x:Key="SliderContainerBackground" ResourceKey="ControlFillColorTransparentBrush" />
@@ -122,6 +143,27 @@
122143
<Thickness x:Key="SliderBorderThemeThickness">0</Thickness>
123144
<Thickness x:Key="SliderHeaderThemeMargin">0,0,0,4</Thickness>
124145
<FontWeight x:Key="SliderHeaderThemeFontWeight">Normal</FontWeight>
146+
<StaticResource x:Key="SliderContainerBackground" ResourceKey="GhostFillColorTransparentBrush" />
147+
<StaticResource x:Key="SliderContainerBackgroundPointerOver" ResourceKey="GhostFillColorTransparentBrush" />
148+
<StaticResource x:Key="SliderContainerBackgroundPressed" ResourceKey="GhostFillColorTransparentBrush" />
149+
<StaticResource x:Key="SliderContainerBackgroundDisabled" ResourceKey="GhostFillColorTransparentBrush" />
150+
<StaticResource x:Key="SliderThumbBackground" ResourceKey="AccentAAFillColorDefaultBrush" />
151+
<StaticResource x:Key="SliderThumbBackgroundPointerOver" ResourceKey="AccentAAFillColorSecondaryBrush" />
152+
<StaticResource x:Key="SliderThumbBackgroundPressed" ResourceKey="AccentAAFillColorTertiaryBrush" />
153+
<StaticResource x:Key="SliderThumbBackgroundDisabled" ResourceKey="ControlAAFillColorDisabledBrush" />
154+
<StaticResource x:Key="SliderTrackFill" ResourceKey="ControlAltFillColorTertiaryBrush" />
155+
<StaticResource x:Key="SliderTrackFillPointerOver" ResourceKey="ControlAltFillColorTertiaryBrush" />
156+
<StaticResource x:Key="SliderTrackFillPressed" ResourceKey="ControlAltFillColorTertiaryBrush" />
157+
<StaticResource x:Key="SliderTrackFillDisabled" ResourceKey="ControlAAFillColorDisabledBrush" />
158+
<StaticResource x:Key="SliderTrackValueFill" ResourceKey="AccentAAFillColorDefaultBrush" />
159+
<StaticResource x:Key="SliderTrackValueFillPointerOver" ResourceKey="AccentAAFillColorDefaultBrush" />
160+
<StaticResource x:Key="SliderTrackValueFillPressed" ResourceKey="AccentAAFillColorDefaultBrush" />
161+
<StaticResource x:Key="SliderTrackValueFillDisabled" ResourceKey="ControlAAFillColorDisabledBrush" />
162+
<StaticResource x:Key="SliderHeaderForeground" ResourceKey="TextFillColorPrimaryBrush" />
163+
<StaticResource x:Key="SliderHeaderForegroundDisabled" ResourceKey="TextFillColorDisabledBrush" />
164+
<StaticResource x:Key="SliderTickBarFill" ResourceKey="ControlAltFillColorTertiaryBrush" />
165+
<StaticResource x:Key="SliderTickBarFillDisabled" ResourceKey="TextFillColorDisabledBrush" />
166+
<StaticResource x:Key="SliderInlineTickBarFill" ResourceKey="ControlFillColorInputActiveBrush" />
125167

126168
<!-- ColorAnimation requires TargetProperty to be Color thus some resources point to the colour instead of brush-->
127169
<StaticResource x:Key="SliderContainerBackground" ResourceKey="ControlFillColorTransparentBrush" />

0 commit comments

Comments
 (0)