menu

Blazor

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

    Show / Hide Table of Contents

    Class SpinnerEvents

    Configures the event handlers for the Syncfusion.Blazor.Spinner.SfSpinner component.

    Inheritance
    System.Object
    SpinnerEvents
    Namespace: Syncfusion.Blazor.Spinner
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class SpinnerEvents : OwningComponentBase
    Remarks

    The SpinnerEvents allows you to handle various events triggered by the Syncfusion.Blazor.Spinner.SfSpinner, such as its creation, opening, and closing.

    Examples

    A simple example of using SpinnerEvents.

    <SfSpinner>
        <SpinnerEvents Created="@SpinnerCreated" OnBeforeOpen="@SpinnerBeforeOpen" OnBeforeClose="@SpinnerBeforeClose" Destroyed="@SpinnerDestroyed"></SpinnerEvents>
    </SfSpinner>
    
    @code {
        private void SpinnerCreated(object args)
        {
            // Handle the created event
        }
    
        private void SpinnerBeforeOpen(SpinnerEventArgs args)
        {
            // Handle the before open event
        }
    
        private void SpinnerBeforeClose(SpinnerEventArgs args)
        {
            // Handle the before close event
        }
    
        private void SpinnerDestroyed(object args)
        {
            // Handle the destroyed event
        }
    }

    Constructors

    SpinnerEvents()

    Declaration
    public SpinnerEvents()

    Properties

    Created

    Gets or sets an event callback that triggers after the Syncfusion.Blazor.Spinner.SfSpinner is created.

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

    An Microsoft.AspNetCore.Components.EventCallback<> of type System.Object. The default value is null.

    Remarks

    This event can be used to perform actions once the spinner is initialized.

    Destroyed

    Gets or sets an event callback that triggers after the Syncfusion.Blazor.Spinner.SfSpinner is destroyed.

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

    An Microsoft.AspNetCore.Components.EventCallback<> of type System.Object. The default value is null.

    Remarks

    This event can be used to perform cleanup actions after the spinner has been removed from the DOM.

    OnBeforeClose

    Gets or sets an event callback that triggers before the Syncfusion.Blazor.Spinner.SfSpinner is closed.

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

    An Microsoft.AspNetCore.Components.EventCallback<> that is invoked before the spinner is hidden. The callback receives a SpinnerEventArgs.

    Remarks

    This event allows you to execute custom logic before the spinner is hidden from the view.

    OnBeforeOpen

    Gets or sets an event callback that triggers before the Syncfusion.Blazor.Spinner.SfSpinner is opened.

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

    An Microsoft.AspNetCore.Components.EventCallback<> that is invoked before the spinner is shown. The callback receives a SpinnerEventArgs.

    Remarks

    You can use this event to perform actions or cancel the opening of the spinner by setting the Cancel property of the SpinnerEventArgs to true.

    Methods

    Dispose()

    Releases the unmanaged resources used by the SpinnerEvents component.

    Declaration
    public virtual void Dispose()
    Remarks

    This method is called to dispose of the component and its resources.

    Dispose(Boolean)

    Releases the unmanaged resources used by the SpinnerEvents, and optionally releases the managed resources.

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

    true to release both managed and unmanaged resources; false to release only unmanaged resources.

    Remarks

    This protected method is called to perform the actual resource cleanup. It nullifies the reference to the parent component.

    OnInitializedAsync()

    Method invoked when the component is ready to start and receives its initial parameters.

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

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

    Remarks

    This method assigns the current instance of SpinnerEvents to the parent Syncfusion.Blazor.Spinner.SfSpinner component.

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