diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/InputBase.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/InputBase.cs index 05f90d1b..58c656be 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/InputBase.cs +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Primitives/InputBase.cs @@ -80,7 +80,9 @@ namespace Microsoft.Windows.Controls.Primitives protected virtual void OnValueChanged(object oldValue, object newValue) { - + RoutedPropertyChangedEventArgs args = new RoutedPropertyChangedEventArgs(oldValue, newValue); + args.RoutedEvent = InputBase.ValueChangedEvent; + RaiseEvent(args); } private static object OnCoerceValuePropertyCallback(DependencyObject d, object baseValue) @@ -139,6 +141,17 @@ namespace Microsoft.Windows.Controls.Primitives #endregion //Base Class Overrides + #region Events + + public static readonly RoutedEvent ValueChangedEvent = EventManager.RegisterRoutedEvent("ValueChanged", RoutingStrategy.Bubble, typeof(RoutedPropertyChangedEventHandler), typeof(InputBase)); + public event RoutedPropertyChangedEventHandler ValueChanged + { + add { AddHandler(ValueChangedEvent, value); } + remove { RemoveHandler(ValueChangedEvent, value); } + } + + #endregion //Events + #region Methods protected void SyncTextAndValueProperties(DependencyProperty p, object newValue) diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/DateTimeUpDown.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/DateTimeUpDown.cs index 75599da1..8cd4daef 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/DateTimeUpDown.cs +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/DateTimeUpDown.cs @@ -62,6 +62,8 @@ namespace Microsoft.Windows.Controls { //whenever the value changes we need to parse out the value into out DateTimeInfo segments so we can keep track of the individual pieces ParseValueIntoDateTimeInfo(); + + base.OnValueChanged(oldValue, newValue); } #endregion //Constructors diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/NumericUpDown.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/NumericUpDown.cs index 9a8947a0..a7456002 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/NumericUpDown.cs +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/NumericUpDown/NumericUpDown.cs @@ -99,6 +99,7 @@ namespace Microsoft.Windows.Controls protected override void OnValueChanged(object oldValue, object newValue) { SetValidSpinDirection(); + base.OnValueChanged(oldValue, newValue); } protected override object OnCoerceValue(object value)