public void RemoveNotifyPropertyChangedHandler(object value, IHandleNotifyPropertyChanged handler) { var notifyPropertyChanged = value as INotifyPropertyChanged; if (notifyPropertyChanged != null && handler != null) { notifyPropertyChanged.PropertyChanged -= handler.HandleNotifyPropertyChanged; } }
public void AddNotifyPropertyChangedHandler(object value, IHandleNotifyPropertyChanged handler) { RemoveNotifyPropertyChangedHandler(value, handler); var notifyPropertyChanged = value as INotifyPropertyChanged; if (notifyPropertyChanged != null && handler != null) { notifyPropertyChanged.PropertyChanged += handler.HandleNotifyPropertyChanged; } }