Skip to content

DoubleUpDown behaviour when ClipValueToMinMax = false #1801

@andrew-stephens

Description

@andrew-stephens

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).

I'm using v4.6.0 community edition under .Net 6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions