should not SyncTextAndValue while fromTextToValue and clamp

This commit is contained in:
heartacker
2024-03-21 15:30:53 +08:00
parent c3ed31659b
commit f41d299338

View File

@@ -565,7 +565,14 @@ public abstract class NumericUpDownBase<T> : NumericUpDown where T : struct, ICo
}
if (!Equals(newValue, Value))
{
SetCurrentValue(ValueProperty, newValue);
if (Equals(Clamp(newValue, Maximum, Minimum), newValue))
{
SetCurrentValue(ValueProperty, newValue);
}
else
{
parsedTextIsValid = false;
}
}
}
catch