private static void OnValueChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) { IntMultiSpinner control = (IntMultiSpinner)obj; RoutedPropertyChangedEventArgs <int> e = new RoutedPropertyChangedEventArgs <int>( (int)args.OldValue, (int)args.NewValue, ValueChangedEvent); control.OnValueChanged(e); }
private static object CoerceValue(DependencyObject element, object value) { int newValue = (int)value; IntMultiSpinner control = (IntMultiSpinner)element; newValue = Math.Max(control.MinValue, Math.Min(control.MaxValue, newValue)); return(newValue); }