/// <summary> /// Initialize a new instance of the DockspaceCellEventArgs class. /// </summary> /// <param name="dockspace">Reference to existing dockspace control instance.</param> /// <param name="element">Reference to docking dockspace element that is managing the dockspace control.</param> /// <param name="cell">Reference to dockspace control cell instance.</param> public DockspaceCellEventArgs(KryptonDockspace dockspace, KryptonDockingDockspace element, KryptonWorkspaceCell cell) { DockspaceControl = dockspace; DockspaceElement = element; CellControl = cell; }
/// <summary> /// Initialize a new instance of the AutoHiddenSeparatorResizeEventArgs class. /// </summary> /// <param name="separator">Reference to separator control instance.</param> /// <param name="dockspace">Reference to dockspace control instance.</param> /// <param name="page">Reference to page contained in the dockspace.</param> /// <param name="resizeRect">Initial resizing rectangle.</param> public AutoHiddenSeparatorResizeEventArgs(KryptonSeparator separator, KryptonDockspace dockspace, KryptonPage page, Rectangle resizeRect) { SeparatorControl = separator; DockspaceControl = dockspace; Page = page; ResizeRect = resizeRect; }
/// <summary> /// Initialize a new instance of the KryptonDockingDockspace class. /// </summary> /// <param name="name">Initial name of the element.</param> /// <param name="edge">Docking edge this dockspace is against.</param> /// <param name="size">Initial size of the dockspace.</param> public KryptonDockingDockspace(string name, DockingEdge edge, Size size) : base(name, "Docked") { // Create a new dockspace that will be a host for docking pages SpaceControl = new KryptonDockspace(); DockspaceControl.Size = size; DockspaceControl.Dock = DockingHelper.DockStyleFromDockEdge(edge, false); DockspaceControl.CellCountChanged += OnDockspaceCellCountChanged; DockspaceControl.CellVisibleCountChanged += OnDockspaceCellVisibleCountChanged; DockspaceControl.CellPageInserting += OnSpaceCellPageInserting; DockspaceControl.PageCloseClicked += OnDockspacePageCloseClicked; DockspaceControl.PageAutoHiddenClicked += OnDockspacePageAutoHiddenClicked; DockspaceControl.PagesDoubleClicked += OnDockspacePagesDoubleClicked; DockspaceControl.PageDropDownClicked += OnDockspaceDropDownClicked; DockspaceControl.BeforePageDrag += OnDockspaceBeforePageDrag; }
private void OnSlidePanelSeparatorMoveRect(object sender, SplitterMoveRectMenuArgs e) { // Cast to correct type and grab associated dockspace control KryptonDockspaceSeparator separatorControl = (KryptonDockspaceSeparator)sender; KryptonDockspace dockspaceControl = _slidePanel.DockspaceControl; KryptonPage page = _slidePanel.Page; // Events are generated from the parent docking manager KryptonDockingManager dockingManager = DockingManager; if (dockingManager != null) { // Allow the movement rectangle to be modified by event handlers AutoHiddenSeparatorResizeEventArgs autoHiddenSeparatorResizeRectArgs = new AutoHiddenSeparatorResizeEventArgs(separatorControl, dockspaceControl, page, FindMovementRect(e.MoveRect)); dockingManager.RaiseAutoHiddenSeparatorResize(autoHiddenSeparatorResizeRectArgs); e.MoveRect = autoHiddenSeparatorResizeRectArgs.ResizeRect; } }
/// <summary> /// Initialize a new instance of the DockspaceEventArgs class. /// </summary> /// <param name="dockspace">Reference to new dockspace control instance.</param> /// <param name="element">Reference to docking dockspace element that is managing the dockspace control.</param> public DockspaceEventArgs(KryptonDockspace dockspace, KryptonDockingDockspace element) { DockspaceControl = dockspace; DockspaceElement = element; }