NumericUpDown control
See original GitHub issueDescribe the bug When the NumericUpDown control is at a value of 5.6 and Increment is 0.01, if adjusted up, it will appear as 0.570000000000000001 instead of 0.57
Code
<NumericUpDown Value="0.56" Minimum="0" Maximum="10" Increment="0.01"/>
Expected behavior The value should beThe value should be 0.57
Screenshots
Desktop (please complete the following information):
- OS: win 10
- Version 0.9.12
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
NumericUpDown Class (System.Windows.Forms)
A NumericUpDown control contains a single numeric value that can be incremented or decremented by clicking the up or down buttons of the...
Read more >NumericUpDown Control - Windows Forms .NET Framework
The control displays and sets a single numeric value from a list of choices. The user can increase and decrease the number by...
Read more >NumericUpDown In C#
A NumericUpDown control allows users to provide a spin (up/down) interface to move through pre-defined numbers using up and down arrows.
Read more >C# | NumericUpDown Class
In Windows Forms, NumericUpDown control is used to provide a Windows spin box or an up-down control which displays the numeric values.
Read more >C# - How to use NumericUpDown control?
It allows the users to increment or decrement the value within the given range by using Keyboard Up & Down arrow keys or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Related: https://github.com/AvaloniaUI/Avalonia/issues/4756 To fix this i’m using FormatString=“{}{0:0.00}”
I think we should port
NumericUpDown.DecimalPlaces
from WPF to correctly round the values: https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.numericupdown.decimalplaces?view=net-5.0