From b7900c5ac96ea5b7da4d2dd576c79e49f0696f7b Mon Sep 17 00:00:00 2001 From: brianlagunas_cp Date: Tue, 9 Nov 2010 01:32:36 +0000 Subject: [PATCH] NumericUpDown: Bug fix [14622]: When defining the properties for the NumericUpDown, if you define the Value property before the Maximum and Minimum properties , the Spiners will not eveluate the Max/Min value properly. If you don't want to compile the source for the fix, just be sure to define all properties prior to setting the Value property. --- .../Src/WPFToolkit.Extended/NumericUpDown/NumericUpDown.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/NumericUpDown.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/NumericUpDown.cs index 4ae1e983..f9e3e28b 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/NumericUpDown.cs +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/NumericUpDown.cs @@ -19,11 +19,14 @@ namespace Microsoft.Windows.Controls private static void OnMinimumPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { + NumericUpDown nud = d as NumericUpDown; + nud.SetValidSpinDirection(); } protected virtual void OnMinimumChanged(double oldValue, double newValue) { } + #endregion Minimum #region Maximum @@ -37,6 +40,8 @@ namespace Microsoft.Windows.Controls private static void OnMaximumPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { + NumericUpDown nud = d as NumericUpDown; + nud.SetValidSpinDirection(); } protected virtual void OnMaximumChanged(double oldValue, double newValue)