Click or drag to resize

ContextMenu Class

Represents a context menu that can be shown typically when users right click or press the menu key on a control
Inheritance Hierarchy

Namespace:  Eto.Forms
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
Syntax
[ContentPropertyAttribute("Items")]
public class ContextMenu : Menu, 
	ISubmenu

The ContextMenu type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyItems
Gets the menu items in the context menu
Public propertyTrim
Gets a value indicating whether this sub menu should trim its child menu items when loaded onto a form
Top
Methods
  NameDescription
Protected methodGetCallback
Gets an instance of an object used to perform callbacks to the widget from handler implementations
(Overrides WidgetGetCallback.)
Protected methodOnClosed
Raises the Closed event.
Protected methodOnClosing
Raises the Closing event.
Protected methodOnLoad
Called when the menu is assigned to a control/window
(Overrides MenuOnLoad(EventArgs).)
Protected methodOnOpening
Raises the Opening event.
Protected methodOnUnLoad
Called when the menu is removed from a control/window
(Overrides MenuOnUnLoad(EventArgs).)
Public methodShow
Show the context menu at the current mouse position.
Public methodShow(Control)
Show the context menu for the specified control, usually at the current mouse position.
Public methodShow(PointF)
Shows the context menu at the specified screen co-ordinates
Public methodShow(Control, NullablePointF)
Shows the context menu at the specified location relative to a control.
Top
Events
  NameDescription
Public eventClosed
Occurs when the context menu is closed/dismissed, after the menu item has been selected and its click event is triggered.
Public eventClosing
Occurs before the context menu is closed/dismissed when the user clicks an item, but before the menu item's click event is triggered.
Public eventOpening
Occurs when the context menu is opening, before it is shown.
Top
Fields
  NameDescription
Public fieldStatic memberClosedEvent
Event identifier for handlers when attaching the Closed event.
Public fieldStatic memberClosingEvent
Event identifier for handlers when attaching the Closing event.
Public fieldStatic memberOpeningEvent
Event identifier for handlers when attaching the Opening event.
Top
Extension Methods
  NameDescription
Public Extension MethodGetChildren
Gets an enumeration of all children of the specified submenu.
(Defined by SubmenuExtensions.)
Top
See Also