private static void OnTimePartPropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs e) { TimeBox control = source as TimeBox; int newValue = (int)e.NewValue; int oldValue = (int)e.OldValue; if (newValue != oldValue) { control.Time = control.ComposeTime(); } }
private static void OnTimePropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs e) { TimeBox control = source as TimeBox; TimeSpan newValue = (TimeSpan)e.NewValue; TimeSpan oldValue = (TimeSpan)e.OldValue; if (newValue != oldValue) { control.SetTimeParts(newValue); } }