menu

Blazor

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

    Show / Hide Table of Contents

    Class BeforeOpenCloseMenuEventArgs

    Provides information about the OnOpen and OnClose events.

    Inheritance
    System.Object
    BeforeOpenCloseMenuEventArgs
    DropDownPopupCloseEventArgs
    DropDownPopupOpenEventArgs
    SplitButtonPopupCloseEventArgs
    SplitButtonPopupOpenEventArgs
    Namespace: Syncfusion.Blazor.SplitButtons
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class BeforeOpenCloseMenuEventArgs : Object
    Remarks

    This class contains event arguments for handling actions before a dropdown menu opens or closes, allowing for cancellation and customization.

    Constructors

    BeforeOpenCloseMenuEventArgs()

    Declaration
    public BeforeOpenCloseMenuEventArgs()

    Properties

    Cancel

    Gets or sets a value indicating whether the dropdown menu opening or closing should be prevented.

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

    The default value is false. If set to true, the action is canceled.

    Remarks

    This property allows you to conditionally prevent the dropdown from opening or closing based on custom logic.

    Element

    Gets a reference to the dropdown button element.

    Declaration
    public ElementReference Element { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.ElementReference

    An Microsoft.AspNetCore.Components.ElementReference that represents the dropdown button element.

    Remarks

    This property provides direct access to the HTML element of the dropdown button, allowing for custom interactions or manipulations.

    Event

    Gets the original browser event arguments.

    Declaration
    public EventArgs Event { get; set; }
    Property Value
    Type Description
    System.EventArgs

    An System.EventArgs object that contains the original event data.

    Remarks

    This property provides access to the underlying browser event arguments, which can be useful for advanced scenarios.

    Items

    Gets or sets the list of items in the dropdown menu.

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

    A System.Collections.Generic.List<> of DropDownMenuItem objects.

    Remarks

    This property allows you to access and modify the dropdown items before they are displayed.

    Name

    Gets the name of the event.

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

    A string that represents the name of the event, which is either OnOpen or OnClose.

    Remarks

    This property helps identify which event was triggered.

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