This is a migrated thread and some comments may be shown as answers.

Animating Progress Bar

1 Answer 233 Views
ProgressBar
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 13 Dec 2007, 01:33 AM
I'm trying to make my RadProgressBar control disappear gradually by doing an animation on the Opacity Property.

I found an example of doing animation on a border of a button, but I can't seem to apply the same techniques to the Progress Bar.

Does anyone have an example of animating a RadProgressBar's properties?

Thanks much!
Kevin

1 Answer, 1 is accepted

Sort by
0
Boyko Markov
Telerik team
answered on 14 Dec 2007, 09:29 AM
Hello Kevin,

Thank you for writing.

Use the following as a guide:
  1. Subscribe to the Load event of your form
  2. Write the following code snippet in the load event handler
            border = (BorderPrimitive)this.radProgressBar1.ProgressBarElement.Children[3] as BorderPrimitive;     
            border.Width = 5;     
            border.GradientStyle = GradientStyles.Linear;     
            border.ForeColor = Color.White;     
            border.ForeColor2 = Color.Green;     
            border.ForeColor3 = Color.Yellow;     
            border.ForeColor4 = Color.Blue;     
            animatedAngle.AnimationFinished += new AnimationFinishedEventHandler(animatedAngle_AnimationFinished);     
            animatedAngle.ApplyValue(border);    
 

    3.  In the AnimationFinishedHandler add the following:

       void animatedAngle_AnimationFinished(object sender, AnimationStatusEventArgs e)
       {
             animatedAngle.ApplyValue(border);
       }


If you have any additional questions, please contact us.

Sincerely yours,
the Telerik team


Instantly find answers to your questions at the new Telerik Support Center
Tags
ProgressBar
Asked by
Kevin
Top achievements
Rank 1
Answers by
Boyko Markov
Telerik team
Share this question
or