.NET: Is there a built-in version of PropertyChangedEventArgs that includes the old / new value?

Is there a built-in version of PropertyChangedEventArgs that includes the old / new value?

+4
source share
2 answers

No. Within PropertyChangedEventArgs there is no tracking of new / old values. Of course, you can subclass it.

As an exercise, you may need to implement an adapter that works with INotifyPropertyChanged in conjunction with INotifyPropertyChanging to capture values ​​before / after and send them that way.

In WPF, dependency properties are the norm to enhance your change notifications with new / old values.

+6
source

In no WPF, no. You can subclass PropertyChangedEventArgs and add your additional properties.

I do not know about WPF. Perhaps this has something else that serves a similar purpose.

+2
source

Source: https://habr.com/ru/post/1339279/


All Articles