…
public double Value
{
get
{
return this.value;
}
set
{
if (this.value != value)
{
this.value = value;
ValidateValue(value);
OnPropertyChanged("Value");
}
}
}
private async void ValidateValue(double value)
{
// If current value is Scale's End value
if (value == this.Gauge.Scales[0].EndValue)
{
await Task.Delay(this.resetDelay);
// little before the animation get completed, reset the NeedlePointer's value to Scale's StartValue without animation.
this.Gauge.Scales[0].Pointers[0].EnableAnimation = false;
this.Value = this.Gauge.Scales[0].StartValue;
this.Gauge.Scales[0].Pointers[0].EnableAnimation = true;
}
}
… |