public void ResetLayout() { if (LayoutSerializationService != null) { LayoutSerializationService.Deserialize(null); } }
public virtual void OnLoaded() { string state = null; if (LayoutSerializationService != null && ViewModelLogicalLayoutHelper.PersistentViewsLayout.TryGetValue(ViewName, out state)) { LayoutSerializationService.Deserialize(state); } }
public void OnWindowLoaded() { if (Settings.Default.LogicalLayout != null) { this.RestoreDocumentManagerService(Settings.Default.LogicalLayout); } if (Settings.Default.RootLayout != null) { LayoutSerializationService.Deserialize(Settings.Default.RootLayout); } }
/// <summary> /// Finalizes the DocumentsViewModel initialization and opens the default document. /// Since DocumentsViewModel is a POCO view model, an instance of this class will also expose the OnLoadedCommand property that can be used as a binding source in views. /// </summary> public virtual void OnLoaded(TModule module) { if (IsLoaded) { return; } IsLoaded = true; DocumentManagerService.ActiveDocumentChanged += OnActiveDocumentChanged; if (!RestoreLogicalLayout()) { Show(module); } string state = null; if (LayoutSerializationService != null && ViewModelLogicalLayoutHelper.PersistentViewsLayout.TryGetValue(ViewLayoutName, out state)) { LayoutSerializationService.Deserialize(state); } }