This project has moved and is read-only. For the latest updates, please go here.

NumericUpDown/DataForm bug


When editing a item in a DataForm, the Commit button does not become enabled when the NumericUpDown's value is changed using the spinner UNLESS the NumericUpDown's textbox first receives focus. If the user clicks on the spinner without the textbox having focus, the value will change, but the Commit button will not become enabled as it should. (October 2009 Toolkit)
<input:NumericUpDown Value="{Binding ITEMCOUNT, Mode=TwoWay}" />


louisatwork wrote Dec 9, 2009 at 2:45 PM

The problem is still there in the November 2009 Toolkit. Please fix this issue.

wrote Mar 25, 2010 at 9:34 AM

Aquilax wrote Mar 25, 2010 at 10:30 AM

Here how to fix it, extend the NumericUpDown and override the OnSpin method:

protected override void OnSpin(SpinEventArgs e)
//Getting focus, so the data form activate itself.
//Delaying the call to the base method to allow the data form to handle the got focus event.
Action<SpinEventArgs> baseOnSpin = base.OnSpin;
System.Windows.Threading.DispatcherTimer timer = new System.Windows.Threading.DispatcherTimer();
timer.Interval = TimeSpan.Zero;
timer.Tick += (s, ex) => { timer.Stop(); baseOnSpin(e); };

wrote Aug 23, 2010 at 9:01 PM

wrote Nov 1, 2010 at 11:06 PM

wrote Nov 1, 2010 at 11:13 PM

wrote Mar 18, 2011 at 8:21 AM

wrote Apr 5, 2012 at 2:46 AM

wrote Feb 22, 2013 at 2:52 AM