修复部分 disabled 样式没处理好的问题

This commit is contained in:
polarboy 2024-07-29 13:45:40 +08:00
parent aeef64e952
commit 43295dc739
3 changed files with 4 additions and 2 deletions

View File

@ -32,7 +32,6 @@
IsEnabled="{Binding NormalEnabled}"
IsRangeMode="True"
TickFrequency="5"
Included="False"
Marks="{Binding SliderMarks}"
RangeValue="20, 80" />

View File

@ -122,6 +122,8 @@ internal class SliderTheme : ControlTheme
var sliderTrackStyle = new Style(selector => selector.Nesting().Template().OfType<SliderTrack>());
sliderTrackStyle.Add(SliderTrack.TrackBarBrushProperty, SliderResourceKey.TrackBgDisabled);
sliderTrackStyle.Add(SliderTrack.MarkBorderActiveBrushProperty, SliderResourceKey.ThumbCircleBorderColorDisabled);
sliderTrackStyle.Add(SliderTrack.MarkBorderBrushProperty, SliderResourceKey.ThumbCircleBorderColorDisabled);
disabledStyle.Add(sliderTrackStyle);
var thumbStyle = new Style(selector => selector.Nesting().Template().OfType<SliderThumb>());
thumbStyle.Add(SliderThumb.BorderBrushProperty, SliderResourceKey.ThumbCircleBorderColorDisabled);

View File

@ -308,7 +308,8 @@ public class SliderTrack : Control, IControlCustomStyle
IsRangeModeProperty);
AffectsRender<SliderTrack>(TrackBarBrushProperty,
TrackGrooveBrushProperty,
IncludedProperty);
IncludedProperty,
MarkBorderBrushProperty);
}
public SliderTrack()