Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to notify all properties of the view model has changed

In MVVM pattern, how to notify all properties of the view model has changed? I don' t want to call all notifypropertychanged event of all properties.

I have an entity class and in view model I wrote all of the public fields of the entity as public properties. I want to rebind new entity and just write a single line of code to notify that all properties has changed?

Thanks for your help.

like image 868
mkus Avatar asked Aug 06 '10 09:08

mkus


1 Answers

Just raise the PropertyChanged event with an empty string as the property name :

OnPropertyChanged(String.Empty); 
like image 101
Thomas Levesque Avatar answered Oct 15 '22 05:10

Thomas Levesque