protected override void InitDefaultLayout() { var panels = new List <PanelWorkspaceViewModel> { _ToolboxViewModel, _SolutionExplorerViewModel, _PropertiesViewModel, _ErrorListViewModel }; foreach (var panel in panels) { OpenOrCloseWorkspace(panel); } PanelWorkspaceViewModel document = CreateDocumentViewModel(); document.Open(); OpenOrCloseWorkspace(document, true); }
protected void OpenOrCloseWorkspace(PanelWorkspaceViewModel workspace, bool activateOnOpen) { if (Workspaces.Contains(workspace)) { workspace.IsClosed = !workspace.IsClosed; } else { this.Workspaces.Add(workspace); workspace.IsClosed = false; if (activateOnOpen) { this.SetActiveWorkspace(workspace); } } }
protected override void OnPreviewItemChaged() { if (this.previewItem != null) { if (this.previewItem.IsPreview) { this.previewItem.IsPreview = false; this.previewItem.IsClosed = true; } } previewItem = CreateDocumentViewModel(); previewItem.Open(); previewItem.ShowPinButton = true; previewItem.Pinned = true; OpenOrCloseWorkspace(previewItem, true); previewItem.IsPreview = true; }
protected void OpenOrCloseWorkspace(PanelWorkspaceViewModel workspace) { OpenOrCloseWorkspace(workspace, false); }
protected virtual void InitPanelWorkspaceViewModel(PanelWorkspaceViewModel viewModel) { }
protected override void InitPanelWorkspaceViewModel(PanelWorkspaceViewModel viewModel) { base.InitPanelWorkspaceViewModel(viewModel); viewModel.ShowPinButton = true; }