ClassTelerikContextMenu<TItem>
The class for the Telerik Context Menu component. Children: ContextMenuSettings.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Type Parameters:
TItem
Syntax:
public class TelerikContextMenu<TItem> : HierarchicalBindingComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IMenuPopupContainer
Inheritance: objectComponentBaseBaseComponentBindingComponentBaseHierarchicalBindingComponentBaseTelerikContextMenu<TItem>
Implements:
Inherited Members
Constructors
TelerikContextMenu()
Declaration
public TelerikContextMenu()
Properties
ContextMenuSettings
Specifies the component settings. Children: MenuPopupSettings.
Declaration
[Parameter]
public RenderFragment ContextMenuSettings { get; set; }
Property Value
Data
A collection that contains the ContextMenu items.
DisabledField
Defines the Disabled DataField of the DataSource.
ItemTemplate
Defines the template for the items. The Item Template is defined under the ItemTemplate tag of the menu. Children: allows arbitrary content.
Declaration
[Parameter]
public RenderFragment<TItem> ItemTemplate { get; set; }
Property Value
RenderFragment<TItem>
OnClick
Defines the OnClick Event which is fired when clicking on a menu item.
Declaration
[Parameter]
public EventCallback<TItem> OnClick { get; set; }
Property Value
EventCallback<TItem>
OnItemRender
Fires when a ContextMenu item is being rendered. Can be used to provide custom styling for the ContextMenu's items.
Declaration
[Parameter]
public Action<MenuItemRenderEventArgs> OnItemRender { get; set; }
Property Value
Selector
Defines the selector for the target elements where the Context Menu will be shown. Uses CSS-type selectors.
SeparatorField
Defines the Separator DataField of the DataSource.
Template
Defines the template for the whole context menu. Children: allows arbitrary content.
Declaration
[Parameter]
public RenderFragment<IEnumerable<TItem>> Template { get; set; }
Property Value
RenderFragment<IEnumerable<TItem>>
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
Overrides
Dispose()
Declaration
public override void Dispose()
Overrides
ShowAsync(double, double)
Shows the context menu at defined coordinates.