Class ContextMenuService
Provides methods for displaying a context menu for a document or tool window.
Inherited Members
Namespace: Telerik.WinControls.UI.Docking
Assembly: Telerik.WinControls.RadDock.dll
Syntax
public class ContextMenuService : RadDockService, IDisposable, INotifyPropertyChanged, INotifyPropertyChangingEx
Constructors
ContextMenuService()
Declaration
public ContextMenuService()
Fields
ActivateWindow
Declaration
public const string ActivateWindow = "ActivateWindow"
Field Value
System.String
|
CloseAll
Declaration
public const string CloseAll = "CloseAll"
Field Value
System.String
|
CloseAllButPinned
Declaration
public const string CloseAllButPinned = "CloseAllButPinned"
Field Value
System.String
|
CloseAllButThis
Declaration
public const string CloseAllButThis = "CloseAllButThis"
Field Value
System.String
|
CloseWindow
Declaration
public const string CloseWindow = "CloseWindow"
Field Value
System.String
|
DockStateAutoHide
Declaration
public const string DockStateAutoHide = "AutoHide"
Field Value
System.String
|
DockStateDocked
Declaration
public const string DockStateDocked = "Docked"
Field Value
System.String
|
DockStateFloating
Declaration
public const string DockStateFloating = "Floating"
Field Value
System.String
|
DockStateHidden
Declaration
public const string DockStateHidden = "Hidden"
Field Value
System.String
|
DockStateTabbedDocument
Declaration
public const string DockStateTabbedDocument = "TabbedDocument"
Field Value
System.String
|
MoveToNextTabGroup
Declaration
public const string MoveToNextTabGroup = "MoveToNextTabGroup"
Field Value
System.String
|
MoveToPrevTabGroup
Declaration
public const string MoveToPrevTabGroup = "MoveToPrevTabGroup"
Field Value
System.String
|
NewHTabGroup
Declaration
public const string NewHTabGroup = "NewHTabGroup"
Field Value
System.String
|
NewVTabGroup
Declaration
public const string NewVTabGroup = "NewVTabGroup"
Field Value
System.String
|
Properties
AllowActiveWindowListContextMenu
Determines whether a context menu, listing all opened documents within a document strip, may be displayed.
Declaration
public bool AllowActiveWindowListContextMenu { get; set; }
Property Value
System.Boolean
|
AllowDocumentContextMenu
Determines whether context menus, associated with a document window may be displayed.
Declaration
public bool AllowDocumentContextMenu { get; set; }
Property Value
System.Boolean
|
AllowToolContextMenu
Determines whether context menus, associated with a tool window may be displayed.
Declaration
public bool AllowToolContextMenu { get; set; }
Property Value
System.Boolean
|
DisplayedMenu
Gets the currently displayed menu.
Declaration
public RadContextMenu DisplayedMenu { get; }
Property Value
RadContextMenu
|
IsMenuDisplayed
Determines whether a context menu is currently displayed.
Declaration
public bool IsMenuDisplayed { get; }
Property Value
System.Boolean
|
Methods
CanDisplayMenu(DockWindow)
Determines whether a context menu can be displayed for the specified window.
Declaration
protected virtual bool CanDisplayMenu(DockWindow window)
Parameters
DockWindow
window
|
Returns
System.Boolean
|
DisplayActiveWindowList(DocumentTabStrip, Point)
Displays a context menu, listing all currently active documents within the specified document strip.
Declaration
public void DisplayActiveWindowList(DocumentTabStrip strip, Point screenPos)
Parameters
DocumentTabStrip
strip
|
System.Drawing.Point
screenPos
|
DisplayContextMenu(RadElement, DockWindow, Point)
Displays a context menu at the specified screen position, associated with the provided DockWindow instance.
Declaration
public void DisplayContextMenu(RadElement owner, DockWindow window, Point screenPos)
Parameters
RadElement
owner
|
DockWindow
window
|
System.Drawing.Point
screenPos
|
DisplayContextMenu(DockWindow, Point)
Displays a context menu at the specified screen position, associated with the provided DockWindow instance.
Declaration
public void DisplayContextMenu(DockWindow window, Point screenPos)
Parameters
DockWindow
window
|
System.Drawing.Point
screenPos
|
DisplayMenuCore(List<RadMenuItemBase>, Point)
Displays the context menu at the specified screen position, using the provided list of items.
Declaration
protected virtual void DisplayMenuCore(List<RadMenuItemBase> items, Point screenPos)
Parameters
System.Collections.Generic.List<RadMenuItemBase>
items
|
System.Drawing.Point
screenPos
|
DisplayMenuCore(RadElement, List<RadMenuItemBase>, Point)
Displays the context menu at the specified screen position, using the provided list of items.
Declaration
protected virtual void DisplayMenuCore(RadElement menuOwner, List<RadMenuItemBase> items, Point screenPos)
Parameters
RadElement
menuOwner
|
System.Collections.Generic.List<RadMenuItemBase>
items
|
System.Drawing.Point
screenPos
|
DisposeManagedResources()
Declaration
protected override void DisposeManagedResources()
Overrides
GetContextMenuItems(DockWindow)
Gets the menu items, associated with the specified DockWindow.
Declaration
public List<RadMenuItemBase> GetContextMenuItems(DockWindow window)
Parameters
DockWindow
window
|
Returns
System.Collections.Generic.List<RadMenuItemBase>
|
GetContextMenuItems(DockWindow, Boolean)
Gets the menu items, associated with the specified DockWindow.
Declaration
public List<RadMenuItemBase> GetContextMenuItems(DockWindow window, bool defaultAction)
Parameters
DockWindow
window
|
System.Boolean
defaultAction
True to execute the default action, associated with each item, when an item is clicked. |
Returns
System.Collections.Generic.List<RadMenuItemBase>
|
OnContextMenuItemClick(Object, EventArgs)
The entry point used to handle menu item clicks.
Declaration
protected virtual void OnContextMenuItemClick(object sender, EventArgs e)
Parameters
System.Object
sender
|
System.EventArgs
e
|
PerformMenuItemAction(DockWindow, RadMenuItemBase)
Performs the core action, depending on the clicked menu item.
Declaration
protected virtual void PerformMenuItemAction(DockWindow window, RadMenuItemBase menuItem)
Parameters
DockWindow
window
|
RadMenuItemBase
menuItem
|
Events
ContextMenuDisplaying
Notifies that a context menu is about to be displayed.
Declaration
public event ContextMenuDisplayingEventHandler ContextMenuDisplaying
Event Type
ContextMenuDisplayingEventHandler
|
ContextMenuItemClicked
Notifies that a context menu item has been clicked.
Declaration
public event ContextMenuItemClickEventHandler ContextMenuItemClicked
Event Type
ContextMenuItemClickEventHandler
|