Skip to content

Commit e23a895

Browse files
committed
Set slider DefaultForeground value in style
This fixes potential issues with shared instances of the brush
1 parent bc05c86 commit e23a895

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPickerSlider.Properties.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public ColorRepresentation ColorRepresentation
104104
typeof(Brush),
105105
typeof(ColorPickerSlider),
106106
new PropertyMetadata(
107-
new SolidColorBrush(Colors.Gray),
107+
null,
108108
(s, e) => (s as ColorPickerSlider)?.OnDependencyPropertyChanged(s, e)));
109109

110110
/// <summary>

Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPickerSlider.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
TargetType="controls:ColorPickerSlider">
1010
<Setter Property="VerticalAlignment" Value="Center" />
1111
<Setter Property="IsThumbToolTipEnabled" Value="False" />
12+
<Setter Property="DefaultForeground" Value="Gray" />
1213
<Setter Property="Template">
1314
<Setter.Value>
1415
<!-- Based on WinUI version 2.4.2 -->

0 commit comments

Comments
 (0)