alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class ToastButtons

    A list of buttons that are used to configure the Toast buttons.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    ToastButtons
    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.OnInitialized()
    ComponentBase.OnInitializedAsync()
    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.Notifications
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ToastButtons : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Remarks

    The ToastButtons component is used as a container to define multiple action buttons for the Toast notification. It manages a collection of ToastButton instances that can be used to provide interactive elements within Toast notifications.

    Examples

    A simple ToastButtons component with action buttons.

    <SfToast>
        <ToastButtons>
            <ToastButton Content="Accept" CssClass="e-success" OnClick="@AcceptHandler"></ToastButton>
            <ToastButton Content="Cancel" CssClass="e-danger" OnClick="@CancelHandler"></ToastButton>
        </ToastButtons>
    </SfToast>

    Constructors

    ToastButtons()

    Declaration
    public ToastButtons()

    Methods

    BuildRenderTree(RenderTreeBuilder)

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

    Dispose()

    Disposes the unmanaged resources used by the ToastButtons component.

    Declaration
    public virtual void Dispose()
    Remarks

    This method releases all resources used by the ToastButtons component, including clearing the action buttons collection and releasing references to child content and parent components.

    Dispose(bool)

    Disposes the resources used by the ToastButtons component.

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

    A bool value indicating whether the method is called from the Dispose method or from the finalizer.

    Overrides
    OwningComponentBase.Dispose(bool)
    Remarks

    When disposing is true, this method releases all managed resources including the action buttons collection, child content references, and parent component references.

    OnAfterRenderAsync(bool)

    Method invoked after each time the component has been rendered.

    Declaration
    protected override Task OnAfterRenderAsync(bool firstRender)
    Parameters
    Type Name Description
    bool firstRender

    Set to true if this is the first time OnAfterRenderAsync(bool) has been invoked.

    Returns
    Type Description
    Task

    A Task representing any asynchronous operation.

    Overrides
    ComponentBase.OnAfterRenderAsync(bool)
    Remarks

    This method updates the parent Toast component with the current collection of action buttons after each render cycle. It ensures that the parent Toast component is aware of all the configured action buttons.

    Implements

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