2015-11-06 77 views
0

工作我已經DecimalUpDown的形式Xceed DecimalUpDown - 最大結合奇怪

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

Valuedecimal

MaxValuedecimal

雙重檢查。


當我MaxValue是例如83,64和我進入90

enter image description here

然後按下回車鍵

enter image description here

它更改爲9,而不是83,64


當我進入723

enter image description here

並回車

enter image description here

它改變72而不是83,64


我懷疑它的東西與此Maximum約束,因爲當我刪除它

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

,並輸入 - 例如 - 48,65

enter image description here

並回車

enter image description here

它保持這個值,因爲它應該。

我可以忽略一些東西,或者這是一種小數分隔符錯誤嗎?

+1

我得到與十進制和整數字段相同的效果 - 如果輸入值超過最大值,而不是設置最大值,似乎會發生什麼情況,字符從字符串的末尾刪除,直到值在範圍內。我不知道這是記錄的行爲還是錯誤。 – PaulF

+0

感謝您的檢查 – erem

回答

3

當最大爲83,64和你輸入90,你是超出範圍,那麼將引發一個例外,進入了最後的有效值保持:9

如果你想設置最大當輸入的值大於最大值時,將屬性ClipValueToMinMax設置爲true。輸入90將導致83,64。