xceedsoftware / wpftoolkit

All the controls missing in WPF. Over 1 million downloads.
Other
3.89k stars 877 forks source link

SingleUpDown can only show 5 digits precisely at most #1496

Open ShannonZ opened 5 years ago

ShannonZ commented 5 years ago

How to reproduce

Type 0.1234567 and leave, you will get 0.1234600

Key Factor Value="{Binding floatvalue}" [After remove this Binding , all works well.

ShannonZ commented 5 years ago

If type in “9.87654321” the displayed last 2 digits will randomly changed

XceedBoucherS commented 5 years ago

Hi, I cannot reproduce the first issue : "Type 0.1234567 and leave, you will get 0.1234600. " After leaving, I always see what I typed : 0.1234567 Removing the binding doesn't change anything.

ShannonZ commented 5 years ago

`<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls" xmlns:local="clr-namespace:MDT_Exceed" xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2" x:Class="MDT_Exceed.MainWindow" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800">

public partial class MainWindow : Window,INotifyPropertyChanged { public double floatvalue { get; set; } public MainWindow() { InitializeComponent();

        floatvalue = 0.1234567f;
        DataContext = this;
    } `

Using these codes please (I installed v3.5 from nuget).

XceedBoucherS commented 5 years ago

Hi, Using v3.5 from Nuget and your code : upon loading, the singleUpDown displays "0.1234567" Clicking on the "Change Focus" button do not change anything. typing "0.987654321"in the SingleUpDown and click on the "Change Focus" button displays : "0.9876543", which is normal. I never get :"0.1234600" after typing "0.1234567" and clicking the "Change Focus" button.