Esempio n. 1
0
        private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            MyDependencyObject control = (MyDependencyObject)d;
            var e1 = new RoutedPropertyChangedEventArgs <int>((int)e.OldValue,
                                                              (int)e.NewValue, ValueChangedEvent);

            control.OnValueChanged(e1);
        }
Esempio n. 2
0
        private static object CoreVerifyValue(DependencyObject d, object baseValue)
        {
            int newValue = (int)baseValue;
            MyDependencyObject control = (MyDependencyObject)d;

            newValue = Math.Max(control.MinValue, Math.Min(control.MaxValue, newValue));
            return(newValue);
        }