Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I read lots of articles and found that INotifyPropertyChanged use in bothes ViewModel and Model as well. So, I am confused about in MVVM should the ViewModel or Model implement INotifyPropertyChanged?
Posted
Comments
[no name] 15-Oct-14 8:34am    
It's up to you how you want to do it.
manicoder 15-Oct-14 8:37am    
It's means it not mandatory that it must use only in ViewModel. Can you prove me any example or any article or any link from Microsoft.
[no name] 15-Oct-14 8:54am    
It means that you can do one or the other or both. There aren't any "rules" that dictate how you will do it. If it makes sense for your project to have your model implement INotifyPropertyChanged then do it in the model. If it doesn't make sense then don't. Personally, I implement it in the VM 99% of the time but that is just me.
manicoder 16-Oct-14 1:33am    
Thanks Wes Aday
manicoder 16-Oct-14 1:36am    
Thanks Wes Aday

1 solution

I would suggest you to implement in both : Model and ViewModel

An example is as below:
MVVM Sample
 
Share this answer
 
Comments
manicoder 16-Oct-14 1:36am    
Thanks Aditya

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900