public static void DecreaseCommand_Execute(object sender, ExecutedRoutedEventArgs e) { DelcamNumericUpDown objControl = (DelcamNumericUpDown)sender; if (objControl != null) { objControl.Decrease(); } }
private static void ValuePropertyChanged(DependencyObject g, DependencyPropertyChangedEventArgs e) { DelcamNumericUpDown numericUpDown = (DelcamNumericUpDown)g; decimal oldValue = (decimal)e.OldValue; decimal newValue = (decimal)e.NewValue; RoutedPropertyChangedEventArgs <decimal> args = new RoutedPropertyChangedEventArgs <decimal>(oldValue, newValue, ValueChangedEvent); numericUpDown.OnValueChanged(args); }