Spinner Duration

Hello, I use the Spinner's .Start() function, but it stops after two seconds. How can I set the duration on the spinner?

Also, if I use Start(), shouldn't the spinner spin until I use Stop()? This does not happen.

Thank you.

3 Replies 1 reply marked as answer

MK Mohan Kumar Ramasamy Syncfusion Team August 24, 2020 04:29 PM UTC

Hi Aaron, 
 
We have checked your reported query, we can set the Duration in Progress Button Component. Please refer the below code snippets. 
 
@using Syncfusion.Blazor.SplitButtons 
 
<SfProgressButton Content="Spin Top" IsPrimary="true" Duration="1000"> 
    <ProgressButtonSpinSettings Position="SpinPosition.Left"></ProgressButtonSpinSettings> 
</SfProgressButton> 
 
 
For your reference, we have prepared a sample based on thi please refer below link. 
 
 
You can pause and resume the progress using the Stop and Start methods. Pease refer below link. 
 
 
Please let us know, if you need any further assistance, 
 
Regards, 
Mohankumar R 



AB Aaron Beer August 25, 2020 07:47 PM UTC

This does not answer my question. I'm using the Start and Stop, and it is still ending at 2 seconds, which is the default duration. Again -- it is stopping BEFORE I call the Stop function.


MK Mohan Kumar Ramasamy Syncfusion Team August 26, 2020 12:12 PM UTC

Hi Aaron, 
 
Sorry for the inconvenience caused. 
 
We can achieve your requirement using ProgressComplete method. Please refer the below code snippets. 
 
<SfProgressButton CssClass="@CssClass" Content="Spin Top" IsPrimary="true" Duration="isDuration" @ref="ProgressButtonObj" @onclick="OnStart"> 
        <ProgressButtonSpinSettings Position="SpinPosition.Left"></ProgressButtonSpinSettings> 
    </SfProgressButton> 
 
<SfButton Content="Stop" OnClick="Stop"></SfButton> 
 
@code { 
     SfProgressButton ProgressButtonObj; 
 
    private void Stop() 
    { 
        ProgressButtonObj.ProgressComplete(); 
    } 
} 
 
For your reference we have prepared a sample based on this, please refer below link. 
 
 
Please let us know, if you need any further assistance. 
 
Regards, 
Mohankumar R 


Marked as answer
Loader.
Up arrow icon