Consider an application which is implemented using MVVM, in which the user inputs data.
When the user selects "open file", "new file" etc., the application asks the user if he wants to save the data to a file before invoking the requested command. However, if the user did not change any data since the last save, the application should skip that question and continue directly to invoking the command. Note that only properties that ultimately belong to the model should change the status. For example if the user changed the selected element in a list (which changes the VM) it doesn't require saving.
How would you implement such requirement?
Manually raising an event whenever some property in the VM is changed seems tedious and error-prone.
Thanks, Elad