Пример #1
0
        private static void OnValueChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            TimeControl control = obj as TimeControl;
            var         newTime = (TimeSpan)e.NewValue;

            control.Hours   = newTime.Hours;
            control.Minutes = newTime.Minutes;
        }
Пример #2
0
        private static void OnTimeChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            TimeControl control = obj as TimeControl;

            control.Value = new TimeSpan(0, control.Hours, control.Minutes, control.Seconds, control.Milliseconds);
        }