/// <summary> /// Show the content ad floating window /// </summary> /// <param name="dockableWindow">True if the resulting floating window can the be re-docked to the docking manager.</param> public void ShowAsFloatingWindow(DockingManager manager, bool dockableWindow) { if (Manager != null && Manager != manager) { throw new InvalidOperationException("Please remove the content from previous DockingManager (using the Close method)"); } //Manager = manager; if (manager == null) { if (dockableWindow && !CanExecuteCommand(DockableContentCommands.DockableFloatingWindow)) { throw new InvalidOperationException("This operation can be executed in this state"); } if (!dockableWindow && !CanExecuteCommand(DockableContentCommands.FloatingWindow)) { throw new InvalidOperationException("This operation can be executed in this state"); } } manager.Show(this, dockableWindow ? DockableContentState.DockableWindow : DockableContentState.FloatingWindow); }
/// <summary> /// Show <see cref="DocumentContent"/> as tabbed document inside the provided <see cref="DockingManager"/> /// </summary> /// <param name="manager">Docking manager target</param> /// <param name="showAsFloatingWindow">True if document should be shown inside a floating window (<see cref="DocumentFloatingWindow"/>)</param> public void Show(DockingManager manager, bool showAsFloatingWindow) { if (Manager != null && Manager != manager) { throw new InvalidOperationException("Please remove the content from previous DockingManager (using the Close method)"); } if (!CanExecuteCommand(ManagedContentCommands.Show)) { throw new InvalidOperationException("This operation can be executed in this state"); } manager.Show(this, showAsFloatingWindow); manager.Documents.Add(this); }
protected override void OnDeactivated(EventArgs e) { if (_manager != null) { Window mainWindow = Window.GetWindow(_manager); if (mainWindow != null) { mainWindow.Activate(); if (SelectedContent != null) { _manager.Show(SelectedContent.ItemContent as DocumentContent); SelectedContent.ItemContent.SetAsActive(); } else if (SelectedToolWindow != null) { _manager.Show(SelectedToolWindow.ItemContent as DockableContent); SelectedToolWindow.ItemContent.SetAsActive(); } } } Hide(); base.OnDeactivated(e); }
/// <summary> /// Show as <see cref="DockableContent"/> as a tabbed document under the provided <see cref="DockingManager"/> /// </summary> public void ShowAsDocument(DockingManager manager) { if (Manager != null && Manager != manager) { throw new InvalidOperationException("Please remove the content from previous DockingManager (using the Close method)"); } //Manager = manager; if (manager == null && !CanExecuteCommand(DockableContentCommands.ShowAsDocument)) { throw new InvalidOperationException("This operation can be executed in this state"); } manager.Show(this, DockableContentState.Document); }
protected override void OnDeactivated(EventArgs e) { if (_manager != null) { Window mainWindow = Window.GetWindow(_manager); if (mainWindow != null) { mainWindow.Activate(); if (SelectedContent != null) { _manager.Show(SelectedContent.ItemContent as DocumentContent); SelectedContent.ItemContent.SetAsActive(); } } } if (!_isClosing) { CloseThisWindow();// Hide(); } base.OnDeactivated(e); }
/// <summary> /// Show <see cref="DocumentContent"/> as tabbed document inside the provided <see cref="DockingManager"/> /// </summary> /// <param name="manager">Docking manager target</param> /// <param name="showAsFloatingWindow">True if document should be shown inside a floating window (<see cref="DocumentFloatingWindow"/>)</param> public void Show(DockingManager manager, bool showAsFloatingWindow) { if (Manager != null && Manager != manager) throw new InvalidOperationException("Please remove the content from previous DockingManager (using the Close method)"); if (!CanExecuteCommand(ManagedContentCommands.Show)) throw new InvalidOperationException("This operation can be executed in this state"); manager.Show(this, showAsFloatingWindow); manager.Documents.Add(this); }
/// <summary> /// Show the content ad floating window /// </summary> /// <param name="dockableWindow">True if the resulting floating window can the be re-docked to the docking manager.</param> public void ShowAsFloatingWindow(DockingManager manager, bool dockableWindow) { if (Manager != null && Manager != manager) throw new InvalidOperationException("Please remove the content from previous DockingManager (using the Close method)"); //Manager = manager; if (manager == null) { if (dockableWindow && !CanExecuteCommand(DockableContentCommands.DockableFloatingWindow)) throw new InvalidOperationException("This operation can be executed in this state"); if (!dockableWindow && !CanExecuteCommand(DockableContentCommands.FloatingWindow)) throw new InvalidOperationException("This operation can be executed in this state"); } manager.Show(this, dockableWindow ? DockableContentState.DockableWindow : DockableContentState.FloatingWindow); }
/// <summary> /// Show as <see cref="DockableContent"/> as a tabbed document under the provided <see cref="DockingManager"/> /// </summary> public void ShowAsDocument(DockingManager manager) { if (Manager != null && Manager != manager) throw new InvalidOperationException("Please remove the content from previous DockingManager (using the Close method)"); //Manager = manager; if (manager == null && !CanExecuteCommand(DockableContentCommands.ShowAsDocument)) throw new InvalidOperationException("This operation can be executed in this state"); manager.Show(this, DockableContentState.Document); }
/// <summary> /// Show <see cref="DockableContent"/> as docked pane /// </summary> public void Show(DockingManager manager, AnchorStyle desideredAnchor) { if (Manager != null && Manager != manager) throw new InvalidOperationException("Please remove the content from previous DockingManager (using the Close method)"); if (manager == null && !CanExecuteCommand(ManagedContentCommands.Show)) throw new InvalidOperationException("This operation can be executed in this state"); if (State == DockableContentState.Docked) { //if already shown as docked content just activate it Activate(); } else { if (SavedStateAndPosition != null && State == DockableContentState.Hidden) manager.Show(this, SavedStateAndPosition.State, desideredAnchor); else manager.Show(this, DockableContentState.Docked, desideredAnchor); } }