ClassTelerikContextMenu<TItem>
The class for the Telerik Context Menu component.
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.
Declaration
[Parameter]
public RenderFragment ContextMenuSettings { get; set; }
Property Value
Data
A collection that contains the ContextMenu items.
Declaration
[Parameter]
public IEnumerable<TItem> Data { get; set; }
Property Value
IEnumerable<TItem>
DisabledField
Defines the Disabled DataField of the DataSource.
Declaration
[Parameter]
public string DisabledField { get; set; }
Property Value
ItemTemplate
Defines the template for the items. The Item Template is defined under the ItemTemplate tag of the menu.
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.
Declaration
[Parameter]
public string Selector { get; set; }
Property Value
SeparatorField
Defines the Separator DataField of the DataSource.
Declaration
[Parameter]
public string SeparatorField { get; set; }
Property Value
Template
Defines the template for the whole context menu.
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
HideAsync()
Hides the context menu.
ShowAsync(double, double)
Shows the context menu at defined coordinates.