INotifyPropertyChange – notifying about change of all properties at once

Today, working on a new feature for my pet project, I realized that I have to notify the view, that all properties in view model have changed. The most obvious way to achieve that would, of course be to rise PropertyChange event a bunch of times.

This is good solution for one time usage, however I was interested in something more general, something which could be extracted to base view model. Fortunately, it turns out that there is a simple trick to do that. All You have to do is use an empty string or null as a property name. So in my case this comes down to this one-liner

INotifyPropertyChange – notifying about change of all properties at once

One thought on “INotifyPropertyChange – notifying about change of all properties at once

Comments are closed.