ContextMenu
Kendo UI ContextMenu component
Definition
Namespace:Kendo.Mvc.UI
Assembly:Kendo.Mvc.dll
Syntax:
public class ContextMenu : WidgetBase, IHtmlAttributesContainer, INavigationItemComponent<ContextMenuItem>, INavigationItemContainer<ContextMenuItem>
Inheritance: objectWidgetBaseContextMenu
Implements:
Inherited Members
Constructors
ContextMenu method.
public ContextMenu(ViewContext viewContext, INavigationItemAuthorization authorization)
Properties
Specifies that ContextMenu should be shown aligned to the target or the filter element if specified.
public bool? AlignToAnchor { get; set; }
Animation member.
public PopupAnimation Animation { get; }
The DOM element to which the ContextMenu will be appended. The element needs to be relatively positioned.
public string AppendTo { get; set; }
Authorization member.
public INavigationItemAuthorization Authorization { get; }
Implements:
Specifies that sub menus should close after item selection (provided they won't navigate).
public bool? CloseOnClick { get; set; }
Copies and uses the styles from the anchor.
public bool? CopyAnchorStyles { get; set; }
Sets the field of the data item that provides the content of the ContextMenu items.
public string DataContentField { get; set; }
Sets the field of the data item that provides the image url of the ContextMenu items.
public string DataImageUrlField { get; set; }
Gets or sets the DataSource.
public DataSource DataSource { get; }
Gets or sets the DataSourceId.
public string DataSourceId { get; set; }
Sets the field of the data item that provides the sprite css class of the ContextMenu items.
public string DataSpriteCssClassField { get; set; }
Sets the field of the data item that provides the text of the ContextMenu items.
public string DataTextField { get; set; }
Sets the field of the data item that provides the url of the ContextMenu items.
public string DataUrlField { get; set; }
Specifies ContextMenu filter selector - the ContextMenu will only be shown on items that satisfy the provided selector.
public string Filter { get; set; }
HighlightPath member.
public bool? HighlightPath { get; set; }
Specifies the delay in ms before the sub menus are opened/closed - used to avoid accidental closure on leaving.
public double? HoverDelay { get; set; }
ItemAction member.
public Action<ContextMenuItem> ItemAction { get; set; }
Implements:
Items member.
public IList<ContextMenuItem> Items { get; }
Implements:
OpenOnClick member.
public bool? OpenOnClick { get; set; }
Specifies the orientation in which the menu items will be ordered
public ContextMenuOrientation? Orientation { get; set; }
If enabled, the ContextMenu displays buttons that scroll the items when they cannot fit the viewport height. By default, scrolling is disabled.
public ContextMenuScrollableSettings Scrollable { get; }
SecurityTrimming member.
public SecurityTrimming SecurityTrimming { get; set; }
Implements:
Specifies the event or events on which ContextMenu should open. By default ContextMenu will show on contextmenu event on desktop and hold event on touch devices. Could be any pointer/mouse/touch event, also several, separated by spaces.
public string ShowOn { get; set; }
Methods
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
Writes the HTML content.
protected override void WriteHtml(TextWriter writer)
The text writer.
Overrides:
WriteInitializationScript method.
public override void WriteInitializationScript(TextWriter writer)
Overrides: