Search results

Change the text content and styles of the ProgressButton during progress

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

@using Syncfusion.EJ2.Blazor.SplitButtons

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

@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