Search code examples
c#windows-phone-7animationwindows-phone-8panorama-control

How to smoothly navigate to a different panorama item


In a panorama application, I have added a couple of situations where the user is navigated back to a certain panorama item. However this is done in one sudden movement. Is there a way I can do this action more smoothly, with some form of transition? Or something of the like?


Solution

  • This code worked for me

    SlideTransition slideTransition = new SlideTransition();
    slideTransition.Mode = SlideTransitionMode.SlideRightFadeIn;
    ITransition transition = slideTransition.GetTransition(panorama_main);
    transition.Completed += delegate
    {
        transition.Stop();
    };
    PanoramaItem pItem = (PanoramaItem)panorama_main.Items[3];
    panorama_main.DefaultItem = pItem; 
    transition.Begin();