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

Duration has no effect

4 Answers 34 Views
Animation
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Hong
Top achievements
Rank 1
Hong asked on 29 Jan 2014, 11:20 PM
I essentially copied the code from a Telerik document to test the animation.  setting the Duration does not have any effect.  The animation always finishes in about a second. The following is the code:

            RadScaleMoveAndRotateAnimation scaleMoveRotateAnimation = this.Resources["scaleMoveRotateAnimation"] as RadScaleMoveAndRotateAnimation;
            scaleMoveRotateAnimation.ScaleAnimation.StartScaleX = 0.1;
            scaleMoveRotateAnimation.ScaleAnimation.EndScaleX = 1.0;
            scaleMoveRotateAnimation.ScaleAnimation.StartScaleY = 0.1;
            scaleMoveRotateAnimation.ScaleAnimation.EndScaleY = 1.0;
            scaleMoveRotateAnimation.MoveAnimation.StartPoint = new Point(0, 0);
            scaleMoveRotateAnimation.MoveAnimation.EndPoint = new Point(100, 100);
            scaleMoveRotateAnimation.RotateAnimation.Axes = PerspectiveAnimationAxis.X;
            scaleMoveRotateAnimation.RotateAnimation.CenterX = 0.5;
            scaleMoveRotateAnimation.RotateAnimation.StartAngleX = 360;
            scaleMoveRotateAnimation.RotateAnimation.EndAngleX = 0;
            scaleMoveRotateAnimation.RotateAnimation.Direction = PerspectiveAnimationDirection.CounterClockwise;
            scaleMoveRotateAnimation.Duration = new Duration(TimeSpan.FromSeconds(10000));
            if (scaleMoveRotateAnimation != null)
            {
                RadAnimationManager.Play(LayoutRoot.Children[0], scaleMoveRotateAnimation);
            }

4 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 03 Feb 2014, 02:13 PM
Hi Hong,

Thanks for writing.
The animation you are using is an animation group. In order to customize the duration you have to tweak its child animations. They can be accessed via the Children property. It is a collection of RadAnimation objects. Your animation consists of three children so feel free to set their durations as required.
Please write again if you have other questions.

Regards,
Victor
Telerik
If you want to get updates on new releases, tips and tricks and sneak peek previews directly from the developers working on the UI for Windows Phone, subscribe to the blog feed now.
0
Hong
Top achievements
Rank 1
answered on 03 Feb 2014, 02:17 PM
Thank you, Victor, for the clarification.  

Hong
0
angelascott
Top achievements
Rank 1
answered on 09 Sep 2014, 12:44 PM
Thank you for your reply.
0
Adriana
Top achievements
Rank 2
answered on 05 May 2016, 11:01 AM
I Think This is Solved , if not then i have a solution
Tags
Animation
Asked by
Hong
Top achievements
Rank 1
Answers by
Victor
Telerik team
Hong
Top achievements
Rank 1
angelascott
Top achievements
Rank 1
Adriana
Top achievements
Rank 2
Share this question
or