/// <summary> /// Raises the PageDropDownClicked event. /// </summary> /// <param name="e">An CancelDropDownEventArgs containing the event data.</param> protected virtual void OnPageDropDownClicked(CancelDropDownEventArgs e) { if (PageDropDownClicked != null) { PageDropDownClicked(this, e); } }
private void OnDockspacePageDropDownClicked(object sender, CancelDropDownEventArgs e) { // Click the drop down button should cause the slide out to be focused so that it // does not slide back again if you move the mouse away from the slide out area _dockspaceSlide?.Select(); PageDropDownClicked?.Invoke(sender, e); }
private void OnFloatspaceDropDownClicked(object sender, CancelDropDownEventArgs e) { // Generate event so that the appropriate context menu options are preseted and actioned KryptonDockingManager dockingManager = DockingManager; if (dockingManager != null) { e.Cancel = !dockingManager.ShowPageContextMenuRequest(e.Page, e.KryptonContextMenu); } }
private void OnCellShowContextMenu(object sender, ShowContextMenuArgs e) { // Make sure we have a menu for displaying if (e.KryptonContextMenu == null) { e.KryptonContextMenu = new KryptonContextMenu(); } // Use event to allow customization of the context menu CancelDropDownEventArgs args = new CancelDropDownEventArgs(e.KryptonContextMenu, e.Item); args.Cancel = e.Cancel; OnPageDropDownClicked(args); e.Cancel = args.Cancel; }
private void OnCellPrimaryHeaderRightClicked(object sender, EventArgs e) { // Should we apply docking specific change of focus when the primary header is clicked? if (ApplyDockingAppearance) { KryptonWorkspaceCell cell = (KryptonWorkspaceCell)sender; if (cell.SelectedPage != null) { // Set the focus into the active page cell.SelectedPage.SelectNextControl(cell.SelectedPage, true, true, true, false); // Create and populate a context menu with the drop down set of options KryptonContextMenu kcm = new KryptonContextMenu(); CancelDropDownEventArgs args = new CancelDropDownEventArgs(kcm, cell.SelectedPage); OnPageDropDownClicked(args); // Do we need to show a context menu if (!args.Cancel && CommonHelper.ValidKryptonContextMenu(args.KryptonContextMenu)) { args.KryptonContextMenu.Show(this, Control.MousePosition); } } } }
private void OnDockspacePageDropDownClicked(object sender, CancelDropDownEventArgs e) { // Click the drop down button should cause the slide out to be focused so that it // does not slide back again if you move the mouse away from the slide out area if (_dockspaceSlide != null) _dockspaceSlide.Select(); if (PageDropDownClicked != null) PageDropDownClicked(sender, e); }
/// <summary> /// Raises the PageDropDownClicked event. /// </summary> /// <param name="e">An CancelDropDownEventArgs containing the event data.</param> protected virtual void OnPageDropDownClicked(CancelDropDownEventArgs e) { PageDropDownClicked?.Invoke(this, e); }
private void OnSlidePanelPageDropDownClicked(object sender, CancelDropDownEventArgs e) { // Generate event so that the appropriate context menu options are preseted and actioned KryptonDockingManager dockingManager = DockingManager; if (dockingManager != null) e.Cancel = !dockingManager.ShowPageContextMenuRequest(e.Page, e.KryptonContextMenu); }
private void OnShowContextMenu(object sender, ShowContextMenuArgs e) { // Make sure we have a menu for displaying if (e.KryptonContextMenu == null) e.KryptonContextMenu = new KryptonContextMenu(); // Use event to allow customization of the context menu CancelDropDownEventArgs args = new CancelDropDownEventArgs(e.KryptonContextMenu, e.Item); args.Cancel = e.Cancel; OnPageDropDownClicked(args); e.Cancel = args.Cancel; }
/// <summary> /// Raises the PageDropDownClicked event. /// </summary> /// <param name="e">An CancelDropDownEventArgs containing the event data.</param> protected virtual void OnPageDropDownClicked(CancelDropDownEventArgs e) { if (PageDropDownClicked != null) PageDropDownClicked(this, e); }