Skip to content

Commit

Permalink
fixed a bug of WaveProgressBar
Browse files Browse the repository at this point in the history
  • Loading branch information
NaBian committed Feb 5, 2021
1 parent 0e6bb92 commit 83a44aa
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 83a44aa

Please sign in to comment.