protected override void HandlePropertyChanged(object sender, PropertyChangedEventArgs e) { if (sender == TimedButtonVM && ( TimedButtonVM.NeedsSync(e, nameof(TimedButtonVM.ButtonTime)) || TimedButtonVM.NeedsSync(e, nameof(ButtonVM.BackgroundColor)) || TimedButtonVM.NeedsSync(e, nameof(ButtonVM.TextColor)) || TimedButtonVM.NeedsSync(e, nameof(ButtonVM.Name)) || TimedButtonVM.NeedsSync(e, nameof(ButtonVM.HotKey)))) { ReDraw(); } }
protected override void HandlePropertyChanged(object sender, PropertyChangedEventArgs e) { base.HandlePropertyChanged(sender, e); if (ViewModel.NeedsSync(e.PropertyName, nameof(ViewModel.ButtonTime), sender, ViewModel)) { if (ViewModel.ButtonTime == null) { Clear(); } } if (sender == ViewModel && ( TimedButtonVM.NeedsSync(e, nameof(ViewModel.TagsPerRow)) || TimedButtonVM.NeedsSync(e, nameof(ViewModel.ShowSubcategories)))) { ReDraw(); } }