Search results

Change the text content and styles of the Progress Button during progress in Blazor ProgressButton component

You can change the text content and styles of the Progress Button during progress state by changing the text content and the CssClass property at the OnBegin and OnEnd events.

@using Syncfusion.Blazor.SplitButtons

<SfProgressButton Content="@Content" EnableProgress="true" CssClass="@CssClass" Duration="4000">
    <ProgressButtonEvents OnBegin="Begin" OnEnd="End"></ProgressButtonEvents>
</SfProgressButton>

@code {
    public string Content = "Upload";
    public string CssClass = "e-hide-spinner";
    public void Begin(ProgressEventArgs args)
    {
        this.Content = "Uploading...";
        this.CssClass = "e-hide-spinner e-info";
    }
    public void End(ProgressEventArgs args)
    {
        this.Content = "Success";
        this.CssClass = "e-hide-spinner e-success";
    }
}

Output be like

Progress Button Sample