menu

Blazor

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

    Show / Hide Table of Contents

    Class ToolbarEvents

    Inheritance
    System.Object
    ToolbarEvents
    Namespace: Syncfusion.Blazor.Navigations
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ToolbarEvents : ComponentBase

    Constructors

    ToolbarEvents()

    Declaration
    public ToolbarEvents()

    Properties

    Clicked

    Triggers an event when clicking a SfToolbar element.

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

    An event callback function.

    Remarks

    The event arguments contain information about the clicked element.

    Examples

    The following code example shows how to obtain the clicked element text in the Clicked event handler.

    <SfToolbar>
        <ToolbarEvents Clicked="ToolbarClicked"></ToolbarEvents>
        <ToolbarItems>
            <ToolbarItem Text="Cut" TooltipText="Cut"></ToolbarItem>
            <ToolbarItem Text="Copy" TooltipText="Copy"></ToolbarItem>
            <ToolbarItem Text="Paste" TooltipText="Paste"></ToolbarItem>
        </ToolbarItems>
    </SfToolbar>
    @code {
        public void ToolbarClicked(ClickEventArgs args)
        {
            string clickedText = args.Item.Text;
        }
    }

    Created

    Triggers an event after the SfToolbar component has finished rendering during initial loading.

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

    An event callback function.

    Destroyed

    Triggers an event after the SfToolbar component is destroyed.

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

    An event callback function.

    Methods

    BuildRenderTree(RenderTreeBuilder)

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

    OnInitializedAsync()

    Method invoked when the component is ready to start.

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

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

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