From 83a44aa6768270335af76518ce75e009be0befbc Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Fri, 5 Feb 2021 22:48:14 +0800 Subject: [PATCH] fixed a bug of WaveProgressBar [#I295DS](https://gitee.com/handyorg/HandyControl/issues/I295DS) --- .../Controls/ProgressBar/WaveProgressBar.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Shared/HandyControl_Shared/Controls/ProgressBar/WaveProgressBar.cs b/src/Shared/HandyControl_Shared/Controls/ProgressBar/WaveProgressBar.cs index 3c8c4721d..ecdc981a4 100644 --- a/src/Shared/HandyControl_Shared/Controls/ProgressBar/WaveProgressBar.cs +++ b/src/Shared/HandyControl_Shared/Controls/ProgressBar/WaveProgressBar.cs @@ -29,16 +29,17 @@ public class WaveProgressBar : RangeBase static WaveProgressBar() { - FocusableProperty.OverrideMetadata(typeof(WaveProgressBar), - new FrameworkPropertyMetadata(ValueBoxes.FalseBox)); - MaximumProperty.OverrideMetadata(typeof(WaveProgressBar), - new FrameworkPropertyMetadata(ValueBoxes.Double100Box)); + FocusableProperty.OverrideMetadata(typeof(WaveProgressBar), new FrameworkPropertyMetadata(ValueBoxes.FalseBox)); + MaximumProperty.OverrideMetadata(typeof(WaveProgressBar), new FrameworkPropertyMetadata(ValueBoxes.Double100Box)); } + protected override void OnMinimumChanged(double oldMinimum, double newMinimum) => UpdateWave(Value); + + protected override void OnMaximumChanged(double oldMaximum, double newMaximum) => UpdateWave(Value); + protected override void OnValueChanged(double oldValue, double newValue) { base.OnValueChanged(oldValue, newValue); - UpdateWave(newValue); }