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 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) { 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) { PageDropDownClicked?.Invoke(this, e); }