Class TelerikContextMenu<TItem>
The class for the Telerik Context Menu component.
Inheritance
Inherited Members
Namespace: Telerik.Blazor.Components
Assembly: Telerik.Blazor.dll
Syntax
public class TelerikContextMenu<TItem> : HierarchicalBindingComponentBase, IDisposable, IHierarchicalItemBinding, IItemBinding, IMenuPopupContainer
Type Parameters
TItem
|
Constructors
TelerikContextMenu()
Declaration
public TelerikContextMenu()
Properties
ContextMenuSettings
Specifies the component settings.
Declaration
public RenderFragment ContextMenuSettings { get; set; }
Property Value
Microsoft.AspNetCore.Components.RenderFragment
|
Data
A collection that contains the ContextMenu items.
Declaration
public IEnumerable<TItem> Data { get; set; }
Property Value
System.Collections.Generic.IEnumerable<TItem>
|
DisabledField
Defines the Disabled DataField of the DataSource.
Declaration
public string DisabledField { get; set; }
Property Value
System.String
|
ItemTemplate
Defines the template for the items. The Item Template is defined under the ItemTemplate tag of the menu.
Declaration
public RenderFragment<TItem> ItemTemplate { get; set; }
Property Value
Microsoft.AspNetCore.Components.RenderFragment<TItem>
|
OnClick
Defines the OnClick Event which is fired when clicking on a menu item.
Declaration
public EventCallback<TItem> OnClick { get; set; }
Property Value
Microsoft.AspNetCore.Components.EventCallback<TItem>
|
OnItemRender
Fires when a ContextMenu item is being rendered. Can be used to provide custom styling for the ContextMenu's items.
Declaration
public Action<MenuItemRenderEventArgs> OnItemRender { get; set; }
Property Value
System.Action<MenuItemRenderEventArgs>
|
Selector
Defines the selector for the target elements where the Context Menu will be shown. Uses CSS-type selectors.
Declaration
public string Selector { get; set; }
Property Value
System.String
|
SeparatorField
Defines the Separator DataField of the DataSource.
Declaration
public string SeparatorField { get; set; }
Property Value
System.String
|
Template
Defines the template for the whole context menu.
Declaration
public RenderFragment<IEnumerable<TItem>> Template { get; set; }
Property Value
Microsoft.AspNetCore.Components.RenderFragment<System.Collections.Generic.IEnumerable<TItem>>
|
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder
__builder
|
Dispose()
HideAsync()
Hides the context menu.
Declaration
public Task HideAsync()
Returns
System.Threading.Tasks.Task
|
OnAfterRenderAsync(Boolean)
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
System.Boolean
firstRender
|
Returns
System.Threading.Tasks.Task
|
Overrides
Refresh()
Re-renders the component.
Declaration
public void Refresh()
ShowAsync(Double, Double)
Shows the context menu at defined coordinates.
Declaration
public Task ShowAsync(double clientX, double clientY)
Parameters
System.Double
clientX
Coordinate for X axis. |
System.Double
clientY
Coordinate for Y axis. |
Returns
System.Threading.Tasks.Task
|
Explicit Interface Implementations
IMenuPopupContainer.AddPopupSettings(MenuPopupSettingsBase)
Declaration
void IMenuPopupContainer.AddPopupSettings(MenuPopupSettingsBase popupSettings)
Parameters
MenuPopupSettingsBase
popupSettings
|
Implements
IMenuPopupContainer.RemovePopupSettings()
Declaration
void IMenuPopupContainer.RemovePopupSettings()