Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Commented Unassigned: DoubleUpDown handles 0 and .1 weird [22210]

$
0
0
When setting the increment to .1, when I shift up and down and pass and .1 it displays -1.38777878078145E-16 for 0 and 0.0999999999999999 for 1
Comments: ** Comment from web user: BoucherS **

Hi,

You are right, adding
```
FormatString="{}{0:N1}"
```
will not fix your case. This "FormatString" format will only work in v3.0 (which is about to be released).
In the meantime, try using it by adding :
```
FormatString="N1"
```
Your result will be limited to 1 decimal place. No strange values will appear while using the Up/Down arrows from -0.5 to 1.5.
By the way, I don't get "0.0999999999999999 for 1". It looks pretty far from 1 !
Thanks.


Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>