コード例 #1
0
        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);
            }
        }
コード例 #2
0
        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;
        }
コード例 #3
0
 /// <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);
 }