You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DoubleUpDown behaviour when ClipValueToMinMax = false #1801
I have a DoubleUpDown control bound to a VM property using 'UpdateSourceTrigger=LostFocus'. When ClipValueToMinMax=false, typing an out of range value then tabbing away seems to result in one or more digits being removed from the end of the value to bring it within the Min/Max range. For example if Max=20000, entering a value of (say) 123456 results in the VM property being set to 12345. Similarly if I enter 1234567 then two digits are removed and the VM property is again set to 12345. This solution is confusing users as it can result in "random" values being applied.
Could the control's behaviour be changed such that if I enter an out of range value then tab away, the VM property does not get updated and the on-screen value reverts to the current (valid) value. I appreciate that this becomes more difficult/impractical when UpdateSourceTrigger=PropertyChanged (although this isn't a problem for me personally, as I always use LostFocus).
Activity
zhongruijia commentedon Jul 21, 2025
XceedBoucherS commentedon Aug 8, 2025
Hello,
Try setting the UpdateValueOnEnterKey to true.
As per documentation of UpdateValueOnEnterKey (https://xceed.com/documentation/xceed-toolkit-plus-for-wpf/Xceed.Wpf.Toolkit~Xceed.Wpf.Toolkit.Primitives.UpDownBase%601~UpdateValueOnEnterKey.html?highlight=updatevalueonenterkey%2C)
"Gets or sets a value indicating whether the synchronization between "Value" and "Text" should be done only on the Enter key press (and lost focus)."