public void SaveLayout() { if (LayoutSerializationService != null) { ViewModelLogicalLayoutHelper.PersistentViewsLayout[ViewName] = LayoutSerializationService.Serialize(); } ViewModelLogicalLayoutHelper.SaveLayout(); }
/// <summary> /// Used to close all opened documents and allows you to save unsaved results and to cancel closing. /// Since DocumentsViewModel is a POCO view model, an instance of this class will also expose the OnClosingCommand property that can be used as a binding source in views. /// </summary> /// <param name="cancelEventArgs">An argument of the System.ComponentModel.CancelEventArgs type which is used to cancel closing if needed.</param> public virtual void OnClosing(CancelEventArgs cancelEventArgs) { SaveLogicalLayout(); if (LayoutSerializationService != null) { ViewModelLogicalLayoutHelper.PersistentViewsLayout[ViewLayoutName] = LayoutSerializationService.Serialize(); } Messenger.Default.Send(new CloseAllMessage(cancelEventArgs)); ViewModelLogicalLayoutHelper.SaveLayout(); }