Occurs when a storage for end-user model differences is being created.
public event EventHandler<CreateCustomModelDifferenceStoreEventArgs> CreateCustomUserModelDifferenceStore
Public Event CreateCustomUserModelDifferenceStore As EventHandler(Of CreateCustomModelDifferenceStoreEventArgs)
The CreateCustomUserModelDifferenceStore event handler receives an argument of the CreateCustomModelDifferenceStoreEventArgs type. The following properties provide information specific to this event.
|Store||Specifies a custom Application Model differences storage to be used by the application.|
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.
If you need to modify the mechanism of Application Model differences to store them both in an ASP.NET and Windows Forms application, you need to use an individual handler in the ASP.NET and Windows Forms application.