ContextMenuBuilder Methods
A ContextMenu control.| Name | Description |
|---|---|
| AccessKey(JS) | Specifies the shortcut key that sets focus on the UI component. Mirrors the client-side accessKey option. |
| AccessKey(String) | Specifies the shortcut key that sets focus on the UI component. Mirrors the client-side accessKey option. |
| ActiveStateEnabled(JS) | Specifies whether the UI component changes its visual state as a result of user interaction. Mirrors the client-side activeStateEnabled option. |
| ActiveStateEnabled(Boolean) | Specifies whether the UI component changes its visual state as a result of user interaction. Mirrors the client-side activeStateEnabled option. |
| Animation(Action<ContextMenuAnimationBuilder>) | Configures UI component visibility animations. This object contains two fields: show and hide. Mirrors the client-side animation object. |
| CssClass(JS) | Specifies the name of the CSS class to be applied to the root menu level and all submenus. Mirrors the client-side cssClass option. |
| CssClass(String) | Specifies the name of the CSS class to be applied to the root menu level and all submenus. Mirrors the client-side cssClass option. |
| DataSource(JS) | Mirrors the client-side dataSource option. |
| DataSource(IEnumerable, String[]) |
Binds a ContextMenu control to a collection: Array, List, or IEnumerable.
|
| DataSource(Func<DataSourceFactory, OptionsOwnerBuilder>) | Binds a ContextMenu control to data, allows you to configure data access from different sources: API controllers, Razor page handlers, OData services, arrays, and more. |
| DataSource(String, String[]) | Binds a ContextMenu control to read-only data in JSON format. |
| DataSourceOptions(Action<DataSourceOptionsBuilder>) | Provides access to methods that mirror client-side data source options. |
| Disabled(JS) | Specifies whether the UI component responds to user interaction. Mirrors the client-side disabled option. |
| Disabled(Boolean) | Specifies whether the UI component responds to user interaction. Mirrors the client-side disabled option. |
| DisabledExpr(JS) | Specifies the name of the data source item field whose value defines whether or not the corresponding UI component item is disabled. Mirrors the client-side disabledExpr option. |
| DisabledExpr(String) | Specifies the name of the data source item field whose value defines whether or not the corresponding UI component item is disabled. Mirrors the client-side disabledExpr option. |
| DisplayExpr(JS) | Specifies the data field whose values should be displayed. Mirrors the client-side displayExpr option. |
| DisplayExpr(String) | Specifies the data field whose values should be displayed. Mirrors the client-side displayExpr option. |
| ElementAttr(JS) | Mirrors the client-side elementAttr option, specifies attributes for the control’s root HTML element. |
| ElementAttr(Dictionary<String, Object>) | Mirrors the client-side elementAttr option, specifies attributes for the control’s root HTML element. |
| ElementAttr(Object) | Mirrors the client-side elementAttr option, specifies attributes for the control’s root HTML element. |
| ElementAttr(String, Object) | Mirrors the client-side elementAttr option, specifies attributes for the control’s root HTML element. |
| Equals(Object, Object) static | Determines whether the specified object instances are considered equal. Inherited from Object. |
| Equals(Object) | Determines whether the specified object is equal to the current object. Inherited from Object. |
| FocusStateEnabled(JS) | Mirrors the client-side focusStateEnabled option. |
| FocusStateEnabled(Boolean) | Mirrors the client-side focusStateEnabled option. |
| GetHashCode() | Serves as the default hash function. Inherited from Object. |
| GetType() | Gets the Type of the current instance. Inherited from Object. |
| Height(JS) | Specifies the UI component's height. Mirrors the client-side height option. |
| Height(Double) | Specifies the UI component's height. Mirrors the client-side height option. |
| Height(String) | Specifies the UI component's height. Mirrors the client-side height option. |
| HideOnOutsideClick(JS) | |
| HideOnOutsideClick(Boolean) | |
| Hint(JS) | Specifies text for a hint that appears when a user pauses on the UI component. Mirrors the client-side hint option. |
| Hint(String) | Specifies text for a hint that appears when a user pauses on the UI component. Mirrors the client-side hint option. |
| HoverStateEnabled(JS) | Mirrors the client-side hoverStateEnabled option. |
| HoverStateEnabled(Boolean) | Mirrors the client-side hoverStateEnabled option. |
| ID(JS) |
Specifies the id attribute for the control’s HTML element (used for nested controls within templates).
|
| ID(String) |
Specifies the id attribute for the control’s HTML element.
|
| Items(Action<CollectionFactory<ContextMenuItemBuilder>>) | Provides access to the client-side items option that represents a ContextMenu item collection. |
| ItemsExpr(JS) | Specifies which data field contains nested items. Mirrors the client-side itemsExpr option. |
| ItemsExpr(String) | Specifies which data field contains nested items. Mirrors the client-side itemsExpr option. |
| ItemTemplate(JS) | Specifies the client-side itemTemplate. |
| ItemTemplate(RazorBlock) | Specifies the client-side itemTemplate. |
| ItemTemplate(TemplateName) | Specifies the client-side itemTemplate. |
| ItemTemplate(String) | Specifies the client-side itemTemplate. |
| MemberwiseClone() protected | Creates a shallow copy of the current Object. Inherited from Object. |
| OnContentReady(RazorBlock) | A function that is executed when the UI component is rendered and each time the component is repainted. Mirrors the client-side onContentReady option. |
| OnContentReady(String) | A function that is executed when the UI component is rendered and each time the component is repainted. Mirrors the client-side onContentReady option. |
| OnDisposing(RazorBlock) | A function that is executed before the UI component is disposed of. Mirrors the client-side onDisposing option. |
| OnDisposing(String) | A function that is executed before the UI component is disposed of. Mirrors the client-side onDisposing option. |
| OnHidden(RazorBlock) | A function that is executed after the ContextMenu is hidden. Mirrors the client-side onHidden option. |
| OnHidden(String) | A function that is executed after the ContextMenu is hidden. Mirrors the client-side onHidden option. |
| OnHiding(RazorBlock) | A function that is executed before the ContextMenu is hidden. Mirrors the client-side onHiding option. |
| OnHiding(String) | A function that is executed before the ContextMenu is hidden. Mirrors the client-side onHiding option. |
| OnInitialized(RazorBlock) | A function used in JavaScript frameworks to save the UI component instance. Mirrors the client-side onInitialized option. |
| OnInitialized(String) | A function used in JavaScript frameworks to save the UI component instance. Mirrors the client-side onInitialized option. |
| OnItemClick(RazorBlock) | A function that is executed when a collection item is clicked or tapped. Mirrors the client-side onItemClick option. |
| OnItemClick(String) | A function that is executed when a collection item is clicked or tapped. Mirrors the client-side onItemClick option. |
| OnItemContextMenu(RazorBlock) | A function that is executed when a collection item is right-clicked or pressed. Mirrors the client-side onItemContextMenu option. |
| OnItemContextMenu(String) | A function that is executed when a collection item is right-clicked or pressed. Mirrors the client-side onItemContextMenu option. |
| OnItemRendered(RazorBlock) | A function that is executed after a collection item is rendered. Mirrors the client-side onItemRendered option. |
| OnItemRendered(String) | A function that is executed after a collection item is rendered. Mirrors the client-side onItemRendered option. |
| OnOptionChanged(RazorBlock) | A function that is executed after a UI component property is changed. Mirrors the client-side onOptionChanged option. |
| OnOptionChanged(String) | A function that is executed after a UI component property is changed. Mirrors the client-side onOptionChanged option. |
| OnPositioning(RazorBlock) | A function that is executed before the ContextMenu is positioned. Mirrors the client-side onPositioning option. |
| OnPositioning(String) | A function that is executed before the ContextMenu is positioned. Mirrors the client-side onPositioning option. |
| OnSelectionChanged(RazorBlock) | A function that is executed when a collection item is selected or selection is canceled. Mirrors the client-side onSelectionChanged option. |
| OnSelectionChanged(String) | A function that is executed when a collection item is selected or selection is canceled. Mirrors the client-side onSelectionChanged option. |
| OnShowing(RazorBlock) | A function that is executed before the ContextMenu is shown. Mirrors the client-side onShowing option. |
| OnShowing(String) | A function that is executed before the ContextMenu is shown. Mirrors the client-side onShowing option. |
| OnShown(RazorBlock) | A function that is executed after the ContextMenu is shown. Mirrors the client-side onShown option. |
| OnShown(String) | A function that is executed after the ContextMenu is shown. Mirrors the client-side onShown option. |
| Option(String, Object) | Specifies an option by its name. |
| Position(Action<PositionConfigBuilder>) | An object defining UI component positioning properties. Mirrors the client-side position object. |
| ReferenceEquals(Object, Object) static | Determines whether the specified Object instances are the same instance. Inherited from Object. |
| Render() | Inherited from WidgetBuilder. |
| RtlEnabled(JS) | Switches the UI component to a right-to-left representation. Mirrors the client-side rtlEnabled option. |
| RtlEnabled(Boolean) | Switches the UI component to a right-to-left representation. Mirrors the client-side rtlEnabled option. |
| SelectByClick(JS) | Specifies whether an item is selected if a user clicks it. Mirrors the client-side selectByClick option. |
| SelectByClick(Boolean) | Specifies whether an item is selected if a user clicks it. Mirrors the client-side selectByClick option. |
| SelectedExpr(JS) | Specifies the name of the data source item field whose value defines whether or not the corresponding UI component items is selected. Mirrors the client-side selectedExpr option. |
| SelectedExpr(String) | Specifies the name of the data source item field whose value defines whether or not the corresponding UI component items is selected. Mirrors the client-side selectedExpr option. |
| SelectedItem(Object) | The selected item object. Mirrors the client-side selectedItem option. |
| SelectionMode(MenuSelectionMode) | Specifies the selection mode supported by the menu. Mirrors the client-side selectionMode option. |
| ShowEvent(JS) | Specifies properties used to display the UI component. Mirrors the client-side showEvent option. |
| ShowEvent(Action<ContextMenuShowEventBuilder>) | Specifies properties used to display the UI component. Mirrors the client-side showEvent object. |
| ShowEvent(String) | Specifies properties used to display the UI component. Mirrors the client-side showEvent option. |
| ShowSubmenuMode(ShowSubmenuMode) | Specifies properties of submenu showing and hiding. Mirrors the client-side showSubmenuMode option. |
| ShowSubmenuMode(Action<ContextMenuShowSubmenuModeBuilder>) | Specifies properties of submenu showing and hiding. Mirrors the client-side showSubmenuMode object. |
| SubmenuDirection(ContextMenuSubmenuDirection) | Specifies the direction at which submenus are displayed. Mirrors the client-side submenuDirection option. |
| TabIndex(JS) | Specifies the number of the element when the Tab key is used for navigating. Mirrors the client-side tabIndex option. |
| TabIndex(Int32) | Specifies the number of the element when the Tab key is used for navigating. Mirrors the client-side tabIndex option. |
| Target(JS) | The target element associated with the context menu. Mirrors the client-side target option. |
| Target(String) | The target element associated with the context menu. Mirrors the client-side target option. |
| ToString() | Inherited from WidgetBuilder. |
| ToTemplate() | Renders the control as a template string for use in another control’s template. Inherited from WidgetBuilder. |
| Visible(JS) | A Boolean value specifying whether or not the UI component is visible. Mirrors the client-side visible option. |
| Visible(Boolean) | A Boolean value specifying whether or not the UI component is visible. Mirrors the client-side visible option. |
| Width(JS) | Specifies the UI component's width. Mirrors the client-side width option. |
| Width(Double) | Specifies the UI component's width. Mirrors the client-side width option. |
| Width(String) | Specifies the UI component's width. Mirrors the client-side width option. |
See Also