ContextMenu

Wisej.Web.ContextMenu

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.0.0.0)

Represents a context menu associated to a Control.

public class ContextMenu : Menu

Constructors

Initializes a new instance of the ContextMenu class with no menu items specified.

Initializes a new instance of the ContextMenu class with a specified set of MenuItem objects.

NameTypeDescription

menuItems

An array of MenuItem objects that represent the menu items to add to the shortcut menu.

Properties

RightToLeft: Returns or sets whether the text displayed by the control is displayed from right to left.

IWisejComponent: Returns the component that is displaying the shortcut menu.

Control: Returns the control that is displaying the shortcut menu.

Methods

Displays the context menu at the specified position in relation to the specified component.

ParameterTypeDescription

component

Can be any Wisej visual component: i.e. tool button, column header, etc.

position

A Placement that specifies position of the menu in relation to the component parameter.

onclose

Optional async handler for the close event; called when the context menu has been closed. It's the equivalent of handling the event.

Displays the context menu at the specified position.

ParameterTypeDescription

pos

A Point that specifies the coordinates at which to display the menu.

onclose

Optional async handler for the close event; called when the context menu has been closed. It's the equivalent of handling the event.

Displays the context menu at the specified position in relation to the specified control.

ParameterTypeDescription

control

A Control that specifies the control with which this shortcut menu is associated.

position

A Placement that specifies position of the menu in relation to the control parameter.

onclose

Optional async handler for the close event; called when the context menu has been closed. It's the equivalent of handling the event.

Throws:

Displays the context menu at the specified position in relation to the specified control.

ParameterTypeDescription

control

A Control that specifies the control with which this shortcut menu is associated.

pos

A Point that specifies the coordinates at which to display the menu. These coordinates are specified relative to the client coordinates of the control specified in the control parameter.

onclose

Optional async handler for the close event; called when the context menu has been closed. It's the equivalent of handling the event.

Throws:

Displays the context menu at the specified position and with the specified alignment in relation to the specified control.

ParameterTypeDescription

control

A Control that specifies the control with which this shortcut menu is associated.

pos

A Point that specifies the coordinates at which to display the menu. These coordinates are specified relative to the client coordinates of the control specified in the control parameter.

alignment

A LeftRightAlignment that specifies the alignment of the control relative to the pos parameter.

onclose

Optional async handler for the close event; called when the context menu has been closed. It's the equivalent of handling the event.

Throws:

Asynchronously displays the context menu at the specified position in relation to the specified component.

ParameterTypeDescription

component

Can be any Wisej visual component: i.e. tool button, column header, etc.

position

A Placement that specifies position of the menu in relation to the component parameter.

Returns: Task.

Asynchronously displays the context menu at the specified position.

ParameterTypeDescription

pos

A Point that specifies the coordinates at which to display the menu.

Returns: Task.

Asynchronously displays the context menu at the specified position in relation to the specified control.

ParameterTypeDescription

control

A Control that specifies the control with which this shortcut menu is associated.

position

A Placement that specifies position of the menu in relation to the control parameter.

Returns: Task.

Throws:

Asynchronously displays the context menu at the specified position in relation to the specified control.

ParameterTypeDescription

control

A Control that specifies the control with which this shortcut menu is associated.

pos

A Point that specifies the coordinates at which to display the menu. These coordinates are specified relative to the client coordinates of the control specified in the control parameter.

Returns: Task.

Throws:

Asynchronously displays the context menu at the specified position and with the specified alignment in relation to the specified control.

ParameterTypeDescription

control

A Control that specifies the control with which this shortcut menu is associated.

pos

A Point that specifies the coordinates at which to display the menu. These coordinates are specified relative to the client coordinates of the control specified in the control parameter.

alignment

A LeftRightAlignment that specifies the alignment of the control relative to the pos parameter.

Returns: Task.

Throws:

Updates the component on the client. Overridden to update the owner control.

Events

EventHandler Fired when the context menu collapses.

EventHandler Occurs before the context menu is displayed on the client.

EventHandler Occurs after the context menu is displayed on the client.

Implements

NameDescription

All wisej components implement this interface.

Allows an object to serialize itself.

Last updated