protected void SetScalarValue(DependencyProperty property, KinematicViscosity? quantity)
 {
     // we set this flag to prevent from setting scalar value changing quantity values.
     this.isUpdatingScalarValue = true;
     var value = quantity != null
         ? this.Unit.GetScalarValue(quantity.Value)
         : (double?)null;
     this.SetCurrentValue(property, value);
     this.isUpdatingScalarValue = false;
 }
 protected virtual void OnMaxValueChanged(KinematicViscosity? oldValue, KinematicViscosity? newValue)
 {
     this.SetScalarValue(ScalarMaxValueProperty, newValue);
 }