alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class MenuItem

    Used to configure the items which is going to render as menu.

    Inheritance
    object
    ComponentBase
    MenuItem
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.Navigations
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class MenuItem : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

    Constructors

    MenuItem()

    Declaration
    public MenuItem()

    Properties

    Disabled

    Gets or sets whether to enable or disable the menu item.

    Declaration
    [Parameter]
    public bool Disabled { get; set; }
    Property Value
    Type
    bool

    Hidden

    Gets or sets whether to hide or show the menu item.

    Declaration
    [Parameter]
    public bool Hidden { get; set; }
    Property Value
    Type
    bool

    HtmlAttributes

    Gets or sets a value that indicates the additional HTML attributes such as style, title etc., to the menu item.

    Declaration
    [Parameter(CaptureUnmatchedValues = true)]
    public Dictionary<string, object> HtmlAttributes { get; set; }
    Property Value
    Type
    Dictionary<string, object>

    IconCss

    Defines class/multiple classes separated by a space for the menu Item that is used to include an icon. Menu Item can include font icon and sprite image.

    Declaration
    [Parameter]
    public string IconCss { get; set; }
    Property Value
    Type
    string

    Id

    Gets or sets a value that indicates the id for menu item.

    Declaration
    [Parameter]
    public string Id { get; set; }
    Property Value
    Type
    string

    Items

    Gets or sets a value that indicates the sub menu items that is the array of MenuItem.

    Declaration
    [Parameter]
    public List<MenuItem> Items { get; set; }
    Property Value
    Type
    List<MenuItem>

    Separator

    Gets or sets whether to enable/disable separator between the menu items.

    Declaration
    [Parameter]
    public bool Separator { get; set; }
    Property Value
    Type
    bool
    Remarks

    Separator are either horizontal or vertical lines used to group menu items.

    Text

    Gets or sets a value that indicates the text for menu item.

    Declaration
    [Parameter]
    public string Text { get; set; }
    Property Value
    Type
    string

    Url

    Gets or sets a value that indicates the URL for menu item that creates the anchor link to navigate to the url provided.

    Declaration
    [Parameter]
    public string Url { get; set; }
    Property Value
    Type
    string

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    Dispose()

    Disposes unmanaged resources in the component.

    Declaration
    public void Dispose()

    Dispose(bool)

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type
    Task
    Overrides
    ComponentBase.OnInitializedAsync()

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved