alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class MessageToolbar

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    MessageToolbar
    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.InteractiveChat
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class MessageToolbar : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

    Constructors

    MessageToolbar()

    Declaration
    public MessageToolbar()

    Properties

    ItemClicked

    Occurs when a message toolbar item is clicked.

    Declaration
    [Parameter]
    public EventCallback<MessageToolbarItemClickedEventArgs> ItemClicked { get; set; }
    Property Value
    Type Description
    EventCallback<MessageToolbarItemClickedEventArgs>

    An EventCallback<TValue> that handles toolbar item click events. The default value is an empty event callback.

    Remarks

    This event is raised whenever a user clicks on any toolbar item within the MessageToolbar. The event provides detailed information about the clicked item through MessageToolbarItemClickedEventArgs.

    Use this event to implement custom logic for message actions such as reply, forward, copy, pin, or delete operations.

    Examples

    Handling toolbar item clicks:

    <MessageToolbar ItemClicked="OnToolbarItemClicked">
        <MessageToolbarItem IconCss="e-icons e-chat-reply"></MessageToolbarItem>
    </MessageToolbar>
    
    @code {
        private void OnToolbarItemClicked(MessageToolbarItemClickedEventArgs args)
        {
            // Handle the toolbar item click
            Console.WriteLine($"Clicked item: {args.Item.Text}");
        }
    }

    Width

    Gets or sets the width of the message toolbar.

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

    A string representing the CSS width value for the toolbar. The default value is "auto".

    Remarks

    Accepts any valid CSS width value including percentages (e.g., "100%"), keywords (e.g., "auto"), or fixed pixel values (e.g., "200px").

    When set to "auto", the toolbar will automatically size based on its content and available space.

    Methods

    BuildRenderTree(RenderTreeBuilder)

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

    Dispose(bool)

    Dispose unmanaged resources in the Syncfusion Blazor component.

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

    Boolean value to dispose the object.

    Overrides
    OwningComponentBase.Dispose(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
    ComponentBase.OnInitializedAsync()

    Implements

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