Class SpinnerEventArgs
Inheritance
System.Object
SpinnerEventArgs
Namespace: Syncfusion.Blazor.Toolkit.Spinner
Assembly: Syncfusion.Blazor.Toolkit.dll
Syntax
public class SpinnerEventArgs : Object
Remarks
These event arguments enable you to conditionally prevent the spinner from being shown or hidden by setting the Cancel property to true. This allows for custom logic to control the spinner's visibility based on application state or other conditions.
Examples
The following example demonstrates how to use SpinnerEventArgs in an event handler to cancel the spinner's visibility change.
<SfSpinner @bind-Visible="@IsVisible" OnBeforeOpen="HandleBeforeOpenAsync">
</SfSpinner>
@code {
private bool IsVisible { get; set; } = true;
private void HandleBeforeOpenAsync(SpinnerEventArgs args)
{
// Cancel the spinner from being shown based on custom condition
args.Cancel = true;
}
}
Constructors
SpinnerEventArgs()
Declaration
public SpinnerEventArgs()
Properties
Cancel
Gets or sets a value indicating whether the spinner's visibility change should be canceled.
Declaration
public bool Cancel { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | true to prevent the spinner's visibility change; otherwise, false. The default value is false. |