Skip to main content
.NET 6.0+

XafApplication.CreateCustomUserModelDifferenceStore Event

Occurs when a storage for end-user model differences is being created.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v24.1.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public event EventHandler<CreateCustomModelDifferenceStoreEventArgs> CreateCustomUserModelDifferenceStore

Event Data

The CreateCustomUserModelDifferenceStore event's data class is CreateCustomModelDifferenceStoreEventArgs. The following properties provide information specific to this event:

Property Description
Handled Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing. Inherited from HandledEventArgs.
Store Specifies a custom Application Model differences storage to be used by the application.

The event data class exposes the following methods:

Method Description
AddExtraDiffStore(String, ModelStoreBase) Adds extra model differences storage.

Remarks

When the Application Model is loaded, the differences from modules (Model.DesignedDiffs.xafml files) and the application project (Model.xafml file) are superimposed on the base content generated from code. In addition, changes made by an end-user are saved to the Model.User.xafml file and loaded as the topmost level when the Application Model is loaded. For details, refer to the Model Difference Storages article.

If you need to store end-user differences in another location (not in the Model.User.xafml file), implement a custom storage by inheriting from the ModelDifferenceStore abstract class. To make the system use your storage, handle the CreateCustomUserModelDifferenceStore event and set it for the handler’s Store parameter. To prohibit the creation of the default storage object, set the handler’s Handled parameter to true.

To see an example of using the CreateCustomUserModelDifferenceStore event, refer to the How to: Store the Application Model Differences in the Database topic.

Note

If you need to modify the mechanism of Application Model differences to store them both in an ASP.NET Web Forms and Windows Forms application, you need to use an individual handler in the ASP.NET Web Forms and Windows Forms application.

The following code snippets (auto-collected from DevExpress Examples) contain references to the CreateCustomUserModelDifferenceStore event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also