Infragistics|Ultimate UI WPF|XamNumericEditor-想要能夠只輸入0以上的整數值

infragistics log


如果希望XamNumericEditor只接受0以上的整數值,請設定ValueType為Int32與設定ValueConstraint MinInclusive為0。

xmlns:sys="clr-namespace:System;assembly=mscorlib"
.....
<igEditors:XamNumericEditor ValueType="{x:Type sys:Int32}">
<igEditors:XamNumericEditor.ValueConstraint>
<igEditors:ValueConstraint MinInclusive="0" />
</igEditors:XamNumericEditor.ValueConstraint>
</igEditors:XamNumericEditor>

Reference

ValueType 屬性 (ValueEditor)

https://jp.infragistics.com/help/wpf/infragisticswpf.editors~infragistics.windows.editors.valueeditor~valuetype

ValueConstraint 屬性

https://jp.infragistics.com/help/wpf/infragisticswpf.editors~infragistics.windows.editors.valueeditor~valueconstraint

MinInclusive 屬性

https://jp.infragistics.com/help/wpf/infragisticswpf.editors~infragistics.windows.editors.valueconstraint~mininclusive


延伸閱讀
aa71435723的大頭照
Winston

Eggplant DAI 自動化測試專家。

留言