Beispiel #1
0
        private static object CoerceKnobValue(DependencyObject d, object baseValue)
        {
            KnobControl v = (KnobControl)d;
            double      x = (double)baseValue;

            x = x < v.Minimum ? v.Minimum : x;
            x = x > v.Maximum ? v.Maximum : x;
            return(x);
        }
Beispiel #2
0
        private static void OnKnobValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            KnobControl v = (KnobControl)d;

            d.CoerceValue(ValueProperty);
        }