Stop Progress Indicator in Blazor ProgressButton Component
4 Nov 20251 minute to read
Stop the active progress programmatically by calling the EndProgressAsync method on the ProgressButton instance obtained via @ref. In the following example, clicking the Stop button invokes the handler that awaits EndProgressAsync to halt the current progress.
@using Syncfusion.Blazor.SplitButtons
@using Syncfusion.Blazor.Buttons
<SfProgressButton Content="Spin Left" IsPrimary="true" @ref="ProgressBtnObj"></SfProgressButton>
<SfButton Content="Stop" OnClick="clicked"></SfButton>
@code {
SfProgressButton ProgressBtnObj;
private async Task clicked()
{
await ProgressBtnObj.EndProgressAsync();
}
}