alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class DropDownMenuItem

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    DropDownMenuItem
    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()
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    Namespace: Syncfusion.Blazor.SplitButtons
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class DropDownMenuItem : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

    Constructors

    DropDownMenuItem()

    Declaration
    public DropDownMenuItem()

    Properties

    ChildContent

    Gets or sets the custom content for the menu item.

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

    A RenderFragment that defines the content of the item. The default value is null.

    Remarks

    This property allows you to specify custom HTML or component content for a dropdown menu item.

    Disabled

    Gets or sets a value indicating whether the menu item is disabled.

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

    true if the item is disabled; otherwise, false. The default value is false.

    Remarks

    A disabled item cannot be selected or clicked by the user.

    HtmlAttributes

    Gets or sets a collection of additional HTML attributes to be applied to the menu item.

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

    A Dictionary<TKey, TValue> where the key is a string representing the attribute name and the value is the attribute's value. The default is null.

    Remarks

    This property allows you to add custom attributes like style, title, etc., to the rendered HTML element of the menu item.

    IconCss

    Gets or sets the CSS class/classes for the icon to be displayed in the menu item.

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

    A string representing the CSS class for the icon. The default value is string.Empty.

    Remarks

    This property allows you to add a font icon or a sprite image to the action item by specifying one or more CSS classes separated by a space.

    Id

    Gets or sets the unique identifier for the menu item.

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

    A string that represents the unique ID of the item. The default value is string.Empty.

    Remarks

    This property allows you to assign a unique identifier to the menu item, which can be useful for scripting or styling purposes.

    Separator

    Gets or sets a value indicating whether to display a separator after the menu item.

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

    true if a separator is displayed; otherwise, false. The default value is false.

    Remarks

    Separators are horizontal lines used to visually group related action items in the dropdown menu.

    Text

    Gets or sets the text to be displayed for the menu item.

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

    A string that represents the text of the item. The default value is string.Empty.

    Remarks

    This property specifies the visible text for the menu item.

    Url

    Gets or sets the URL to which the user will be navigated when the menu item is clicked.

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

    A string that represents the navigation URL. The default value is string.Empty.

    Remarks

    When this property is set, the menu item will be rendered as an anchor tag <a> that navigates to the specified URL upon being clicked.

    Methods

    BuildRenderTree(RenderTreeBuilder)

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

    Dispose(bool)

    A protected method that is called when the component is being disposed.

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

    A boolean value indicating whether the component is being disposed.

    Overrides
    OwningComponentBase.Dispose(bool)
    Remarks

    This method removes the current item from its parent DropDownMenuItems collection and releases resources.

    OnInitializedAsync()

    A protected method that is called when the component is initialized.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Overrides
    ComponentBase.OnInitializedAsync()
    Remarks

    This method adds the current item to its parent DropDownMenuItems collection upon initialization.

    Implements

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