TimeFilterControl - hyperlink commands should update props with SetCurrentValue (i.e. don't break bindings)

This commit is contained in:
John Colvin committed 2018-11-02 13:59:27 -05:00
1 parent 95b0119d22
commit cdde730fc5
1 file changed
+3 -3
@@ -45,9 +45,9 @@ namespace mbts.ui.controls {
var clear_begin_time = this.assert_template_child<Hyperlink>("ClearBeginLink");
var clear_end_time = this.assert_template_child<Hyperlink>("ClearEndLink");
var set_last_hour = this.assert_template_child<Hyperlink>("SetLastHourLink");
clear_begin_time.Command = new DelegateCommand(() => Begin = default);
clear_end_time.Command = new DelegateCommand(() => End = default);
set_last_hour.Command = new DelegateCommand(() => Begin = TimeTextTuple.FromDateTime(DateTime.Now.AddHours(-1)));
clear_begin_time.Command = new DelegateCommand(() => SetCurrentValue(BeginProperty, default(TimeTextTuple)));
clear_end_time.Command = new DelegateCommand(() => SetCurrentValue(EndProperty, default(TimeTextTuple)));
set_last_hour.Command = new DelegateCommand(() => SetCurrentValue(BeginProperty, TimeTextTuple.FromDateTime(DateTime.Now.AddHours(-1))));
}
class TimeFilterErrorAdorner : NotifyDataErrorAdorner<TimeFilterControl, ITimeFilterVM>, IDisposable {