alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class SpinnerEvents

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

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    SpinnerEvents
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.BuildRenderTree(RenderTreeBuilder)
    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.Spinner
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class SpinnerEvents : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    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
    [Parameter]
    public EventCallback<object> Created { get; set; }
    Property Value
    Type Description
    EventCallback<object>

    An EventCallback<TValue> of type 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
    [Parameter]
    public EventCallback<object> Destroyed { get; set; }
    Property Value
    Type Description
    EventCallback<object>

    An EventCallback<TValue> of type 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
    [Parameter]
    public EventCallback<SpinnerEventArgs> OnBeforeClose { get; set; }
    Property Value
    Type Description
    EventCallback<SpinnerEventArgs>

    An EventCallback<TValue> 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
    [Parameter]
    public EventCallback<SpinnerEventArgs> OnBeforeOpen { get; set; }
    Property Value
    Type Description
    EventCallback<SpinnerEventArgs>

    An EventCallback<TValue> 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(bool)

    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
    bool disposing

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

    Overrides
    OwningComponentBase.Dispose(bool)
    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
    Task

    A Task representing any asynchronous operation.

    Overrides
    ComponentBase.OnInitializedAsync()
    Remarks

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

    Implements

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