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?
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 NumericInputModeproperty instead like below.
<Controls:NumericUpDown Value="50" Interval="1" NumericInputMode="Numbers"/>
Try this works for me
<Controls:NumericUpDown Minimum="0" Maximum="10" Interval="1" HasDecimals="False"/>

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With