Most MVVM examples I have worked through have had the Model implement INotifyPropertyChanged, but in Josh Smith’s CommandSink example the ViewModel implements INotifyPropertyChanged.
I’m still cognitively putting together the MVVM concepts, so I don’t know if:
- You have to put the
INotifyPropertyChangedin the ViewModel to getCommandSinkto work - This is just an aberration of the norm and it doesn’t really matter
- You should always have the Model implement
INotifyPropertyChangedand this is just a mistake which would be corrected if this were developed from a code example to an application
What have been others’ experiences on MVVM projects you have worked on?
I’d say quite the opposite, I always put my
INotifyPropertyChangedon my ViewModel – you really don’t want to be polluting your model with a fairly WPF specific feature likeINotifyPropertyChanged, that stuff should sit in the ViewModel.I’m sure others would disagree, but that’s the way I work.