wpf-currency-textbox icon indicating copy to clipboard operation
wpf-currency-textbox copied to clipboard

Feature/maximum and minimum value

Open MrZander opened this issue 8 years ago • 2 comments

Added option to put a minimum and maximum value on the input. Should not break any existing code because the properties default to decimal.MinValue and decimal.MaxValue. Also added a .gitattribute file to fix line ending problems.

MrZander avatar Sep 13 '16 00:09 MrZander

It seems like having a max/min value would be a jarring experience for the user.

Example:

Let's say the maximum value is 10.00 and the user types 1234:

  • 0.01
  • 0.12
  • 1.23
  • 10.00: the user would've expected to see 12.34... they might think they mis-typed the 4 and try again. Also they can't just backspace to try again since the 2 was changed to a 0.

If we instead use validation to show an error if the value is too large then interaction behaves as expected and the user is informed why their value is invalid.

mtusk avatar Sep 13 '16 04:09 mtusk

I like that idea. I also noticed it was a little clunky. For example, if you set a minimum of 0 and press '-', it immediately sets the number to 0, which is probably unexpected to the user.

Validation is probably a better way to go.

MrZander avatar Sep 13 '16 18:09 MrZander