Reputation: 2382
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
then hit enter
it changes to 9
instead of 83,64
.
When I enter 723
and hit enter
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
and hit enter
it stays on this value as it should.
Am I overlooking something or is this some kind of decimal separator bug?
Upvotes: 0
Views: 821
Reputation: 96
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.
Upvotes: 3