The standard MVVM approach is to implement INotifyPropertyChanged
only on the ViewModel. The purpose is to refresh the appropriate bindings on the View when something changes in the ViewModel.
However, this targets changes to the ViewModel by the View. That is to say, when you change the value in a TextBox
, the INotifyPropertyChanged
implementation on the ViewModel will refresh the related Bindings, so the View updates correctly.
It does not cover changes made to the Model by an external source, like Database changes or another interface. As long as all data modifications are coming from the View, the ViewModel should be aware of all changes and know what to update. For example, if you know that changing variable Foo
on your Model will also change the value of Bar
on you Model, it would be wise to call both OnPropertyChanged(Foo)
and OnPropertyChanged(Bar)
in your ViewModel when you change the value of Foo
.
The other alternative is to use events between the Model and the ViewModel to refresh those values on the ViewModel that require updating. If, as you say, the notification is required "first time only", then implementing a manual once off refresh on some trigger should also work.