menu

Blazor

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

    Show / Hide Table of Contents

    Class DropDownButtonEvents

    Inheritance
    System.Object
    DropDownButtonEvents
    Namespace: Syncfusion.Blazor.SplitButtons
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class DropDownButtonEvents : ComponentBase

    Constructors

    DropDownButtonEvents()

    Declaration
    public DropDownButtonEvents()

    Properties

    Closed

    Gets or sets an event callback that is raised when the SfDropDownButton popup is closed.

    Declaration
    public EventCallback<OpenCloseMenuEventArgs> Closed { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<OpenCloseMenuEventArgs>

    An event callback function.

    Remarks

    The events were specified in DropDownButtonEvents tag directive. And you can access the DropDownButton popup related values using OpenCloseMenuEventArgs.

    Examples
     
    <SfDropDownButton> 
       <DropDownMenuItems> 
          <DropDownMenuItem Text="Dashboard"></DropDownMenuItem> 
          <DropDownMenuItem Text="Notifications"></DropDownMenuItem> 
          <DropDownMenuItem Text="User Settings"></DropDownMenuItem> 
          <DropDownMenuItem Text="Log Out"></DropDownMenuItem> 
       </DropDownMenuItems> 
        <DropDownButtonEvents Closed="@Closed"></DropDownButtonEvents> 
    </SfDropDownButton> 
    @code { 
        private void Closed(OpenCloseMenuEventArgs args) { 
            // Write your code here. 
        } 
    } 

    Created

    Gets or sets an event callback that is raised when the SfDropDownButton rendering is completed.

    Declaration
    public EventCallback<object> Created { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    An event callback function.

    Remarks

    The events were specified in DropDownButtonEvents tag directive.

    ItemSelected

    Gets or sets an event callback that is raised when the SfDropDownButton item is clicked.

    Declaration
    public EventCallback<MenuEventArgs> ItemSelected { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<MenuEventArgs>

    An event callback function.

    Remarks

    The events were specified in DropDownButtonEvents tag directive. And you can access the DropDownButton item related values using MenuEventArgs.

    Examples
     
    <SfDropDownButton> 
       <DropDownMenuItems> 
          <DropDownMenuItem Text="Dashboard"></DropDownMenuItem> 
          <DropDownMenuItem Text="Notifications"></DropDownMenuItem> 
          <DropDownMenuItem Text="User Settings"></DropDownMenuItem> 
          <DropDownMenuItem Text="Log Out"></DropDownMenuItem> 
       </DropDownMenuItems> 
        <DropDownButtonEvents ItemSelected="@ItemSelected"></DropDownButtonEvents> 
    </SfDropDownButton> 
    @code { 
        private void ItemSelected(MenuEventArgs args) { 
            // Write your code here. 
        } 
    } 

    OnClose

    Gets or sets an event callback that is raised when the SfDropDownButton popup is closing.

    Declaration
    public EventCallback<BeforeOpenCloseMenuEventArgs> OnClose { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<BeforeOpenCloseMenuEventArgs>

    An event callback function.

    Remarks

    The events were specified in DropDownButtonEvents tag directive. And you can access the DropDownButton popup related values using BeforeOpenCloseMenuEventArgs.

    Examples
     
    <SfDropDownButton> 
       <DropDownMenuItems> 
          <DropDownMenuItem Text="Dashboard"></DropDownMenuItem> 
          <DropDownMenuItem Text="Notifications"></DropDownMenuItem> 
          <DropDownMenuItem Text="User Settings"></DropDownMenuItem> 
          <DropDownMenuItem Text="Log Out"></DropDownMenuItem> 
       </DropDownMenuItems> 
        <DropDownButtonEvents OnClose="@OnClose"></DropDownButtonEvents> 
    </SfDropDownButton> 
    @code { 
        private void OnClose(BeforeOpenCloseMenuEventArgs args) { 
            // Write your code here. 
        } 
    } 

    OnItemRender

    Gets or sets an event callback that is raised when the SfDropDownButton rendering is completed.

    Declaration
    public EventCallback<MenuEventArgs> OnItemRender { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<MenuEventArgs>

    An event callback function.

    Remarks

    The events were specified in DropDownButtonEvents tag directive. And you can customize the DropDownButton items rendering using MenuEventArgs.

    Examples
     
    <SfDropDownButton> 
       <DropDownMenuItems> 
          <DropDownMenuItem Text="Dashboard"></DropDownMenuItem> 
          <DropDownMenuItem Text="Notifications"></DropDownMenuItem> 
          <DropDownMenuItem Text="User Settings"></DropDownMenuItem> 
          <DropDownMenuItem Text="Log Out"></DropDownMenuItem> 
       </DropDownMenuItems> 
        <DropDownButtonEvents OnItemRender="@OnItemRender"></DropDownButtonEvents> 
    </SfDropDownButton> 
    @code { 
        private void OnItemRender(MenuEventArgs args) { 
            // Write your code here. 
        } 
    } 

    OnOpen

    Gets or sets an event callback that is raised when the SfDropDownButton popup is opening.

    Declaration
    public EventCallback<BeforeOpenCloseMenuEventArgs> OnOpen { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<BeforeOpenCloseMenuEventArgs>

    An event callback function.

    Remarks

    The events were specified in DropDownButtonEvents tag directive. And you can access the DropDownButton popup related values using BeforeOpenCloseMenuEventArgs.

    Opened

    Gets or sets an event callback that is raised when the SfDropDownButton popup is opened.

    Declaration
    public EventCallback<OpenCloseMenuEventArgs> Opened { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<OpenCloseMenuEventArgs>

    An event callback function.

    Remarks

    The events were specified in DropDownButtonEvents tag directive. And you can access the DropDownButton popup related values using OpenCloseMenuEventArgs.

    Methods

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type
    System.Threading.Tasks.Task
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved