Begin with a full progress bar

Hi how can I begin the progress bar at 100%? when I set the progress to 100 initially then begin decreasing the value the progress bar begins by filling up. I need to actually avoid this display of initial filling up.

1 Reply

MP Michael Prabhu M Syncfusion Team September 6, 2018 07:10 AM UTC

Hi Josh, 
 
Greetings from Syncfusion, we have analyzed your requirement and it can be achieved by setting AnimationDuration property to 0 on initial loading of the progress bar, so this will avoid display of initial filling up of progress bar and shows up the filled progress bar.  
 
Based on your requirement we have prepared a sample and it can be downloaded from the below link. 
 
 
Please refer the below code snippet for better understanding. 
 
Code Snippet C# 
SfLinearProgressBar sfLinearProgressBar = new SfLinearProgressBar(this); 
sfLinearProgressBar.Progress = 100; 
// To stop the progress filling animation. 
sfLinearProgressBar.AnimationDuration = 0; 
linearLayout.AddView(sfLinearProgressBar); 
SfCircularProgressBar circularProgressBar = new SfCircularProgressBar(this); 
circularProgressBar.Progress = 100; 
// To stop the progress filling animation. 
circularProgressBar.AnimationDuration = 0; 
linearLayout.AddView(circularProgressBar); 
 
 
private void SetAnimationDurationButton_Click(object sender, System.EventArgs e) 
{ 
    // To enable the animation duration. 
    this.sfLinearProgressBar.AnimationDuration = 1000; 
    this.circularProgressBar.AnimationDuration = 1000; 
    this.SetAnimationDurationButton.Enabled = false; 
} 
 

Thanks, 
Michael 


Loader.
Up arrow icon