public void OpenDocumentWindow(DockingControl content, bool canClose = true) { if (content == null) { throw new ArgumentNullException(nameof(content)); } var document = _documents.TryGetValue(content.Key); if (document == null) { content.Changed += OnDockingControlChanged; document = new LayoutDocument { ContentId = content.Key, Content = content, CanClose = canClose }; document.SetBindings(LayoutContent.TitleProperty, content, "Title"); _documents.Add(content.Key, document); TabGroups.First().Children.Add(document); OnDockingControlChanged(content); } DockingManager.ActiveContent = document.Content; }
public void OpenToolWindow(DockingControl content, bool canClose = true) { if (content == null) { throw new ArgumentNullException(nameof(content)); } var anchorable = _anchorables.TryGetValue(content.Key); if (anchorable == null) { content.Changed += OnDockingControlChanged; anchorable = new LayoutAnchorable { ContentId = content.Key, Content = content, CanClose = canClose }; anchorable.SetBindings(LayoutContent.TitleProperty, content, "Title"); _anchorables.Add(content.Key, anchorable); RootGroup.Children.Add(new LayoutAnchorablePane(anchorable)); OnDockingControlChanged(content); } DockingManager.ActiveContent = anchorable.Content; }
public void CloseDocumentWindow(DockingControl content) { if (content == null) { throw new ArgumentNullException(nameof(content)); } var document = _documents.TryGetValue(content.Key); if (document == null) { return; } document.Close(); }
private void OnDockingControlChanged(DockingControl control) { _changedControls.Add(control); Flush(); }
public void CloseDocumentWindow(DockingControl content) { if (content == null) throw new ArgumentNullException(nameof(content)); var document = _documents.TryGetValue(content.Key); if (document == null) return; document.Close(); }
public void OpenDocumentWindow(DockingControl content, bool canClose = true) { if (content == null) throw new ArgumentNullException(nameof(content)); var document = _documents.TryGetValue(content.Key); if (document == null) { content.Changed += OnDockingControlChanged; document = new LayoutDocument { ContentId = content.Key, Content = content, CanClose = canClose }; document.SetBindings(LayoutContent.TitleProperty, content, "Title"); _documents.Add(content.Key, document); TabGroups.First().Children.Add(document); OnDockingControlChanged(content); } DockingManager.ActiveContent = document.Content; }
public void OpenToolWindow(DockingControl content, bool canClose = true) { if (content == null) throw new ArgumentNullException(nameof(content)); var anchorable = _anchorables.TryGetValue(content.Key); if (anchorable == null) { content.Changed += OnDockingControlChanged; anchorable = new LayoutAnchorable { ContentId = content.Key, Content = content, CanClose = canClose }; anchorable.SetBindings(LayoutContent.TitleProperty, content, "Title"); _anchorables.Add(content.Key, anchorable); RootGroup.Children.Add(new LayoutAnchorablePane(anchorable)); OnDockingControlChanged(content); } DockingManager.ActiveContent = anchorable.Content; }