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; }
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); }