menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class MenuItem - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class MenuItem

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

    Inheritance
    System.Object
    MenuItem
    Implements
    System.IDisposable
    Namespace: Syncfusion.Blazor.Navigations
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class MenuItem : ComponentBase, IDisposable

    Constructors

    MenuItem()

    Declaration
    public MenuItem()

    Properties

    Disabled

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

    Declaration
    public bool Disabled { get; set; }
    Property Value
    Type
    System.Boolean

    Hidden

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

    Declaration
    public bool Hidden { get; set; }
    Property Value
    Type
    System.Boolean

    HtmlAttributes

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

    Declaration
    public Dictionary<string, object> HtmlAttributes { get; set; }
    Property Value
    Type
    System.Collections.Generic.Dictionary<System.String, System.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
    public string IconCss { get; set; }
    Property Value
    Type
    System.String

    Id

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

    Declaration
    public string Id { get; set; }
    Property Value
    Type
    System.String

    Items

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

    Declaration
    public List<MenuItem> Items { get; set; }
    Property Value
    Type
    System.Collections.Generic.List<MenuItem>

    Separator

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

    Declaration
    public bool Separator { get; set; }
    Property Value
    Type
    System.Boolean
    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
    public string Text { get; set; }
    Property Value
    Type
    System.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
    public string Url { get; set; }
    Property Value
    Type
    System.String

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder

    Dispose()

    Disposes unmanaged resources in the component.

    Declaration
    public void Dispose()

    Dispose(Boolean)

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

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type
    System.Threading.Tasks.Task

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved