ContextMenuService
Provides methods for displaying a context menu for a document or tool window.
Definition
Namespace:Telerik.WinControls.UI.Docking
Assembly:Telerik.WinControls.RadDock.dll
Syntax:
public class ContextMenuService : RadDockService, IDisposable, INotifyPropertyChanged, INotifyPropertyChangingEx
Inheritance: objectRadDockObjectRadDockServiceContextMenuService
Implements:
Inherited Members
Constructors
public ContextMenuService()
Fields
public const string ActivateWindow = "ActivateWindow"
public const string CloseAllButPinned = "CloseAllButPinned"
public const string CloseAllButThis = "CloseAllButThis"
public const string CloseWindow = "CloseWindow"
public const string DockStateAutoHide = "AutoHide"
public const string DockStateDocked = "Docked"
public const string DockStateFloating = "Floating"
public const string DockStateHidden = "Hidden"
public const string DockStateTabbedDocument = "TabbedDocument"
public const string MoveToNextTabGroup = "MoveToNextTabGroup"
public const string MoveToPrevTabGroup = "MoveToPrevTabGroup"
public const string NewHTabGroup = "NewHTabGroup"
public const string NewVTabGroup = "NewVTabGroup"
Properties
Determines whether a context menu, listing all opened documents within a document strip, may be displayed.
public bool AllowActiveWindowListContextMenu { get; set; }
Determines whether context menus, associated with a document window may be displayed.
public bool AllowDocumentContextMenu { get; set; }
Determines whether context menus, associated with a tool window may be displayed.
public bool AllowToolContextMenu { get; set; }
Gets the currently displayed menu.
[Browsable(false)]
public RadContextMenu DisplayedMenu { get; }
Determines whether a context menu is currently displayed.
[Browsable(false)]
public bool IsMenuDisplayed { get; }
Methods
Determines whether a context menu can be displayed for the specified window.
Displays a context menu, listing all currently active documents within the specified document strip.
public void DisplayActiveWindowList(DocumentTabStrip strip, Point screenPos)
Displays a context menu at the specified screen position, associated with the provided DockWindow instance.
public void DisplayContextMenu(DockWindow window, Point screenPos)
Displays a context menu at the specified screen position, associated with the provided DockWindow instance.
public void DisplayContextMenu(RadElement owner, DockWindow window, Point screenPos)
Displays the context menu at the specified screen position, using the provided list of items.
protected virtual void DisplayMenuCore(List<RadMenuItemBase> items, Point screenPos)
Displays the context menu at the specified screen position, using the provided list of items.
protected virtual void DisplayMenuCore(RadElement menuOwner, List<RadMenuItemBase> items, Point screenPos)
Disposes any managed resources associated with this object.
protected override void DisposeManagedResources()
Overrides:
Gets the menu items, associated with the specified DockWindow.
public List<RadMenuItemBase> GetContextMenuItems(DockWindow window, bool defaultAction)
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.
public List<RadMenuItemBase> GetContextMenuItems(DockWindow window)
List<RadMenuItemBase>
Performs the core action, depending on the clicked menu item.
protected virtual void PerformMenuItemAction(DockWindow window, RadMenuItemBase menuItem)
Events
Notifies that a context menu is about to be displayed.
public event ContextMenuDisplayingEventHandler ContextMenuDisplaying
Notifies that a context menu item has been clicked.
public event ContextMenuItemClickEventHandler ContextMenuItemClicked