You can create a property in the view model class that indicates whether the view model has changed since it was created. The property may be of type bool and may be called IsDirty . This property must be set to true when the property of your view model is changed. You can define this behavior in a given property method. When the user wants to close the GUI check if the IsDirty property is true and saves the changes.
Bind to the IsDirty property to enable / disable the save button.
Simon source share