alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class SfMenu<TValue>

    Menu is a graphical user interface that serve as navigation headers for your application.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    SfBaseComponent
    SfMenuBase<TValue>
    SfMenu<TValue>
    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.OnInitialized()
    ComponentBase.OnParametersSet()
    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()
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    SfBaseComponent.Dispose()
    SfBaseComponent.Dispose(bool)
    SfBaseComponent.GetEffectivePlatform()
    SfBaseComponent.GetMainComponentPlatform()
    SfBaseComponent.IsMainLicenseComponent()
    SfBaseComponent.LicenseContext
    SfBaseComponent.OnObservableChange(string, object, bool, NotifyCollectionChangedEventArgs)
    SfBaseComponent.ValidateLicense()
    Namespace: Syncfusion.Blazor.Navigations
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class SfMenu<TValue> : SfMenuBase<TValue>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Type Parameters
    Name
    TValue

    Constructors

    SfMenu()

    Declaration
    public SfMenu()

    Properties

    HamburgerMode

    Gets or sets a value that indicates whether to enable or disable the hamburger mode.

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

    true, if the hamburger mode can be enabled. Otherwise, false.

    Orientation

    Gets or sets a value that indicates the orientation of menu whether it can be horizontal or vertical.

    Declaration
    [Parameter]
    public Orientation Orientation { get; set; }
    Property Value
    Type Description
    Orientation

    One of the Orientation enumeration. The default value is Orientation.Horizontal/>

    Remarks

    If the Orientation is Horizontal, the menu items will be aligned horizontally. If the Orientation is Vertical, the menu items will be aligned vertically.

    Target

    Gets or sets a value that indicates the target element to open/close Menu while click in Hamburger mode.

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

    Accepts the string value. The default value is empty.

    Title

    Gets or sets a value that indicates the title text for hamburger mode in Menu.

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

    Accepts the string value. The default value is HEADERTITLE.

    Methods

    BuildRenderTree(RenderTreeBuilder)

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

    CloseAsync()

    Closes the Menu if it is opened in hamburger mode.

    Declaration
    public Task CloseAsync()
    Returns
    Type
    Task

    GetItemIndex(TValue, bool)

    Gets the index of the menu item from the menu based on the given argument.

    Declaration
    public List<int> GetItemIndex(TValue item, bool isUniqueId = false)
    Parameters
    Type Name Description
    TValue item

    Item to be passed to get the index.

    bool isUniqueId

    Set true if it is a unique id.

    Returns
    Type
    List<int>

    OnAfterRenderAsync(bool)

    Method invoked after each time the component has been rendered.

    Declaration
    protected override Task OnAfterRenderAsync(bool firstRender)
    Parameters
    Type Name Description
    bool firstRender

    Set to true for the first time component rendering; otherwise gets false.

    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing any asynchronous operation.

    Overrides
    SfMenuBase<TValue>.OnAfterRenderAsync(bool)

    OnInitializedAsync()

    Method invoked when the component is ready to start.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing any asynchronous operation.

    Overrides
    Syncfusion.Blazor.Navigations.Internal.SfMenuBase<TValue>.OnInitializedAsync()

    OnParametersSetAsync()

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type
    Task
    Overrides
    Syncfusion.Blazor.Navigations.Internal.SfMenuBase<TValue>.OnParametersSetAsync()

    OpenAsync()

    Opens the menu in the hamburger mode.

    Declaration
    public Task OpenAsync()
    Returns
    Type
    Task

    Implements

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