0

I have DecimalUpDown on form

<xceed:DecimalUpDown Value="{Binding Value}" FormatString="C2" Maximum="{Binding MaxValue}" Minimum="0">

Value is decimal.

MaxValue is decimal.

Double checked.


When my MaxValue is for example 83,64 and I enter 90

enter image description here

then hit enter

enter image description here

it changes to 9 instead of 83,64.


When I enter 723

enter image description here

and hit enter

enter image description here

it changes to 72 instead of 83,64.


I suspect it's something with this Maximum constraint because when I remove it

<xceed:DecimalUpDown Value="{Binding Value}" FormatString="C2" Minimum="0">

and enter - for example - 48,65

enter image description here

and hit enter

enter image description here

it stays on this value as it should.

Am I overlooking something or is this some kind of decimal separator bug?

a''
  • 2,322
  • 2
  • 23
  • 34
  • 1
    I get the same effect both with decimal & integer fields - what seems to happen if the input value exceeds the maximum value then rather than set the max value, characters are deleted from the end of the string until the value is within range. I do not know if this is documented behaviour or a bug. – PaulF Nov 06 '15 at 15:20

1 Answers1

3

When the Maximum is 83,64 and you enter 90, you are out of range, so an exception is raised and the last valid value entered is kept : 9.

If you want to set the Maximum value when the value entered is greater than the Maximum, set the property ClipValueToMinMax to true. Entering 90 will result in 83,64.

BoucherS
  • 96
  • 2