Quantcast
Channel: Our ComponentOne » All Posts
Viewing all articles
Browse latest Browse all 14170

Reply To: C1NumericBox Bug

$
0
0

Hello Patrick,

As per the development team, this is by design, control retains a text according to the specified format. You are using hidden paths in attempt to reach the desired behavior by working directly with internal element in control’s template, so he can’t guarantee a compatibility on this level, so the issue can’t be treated as a compatibility issue.

As a workaround, in case where user doesn’t suppose null as control’s value, he has suggested the following things:
1) Set AllowNull to True.
2) Add the following event handlers for the control’s GotFocus and LostFocus events:

   private void c1NumericBox1_GotFocus_1(object sender, RoutedEventArgs e)
        {
            if (c1NumericBox1.Value == 0.0)
                c1NumericBox1.Value = double.NaN;
        }

        private void c1NumericBox1_LostFocus_1(object sender, RoutedEventArgs e)
        {
            if (double.IsNaN(c1NumericBox1.Value))
                c1NumericBox1.Value = 0.0;
        }

In the future, they can consider a possibility to show a zero value as an empty string, which will be controlled by a special property but there is no ETA on it.

Regards


Viewing all articles
Browse latest Browse all 14170

Trending Articles



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