示例#1
0
        private static void OnCurrentDateTimePartChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            DateTimeUpDownBase <T> dateTimeUpDownBase = o as DateTimeUpDownBase <T>;

            if (dateTimeUpDownBase != null)
            {
                dateTimeUpDownBase.OnCurrentDateTimePartChanged((DateTimePart)e.OldValue, (DateTimePart)e.NewValue);
            }
        }
示例#2
0
        private static object OnCurrentDateTimePartCoerce(DependencyObject d, object baseValue)
        {
            DateTimeUpDownBase <T> dateTimeUpDownBase = d as DateTimeUpDownBase <T>;

            if (dateTimeUpDownBase != null)
            {
                return(dateTimeUpDownBase.OnCurrentDateTimePartCoerce(baseValue));
            }
            return(baseValue);
        }