Change transition direction

Thread is closed for posting
2 posts, 0 answers
  1. Alessandro
    Alessandro avatar
    1 posts
    Member since:
    May 2014

    Posted 15 Jul 2014 Link to this post

    Hello, currently i have this code for page transitions :

    RadSlideTransition anim = new RadSlideTransition();
    anim.Orientation = System.Windows.Controls.Orientation.Horizontal;

    RadPhoneApplicationFrame frame = new RadPhoneApplicationFrame{Transition = anim};
    RootFrame = frame;

    This always shows the new page coming from the right and sliding to the left.

    I use a swipe control so the user can swipe the page to left or right and i would like to change the direction of the page transition according to the user swipe direction.

    Is there a way to acomplish that ? i tried with every transition control from telerik and couldnt change the animation.

    The closes i got was trying something like:
    anim.ForwardOutAnimation = anim.ForwardOutAnimation.CreateOpposite();

    But this created a weird animation because the animation started at the same point of the original and then the page would "jump" to the left and start the animation to the right.

  2. Rosy Topchiyska
    Rosy Topchiyska avatar
    586 posts

    Posted 18 Jul 2014 Link to this post

    Hello Alessandro,

    Thank you for contacting us.

    From the provided information I can not completely understand what is your scenario. I have attached a sample project that demonstrates how to play different animations depending on whether the user navigates to a new page or goes back. I have used the Page.OnNavigatedTo() method where depending on the NavigationEventArgs.NavigationMode I create proper animation for the page. If this is not your scenario, could you please elaborate a bit more on what exactly you wish to accomplish or you can send us a sample project.

    I hope this helps. Please, let us know if you have further questions.

    Rosy Topchiyska

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top