Reputation: 2069
I'm using the Framework Mahapps.Metro
, in the documentation for disable the decimal value there is a property: HasDecimals
, I set it to False
but if I type: 5.01
the control allow me to insert this value. Maybe it's a bug?
<Controls:NumericUpDown x:Name="Timer" Minimum="5" Value="15" HasDecimals="False" Maximum="1440" />
Also I want ask how can I disable the scientific value, so accept only integer. Is possible do this via XAML? Or How can I do this behind code?
Upvotes: 3
Views: 1565
Reputation: 126
Was looking for this as well recently but thought I'd share what I found for anyone else that's looking. The HasDecimals
property will be removed in an future release, thus you should use the NumericInputMode
property instead like below.
<Controls:NumericUpDown Value="50" Interval="1" NumericInputMode="Numbers"/>
Upvotes: 5
Reputation: 11
Try this works for me
<Controls:NumericUpDown Minimum="0" Maximum="10" Interval="1" HasDecimals="False"/>
Upvotes: 1