Inheritance
System.Object
ContextMenuBuilder
Assembly: Syncfusion.EJ2.dll
public class ContextMenuBuilder : ControlBuilder
Constructors
Declaration
public ContextMenuBuilder()
Declaration
public ContextMenuBuilder(ContextMenu model)
Parameters
Fields
Declaration
Field Value
Properties
Declaration
public IDictionary<string, object> HtmlAttr { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
|
Declaration
public string ID { get; set; }
Property Value
Type |
Description |
System.String |
|
Declaration
public override TextWriter Output { get; set; }
Property Value
Type |
Description |
System.IO.TextWriter |
|
Overrides
Methods
Specifies the animation settings for the sub menu open.
Declaration
public ContextMenuBuilder AnimationSettings(ContextMenuAnimationSettings animationSettings)
Parameters
Returns
Declaration
public ContextMenuBuilder AnimationSettings(Action<ContextMenuAnimationSettingsBuilder> animationSettings)
Parameters
Returns
Triggers before closing the menu.
Declaration
public ContextMenuBuilder BeforeClose(string beforeClose)
Parameters
Type |
Name |
Description |
System.String |
beforeClose |
|
Returns
Triggers while rendering each menu item.
Declaration
public ContextMenuBuilder BeforeItemRender(string beforeItemRender)
Parameters
Type |
Name |
Description |
System.String |
beforeItemRender |
|
Returns
Triggers before opening the menu item.
Declaration
public ContextMenuBuilder BeforeOpen(string beforeOpen)
Parameters
Type |
Name |
Description |
System.String |
beforeOpen |
|
Returns
Triggers once the component rendering is completed.
Declaration
public ContextMenuBuilder Created(string created)
Parameters
Type |
Name |
Description |
System.String |
created |
|
Returns
Defines class/multiple classes separated by a space in the Menu wrapper.
Declaration
public ContextMenuBuilder CssClass(string cssClass)
Parameters
Type |
Name |
Description |
System.String |
cssClass |
|
Returns
Defines whether to allow the cross-scripting site or not.
Declaration
public ContextMenuBuilder EnableHtmlSanitizer(bool enableHtmlSanitizer = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableHtmlSanitizer |
|
Returns
Enable or disable persisting component's state between page reloads.
Declaration
public ContextMenuBuilder EnablePersistence(bool enablePersistence = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enablePersistence |
|
Returns
Enable or disable rendering component in right to left direction.
Declaration
public ContextMenuBuilder EnableRtl(bool enableRtl = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableRtl |
|
Returns
Specifies the filter selector for elements inside the target in that the context menu will be opened.
Declaration
public ContextMenuBuilder Filter(string filter)
Parameters
Type |
Name |
Description |
System.String |
filter |
|
Returns
If hoverDelay is set by particular number, the menu will open after that period.
Declaration
public ContextMenuBuilder HoverDelay(double hoverDelay)
Parameters
Type |
Name |
Description |
System.Double |
hoverDelay |
|
Returns
Allows additional HTML attributes such as title, name, etc., and
accepts n number of attributes in a key-value pair format.
Declaration
public ContextMenuBuilder HtmlAttributes(object htmlAttributes)
Parameters
Type |
Name |
Description |
System.Object |
htmlAttributes |
|
Returns
Declaration
public ContextMenuBuilder Items(Action<ContextMenuItemBuilder> items)
Parameters
Returns
Specifies menu items with its properties which will be rendered as ContextMenu.
Declaration
public ContextMenuBuilder Items(object items)
Parameters
Type |
Name |
Description |
System.Object |
items |
|
Returns
Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
Declaration
public ContextMenuBuilder Locale(string locale)
Parameters
Type |
Name |
Description |
System.String |
locale |
|
Returns
Triggers while closing the menu.
Declaration
public ContextMenuBuilder OnClose(string onClose)
Parameters
Type |
Name |
Description |
System.String |
onClose |
|
Returns
Triggers while opening the menu item.
Declaration
public ContextMenuBuilder OnOpen(string onOpen)
Parameters
Type |
Name |
Description |
System.String |
onOpen |
|
Returns
Declaration
public HtmlString Render()
Returns
Type |
Description |
Microsoft.AspNetCore.Html.HtmlString |
|
Triggers while selecting menu item.
Declaration
public ContextMenuBuilder Select(string select)
Parameters
Type |
Name |
Description |
System.String |
select |
|
Returns
Specifies whether to show the sub menu or not on click.
When set to true, the sub menu will open only on mouse click.
Declaration
public ContextMenuBuilder ShowItemOnClick(bool showItemOnClick = true)
Parameters
Type |
Name |
Description |
System.Boolean |
showItemOnClick |
|
Returns
Specifies target element selector in which the ContextMenu should be opened.
Declaration
public ContextMenuBuilder Target(string target)
Parameters
Type |
Name |
Description |
System.String |
target |
|
Returns