Click here to Skip to main content
14,664,507 members
Rate this:
Please Sign up or sign in to vote.
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

Rate this:
Please Sign up or sign in to vote.

Solution 1

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

An example is as below:
MVVM Sample
   
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, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100