New to Telerik UI for WinFormsStart a free 30-day trial

Provides methods for displaying a context menu for a document or tool window.

Definition

Constructors

C#
public ContextMenuService()

Fields

C#
public const string ActivateWindow = "ActivateWindow"
C#
public const string CloseAll = "CloseAll"
C#
public const string CloseAllButPinned = "CloseAllButPinned"
C#
public const string CloseAllButThis = "CloseAllButThis"
C#
public const string CloseWindow = "CloseWindow"
C#
public const string DockStateAutoHide = "AutoHide"
C#
public const string DockStateDocked = "Docked"
C#
public const string DockStateFloating = "Floating"
C#
public const string DockStateHidden = "Hidden"
C#
public const string DockStateTabbedDocument = "TabbedDocument"
C#
public const string MoveToNextTabGroup = "MoveToNextTabGroup"
C#
public const string MoveToPrevTabGroup = "MoveToPrevTabGroup"
C#
public const string NewHTabGroup = "NewHTabGroup"
C#
public const string NewVTabGroup = "NewVTabGroup"

Properties

Determines whether a context menu, listing all opened documents within a document strip, may be displayed.

C#
public bool AllowActiveWindowListContextMenu { get; set; }

Determines whether context menus, associated with a document window may be displayed.

C#
public bool AllowDocumentContextMenu { get; set; }

Determines whether context menus, associated with a tool window may be displayed.

C#
public bool AllowToolContextMenu { get; set; }

Gets the currently displayed menu.

C#
[Browsable(false)]
public RadContextMenu DisplayedMenu { get; }

Determines whether a context menu is currently displayed.

C#
[Browsable(false)]
public bool IsMenuDisplayed { get; }

Methods

Determines whether a context menu can be displayed for the specified window.

C#
protected virtual bool CanDisplayMenu(DockWindow window)
Parameters:windowDockWindowReturns:

bool

Displays a context menu, listing all currently active documents within the specified document strip.

C#
public void DisplayActiveWindowList(DocumentTabStrip strip, Point screenPos)
Parameters:stripDocumentTabStripscreenPosPoint

Displays a context menu at the specified screen position, associated with the provided DockWindow instance.

C#
public void DisplayContextMenu(DockWindow window, Point screenPos)
Parameters:windowDockWindowscreenPosPoint

Displays a context menu at the specified screen position, associated with the provided DockWindow instance.

C#
public void DisplayContextMenu(RadElement owner, DockWindow window, Point screenPos)
Parameters:ownerRadElementwindowDockWindowscreenPosPoint

Displays the context menu at the specified screen position, using the provided list of items.

C#
protected virtual void DisplayMenuCore(List<RadMenuItemBase> items, Point screenPos)
Parameters:itemsList<RadMenuItemBase>screenPosPoint

Displays the context menu at the specified screen position, using the provided list of items.

C#
protected virtual void DisplayMenuCore(RadElement menuOwner, List<RadMenuItemBase> items, Point screenPos)
Parameters:menuOwnerRadElementitemsList<RadMenuItemBase>screenPosPoint

Disposes any managed resources associated with this object.

C#
protected override void DisposeManagedResources()

Overrides: RadDockObject.DisposeManagedResources()

Gets the menu items, associated with the specified DockWindow.

C#
public List<RadMenuItemBase> GetContextMenuItems(DockWindow window, bool defaultAction)
Parameters:windowDockWindowdefaultActionbool

True to execute the default action, associated with each item, when an item is clicked.

Returns:

List<RadMenuItemBase>

Gets the menu items, associated with the specified DockWindow.

C#
public List<RadMenuItemBase> GetContextMenuItems(DockWindow window)
Parameters:windowDockWindowReturns:

List<RadMenuItemBase>

The entry point used to handle menu item clicks.

C#
protected virtual void OnContextMenuItemClick(object sender, EventArgs e)
Parameters:senderobjecteEventArgs

Performs the core action, depending on the clicked menu item.

C#
protected virtual void PerformMenuItemAction(DockWindow window, RadMenuItemBase menuItem)
Parameters:windowDockWindowmenuItemRadMenuItemBase

Events

Notifies that a context menu is about to be displayed.

C#
public event ContextMenuDisplayingEventHandler ContextMenuDisplaying

Notifies that a context menu item has been clicked.

C#
public event ContextMenuItemClickEventHandler ContextMenuItemClicked