0

I have been trying to implement page transitions within my WP7 app and have been using the transitions with the Windows phone toolkit. I have set them up as a style within APP.XAML and then setting this same style within a couple of pages. Code is shown below.

Navigating forward, the page jumps a little before the transition occurs. Going backwards is fine and its nice and smooth. The same occurs on the emulator and the phone (in 7.0) and occurs in the emulator in 7.1. (Phone is not on 7.1 yet).
It's pretty annoying and detracts from the whole transition.

Is this something that I am doing wrong? - Thanks

 <Style x:Key="TurnstileTransition" TargetType="phone:PhoneApplicationPage">
        <Setter Property="toolkit:TransitionService.NavigationInTransition">
            <Setter.Value>
                <toolkit:NavigationInTransition>
                    <toolkit:NavigationInTransition.Backward>
                        <toolkit:TurnstileTransition Mode="BackwardIn"/>
                    </toolkit:NavigationInTransition.Backward>
                    <toolkit:NavigationInTransition.Forward>
                        <toolkit:TurnstileTransition Mode="ForwardIn"/>
                    </toolkit:NavigationInTransition.Forward>
                </toolkit:NavigationInTransition>
            </Setter.Value>
        </Setter>
        <Setter Property="toolkit:TransitionService.NavigationOutTransition">
            <Setter.Value>
                <toolkit:NavigationOutTransition>
                    <toolkit:NavigationOutTransition.Backward>
                        <toolkit:TurnstileTransition Mode="BackwardOut"/>
                    </toolkit:NavigationOutTransition.Backward>
                    <toolkit:NavigationOutTransition.Forward>
                        <toolkit:TurnstileTransition Mode="ForwardOut"/>
                    </toolkit:NavigationOutTransition.Forward>
                </toolkit:NavigationOutTransition>
            </Setter.Value>
        </Setter>
    </Style>

And setup on a page (within the XAml)

Style="{StaticResource TurnstileTransition}"
Peter
  • 679
  • 1
  • 10
  • 25
  • Check http://stackoverflow.com/questions/4691413/windows-phone-7-page-transitions-very-slow-using-toolkit/7152200#7152200 or http://blog.rsuter.com/?p=74 – Rico Suter Sep 05 '11 at 16:22

2 Answers2

2

When targetting Mango, have you tried upgrading to the August 2011 toolkit? There were apparently optimisations made to the transitions.

Richard Szalay
  • 83,269
  • 19
  • 178
  • 237
  • I have downloaded and installed the August 2011 toolkit. Thanks. Just a query as to how I include in my project to replace the earlier toolkits. The reference to Microsoft.Controls.Phone.Toolkit still points to the 7.0 version. Do I need to remove that reference and add in the newer one?? – Peter Sep 05 '11 at 19:51
  • Great - this has made a huge difference now I am on the Aug toolkit. Thanks! – Peter Sep 06 '11 at 05:34
2

Are you showing the SystemTray on both pages, or only on one of them? That would greatly affect the transition, and cause the jump.

Also, make sure you always schedule navigation via. the dispatcher. In my experience, that reduced the issues with transitions greatly.

Dispatcher.BeginInvoke(() => NavigationService.Navigate(uriToNavigateTo));
Claus Jørgensen
  • 25,882
  • 9
  • 87
  • 150
  • Ok - thanks - in my case it made little difference to my issue(with the 7.0 toolkit), but I will look into using this approach to Navigate. Are there other advantages to schedule Navigation this way? – Peter Sep 06 '11 at 05:33