NonLinearNavigationService and Toolkit Page Transitions

418 Views Asked by At

I'm currently using the NonLinearNavigationService Class and the toolkit page transitions in my project, I noticed a bug when using the NonLinearNagivationService, the transition effect won't play well and I'm looking for a good solution for the issue.
I've read in the WP7 developers blog that they're working to support page transitions in the next version of the NonLinearNavigationService but still no updates.
I hope that someone has found a workaround for this issue.

1

There are 1 best solutions below

1
On

You'll see that behavior if you're doing something like this:

    public MainPage()
    {
        InitializeComponent();
    }

    protected override void OnNavigatedTo(NavigationEventArgs e)
    {
        base.OnNavigatedTo(e);
        // Update your page
    }

One way to address it is to hook into the BeginTransition event on the NavigationInTransition:

    public MainPage()
    {
        InitializeComponent();
        TransitionService.GetNavigationInTransition(this).BeginTransition += new System.Windows.RoutedEventHandler(MainPage_BeginTransition);
    }

    void MainPage_BeginTransition(object sender, System.Windows.RoutedEventArgs e)
    {
        // Update your page
    }

Your update logic won't run until the 'out' transition is completed and the 'in' transition is getting ready to run.