expressappframework-113335-ui-construction-application-model-ui-settings-storage-application-model-storages-merge-end-user-customizations-model.md
End-users can customize an XAF application user interface (UI) at runtime with ease. The Layout Manager, Column Chooser and other capabilities allow end-users to configure a UI in a “what you see is what you get” way. But when you, as a developer, customize a UI in the Model Editor, you have to deal with indexes, widths, heights, groups, etc. So, you may want to customize a UI as an end-user, and then merge changes to one of the Application Model layers in your XAF solution. This topic describes how to achieve this task using the Model Merge Tool. As an example, the column order settings will be merged from user differences into the module project layer. However, you can use the same approach to merge any end-user customizations. For example:
Note
The Model Merge Tool supports only WinForms applications with end-user Model Differences stored in an XAFML file.
In this topic we will use the MainDemo application, located in the %PUBLIC%\Documents\DevExpress Demos 25.2\Components\XAF\MainDemo.NET.EFCore folder. Open the MainDemo solution, set MainDemo.Win as the startup project and run the Windows Forms application. Select the Resume navigation item. You will see the Resume object’s List View. Use drag-and-drop to swap the File column with Contact.
Close the Windows Forms application. The customizations you have made are saved to the Model.User.xafml file located in the project output folder (_bin\Debug_ by default).
<ListView Id="Resume_ListView">
<Columns>
<ColumnInfo Id="Contact" Index="0" />
<ColumnInfo Id="File" Index="1" />
</Columns>
</ListView>
Now let us merge the end-user customizations into the Application Model of the module project. In the Solution Explorer , right click the MainDemo.Win application project and click Merge User Model. In the invoked Open dialog, choose the Model.User.xafml file.
As a result, the Model Merge Tool dialog is invoked. Navigate to the Resume_ListView node in the tree list. This node caption is displayed in bold, as the node contains customizations. Use the checkbox to the left to select this node. In the dropdown below, select MainDemo.Module and click Merge. The Resume_ListView node’s differences will be merged into the MainDemo.Module project.
Finally, click Save to persist changes and close the Model Merge Tool dialog.
Note
After merging, you can see the Resume_ListView node customizations in the Model Editor invoked for the MainDemo.Module project.
To test changes at run time, reset the user model differences. The simplest way to do this is to delete the Model.User.xafml file from your application project output folder. Then, run the Windows Forms application to see that a layout is customized as required.