Which event do I trap just before the grid closes so I can save customization?
Thank you.
Hello,
I am just checking your progress on the issue.
If you require any further assistance please do not hesitate to ask.
Hello Mike,
I have been searching for a solution for your issue and I can suggest you handle the ‘Closed’ event of the ‘MainWindow’ of your WPF application to call the ‘SaveCustomization’ method in its body.
So your customizations will be automatically saved in a layout file (.xml) each time when you close the application. For example :
private void Window_Closed(object sender, EventArgs e)
{
using (FileStream fs = new FileStream("xamDataGridLayout1.xml", FileMode.Create, FileAccess.Write))
this.xamDataGrid1.SaveCustomizations(fs);
}
If you require any further assistance, please do not hesitate to ask.