Skip to main content
.NET Framework 4.5.2+
  • The page you are viewing does not exist in the .NET Standard 2.0+ platform documentation. This link will take you to the parent topic of the current section.

WinApplication.SaveModelChanges() Method

Saves the Application Model changes made by an end-user, up to the current moment, to the storage (Model.User.xafml file, by default).

Namespace: DevExpress.ExpressApp.Win

Assembly: DevExpress.ExpressApp.Win.v23.1.dll

NuGet Package: DevExpress.ExpressApp.Win


public override void SaveModelChanges()


Overrides the XafApplication.SaveModelChanges method. By default, this method is called when the application is closed. So, all the changes made from the application start until the end are saved to the Model.User.xafml file. You can call this method at any time during the application run. For example, you can implement an Action that allows end-users to save the changes made up to the current moment. To prevent saving changes at the end of the application run, set the WinApplication.IgnoreUserModelDiffs property to true.

You can save user changes to another storage; for example, to the database. For this purpose, handle the XafApplication.CreateCustomUserModelDifferenceStore event.

See Also