void LayoutSerializationCallback(object sender, LayoutSerializationCallbackEventArgs e) { switch (e.Model) { case LayoutAnchorable la: e.Content = ToolPanes.FirstOrDefault(p => p.ContentId == la.ContentId); e.Cancel = e.Content == null; la.CanDockAsTabbedDocument = false; if (!e.Cancel) { e.Cancel = ((ToolPaneModel)e.Content).IsVisible; ((ToolPaneModel)e.Content).IsVisible = true; } break; default: e.Cancel = true; break; } }
internal void LayoutSerializationCallback(object sender, LayoutSerializationCallbackEventArgs e) { switch (e.Model) { case LayoutAnchorable la: switch (la.ContentId) { case AssemblyListPaneModel.PaneContentId: e.Content = AssemblyListPaneModel.Instance; break; case SearchPaneModel.PaneContentId: e.Content = SearchPaneModel.Instance; break; case AnalyzerPaneModel.PaneContentId: e.Content = AnalyzerPaneModel.Instance; break; #if DEBUG case DebugStepsPaneModel.PaneContentId: e.Content = DebugStepsPaneModel.Instance; break; #endif default: e.Cancel = true; break; } if (!e.Cancel) { ToolPanes.Add((ToolPaneModel)e.Content); } break; default: e.Cancel = true; break; } }
internal void EnsureUnclosablePanes() { ToolPanes.Add(AssemblyListPaneModel.Instance); }