public void DockToolWindowToToolWindow(ToolWindow toolWindowParent, ToolWindow toolWindow, Direction direction) { ParameterNullCheck(toolWindowParent); try { toolWindow.Dock(toolWindowParent, direction); } catch (Exception e) { throw new InvalidOperationException("Invalid parent tool window."); } }
public void DockToolWindowToDockSite(DockSite dockSite, ToolWindow toolWindow, Dock dock) { ParameterNullCheck(dockSite); try { toolWindow.Dock(dockSite, dock); } catch (Exception e) { throw new InvalidOperationException("Invalid dock site."); } }
// ****************************************************************** /// <summary> /// Opens the specified docking window. /// </summary> /// <param name="dockSite">The dock site that owns the docking window.</param> /// <param name="dockingWindow">The docking window to open.</param> private static void OpenDockingWindow(DockSite dockSite, DockingWindow dockingWindow) { if (!dockingWindow.IsOpen) { if (dockingWindow is DocumentWindow) { dockingWindow.Open(); } else { ToolWindow toolWindow = dockingWindow as ToolWindow; ToolItemViewModel toolItemViewModel = dockingWindow.DataContext as ToolItemViewModel; if (toolWindow != null && toolItemViewModel != null) { // Look for a ToolWindow within the same group, if found then dock to that group, otherwise either dock or auto-hide the window ToolWindow targetToolWindow = GetToolWindow(dockSite, toolItemViewModel.DockGroup); if (targetToolWindow != null && targetToolWindow != toolWindow) { toolWindow.Dock(targetToolWindow, Direction.Content); } else if (toolItemViewModel.IsInitiallyAutoHidden) { toolWindow.AutoHide(toolItemViewModel.DefaultDock); } else { toolWindow.Dock(dockSite, toolItemViewModel.DefaultDock); } } else { dockingWindow.Open(); } } } }
public void DockToolWindowToToolWindow(ToolWindow toolWindowParent, ToolWindow toolWindow, Direction direction) { ParameterNullCheck(toolWindowParent); try { toolWindow.Dock(toolWindowParent, direction); } catch (Exception e) { throw new InvalidOperationException("Invalid parent tool window."); } }
public void DockToolWindowToDockSite(DockSite dockSite, ToolWindow toolWindow, Dock dock) { ParameterNullCheck(dockSite); try { toolWindow.Dock(dockSite, dock); } catch (Exception e) { throw new InvalidOperationException("Invalid dock site."); } }