示例#1
0
        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);
        }
示例#2
0
        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);
        }