Ejemplo n.º 1
0
        private static object CoerceMaximum(DependencyObject element, object value)
        {
            YearControl adjCtl = (YearControl)element;
            int         newMax = (int)value > adjCtl.Minimum ? (int)value : adjCtl.Minimum;

            return(newMax);
        }
Ejemplo n.º 2
0
        private static object CoerceValue(DependencyObject element, object value)
        {
            int         newValue = (int)value;
            YearControl adjCtl   = (YearControl)element;

            newValue = newValue > adjCtl.Maximum ? adjCtl.Maximum : newValue;
            newValue = newValue < adjCtl.Minimum ? adjCtl.Minimum : newValue;
            return(newValue);
        }
Ejemplo n.º 3
0
        public static void OnValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            YearControl adjCtl = (YearControl)sender;

            adjCtl.UpdateVisibles();
        }