Duration has no effect

5 posts, 0 answers
  1. Hong
    Hong avatar
    15 posts
    Member since:
    Dec 2012

    Posted 29 Jan 2014 Link to this post

    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);
  2. Victor
    Victor avatar
    1349 posts

    Posted 03 Feb 2014 Link to this post

    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.

    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.
  3. DevCraft banner
  4. Hong
    Hong avatar
    15 posts
    Member since:
    Dec 2012

    Posted 03 Feb 2014 in reply to Victor Link to this post

    Thank you, Victor, for the clarification.  

  5. angelascott
    angelascott avatar
    1 posts
    Member since:
    Sep 2014

    Posted 09 Sep 2014 Link to this post

    Thank you for your reply.
  6. Adriana
    Adriana avatar
    1 posts
    Member since:
    May 2016

    Posted 05 May Link to this post

    I Think This is Solved , if not then i have a solution
Back to Top
DevCraft banner