-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
Description
Describe the bug
When updating the NumberFormat in a binding, the text shown by the NumericUpDown does not change
To Reproduce
any binding
Expected behavior
to update the text automatically on binding change
Avalonia version
OS
No response
Additional context
I would update line 469 (OnNumberFormatChanged) and 565 (OnTextConverterChanged)
to match OnFormatStringChanged, and calling SyncTextAndValueProperties with the third parameter set to true;
This is the code I would consider right,
protected virtual void OnNumberFormatChanged(NumberFormatInfo? oldValue, NumberFormatInfo? newValue)
{
if (IsInitialized)
{
SyncTextAndValueProperties(false, null, true);
}
}
protected virtual void OnTextConverterChanged(IValueConverter? oldValue, IValueConverter? newValue)
{
if (IsInitialized)
{
SyncTextAndValueProperties(false, null, true);
}
}