New to Telerik UI for BlazorStart a free 30-day trial

A component that lets you render a hierarchical navigation menu with horizontal or vertical orientation. Supports data binding, item templates, item click navigation, item render styling, open/close triggers via ShowOn/HideOn, optional close-on-click, separators/disabled items, and popup settings through MenuSettings.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Type Parameters:

TItem

Syntax:

C#
public class TelerikMenu<TItem> : HierarchicalBindingComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IMenuPopupContainer

Inheritance: objectComponentBaseBaseComponentBindingComponentBaseHierarchicalBindingComponentBaseTelerikMenu<TItem>...

Implements: IComponentIDisposableIHandleAfterRenderIHandleEventIMenuPopupContainer

Inherited Members HierarchicalBindingComponentBase.IdFieldHierarchicalBindingComponentBase.ParentIdFieldHierarchicalBindingComponentBase.HasChildrenFieldHierarchicalBindingComponentBase.ItemsFieldBindingComponentBase.TextFieldBindingComponentBase.IconFieldBindingComponentBase.UrlFieldBaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()BaseComponent.OnAfterRenderAsync(bool)BaseComponent.Dispose()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeVoidAsyncWithoutAwait(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnInitialized()ComponentBase.OnParametersSet()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)ComponentBase.SetParametersAsync(ParameterView)...

Constructors

C#
public TelerikMenu()

Properties

Determines whether the menu popups should close on click.

C#
[Parameter]
public bool CloseOnClick { get; set; }

Defines the Menu's Data.

C#
[Parameter]
public IEnumerable<TItem> Data { get; set; }

Defines the Disabled DataField of the DataSource.

C#
[Parameter]
public string DisabledField { get; set; }

Define the event that triggers closing the popup that contains the menu items.

C#
[Parameter]
public MenuHideEvent HideOn { get; set; }

Defines the template for the items.

C#
[Parameter]
public RenderFragment<TItem> ItemTemplate { get; set; }

Specifies the menu settings.

C#
[Parameter]
public RenderFragment MenuSettings { get; set; }

Defines the OnClick Event which is fired when clicking on a menu item.

C#
[Parameter]
public EventCallback<TItem> OnClick { get; set; }

Fires when a Menu item is being rendered. Can be used to provide custom styling for the Menu's items.

C#
[Parameter]
public Action<MenuItemRenderEventArgs> OnItemRender { get; set; }

Defines the Orientation of Menu - vertical or horizontal.

C#
[Parameter]
public MenuOrientation Orientation { get; set; }

Defines the Separator DataField of the DataSource.

C#
[Parameter]
public string SeparatorField { get; set; }

Define the event that triggers the opening of the menu.

C#
[Parameter]
public MenuShowEvent ShowOn { get; set; }

Methods

C#
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters:__builderRenderTreeBuilder

Overrides: ComponentBase.BuildRenderTree(RenderTreeBuilder)

C#
protected override Task OnParametersSetAsync()
Returns:

Task

Overrides: ComponentBase.OnParametersSetAsync()