7

I have the problem that whenever I use the Page Transitions from Windows Phone 7 Toolkit, the transitions are very slow and the whole app seems to have framed drops. The animations are "stuttering".

Is anyone else experiencing this? I'm using the TransitionFrame class as RootFrame and in the .xaml pages I'm using code like

<toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:SlideTransition Mode="SlideDownFadeOut" />
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
j00hi
  • 5,420
  • 3
  • 45
  • 82
  • These stuttering animations can also be seen in the PhoneToolkitSample. When you click on the [See the selected transition] button several times, the animations arent running equally smooth each time. I think, it's the same on the device...I'll test that tomorrow. – j00hi Jan 14 '11 at 20:18

4 Answers4

9

I'd recommend against using the WP7 Toolkit Page Transition animations.

If you activate the performance counters you can see that just by changing the root frame to the WP7 frame, your fill rate is increased by 1. Since fill rates even in the best of apps are 1.5+ and the recommended maximum is 2.5, I'd say that's very bad.

Telerik has a WP7 Page transition control you might want to checkout. But honestly, I couldn't find/code any generic page transition that gives a well-performing page flip effect.

JustinAngel
  • 16,082
  • 3
  • 44
  • 73
  • 1
    I've now tried applying the Storyboards from the Toolkit (TurnstileForwardIn, etc.) directly on my LayoutRoot-containers in the pages (e.g. in the OnNavigatedTo methods). Now the animations seem to run very smoothly!! Why do you think, the toolkit's performance is that bad? Is it because the toolkit is animating the PhoneApplicationPage (or the Frame?) and when I write my own animations, I can animate the LayoutRoot-container which is faster? And another question: How can I activate those performance counters? – j00hi Jan 16 '11 at 15:26
  • 1
    @j00hi use Application.Current.Host.Settings.EnableFrameRateCounter = true; on the constructor of the App.xaml.cs to enable frame rate counters. – murki Feb 27 '11 at 20:54
  • @j00hi how did you apply the storyboards directly? I'm having the same issues and would like to try that – Mac Mar 02 '11 at 03:08
  • @Mac you'll have to download the source (http://silverlight.codeplex.com/SourceControl/list/changesets), and you'll find the storyboards in the folder Transitions/Storyboards. Then you can apply them on LayoutRoot via `Storyboard storyboard = Application.Current.Resources[storyboardName] as Storyboard; Storyboard.SetTarget(storyboard, element); storyboard.Begin();` and so on.. – j00hi Mar 05 '11 at 09:25
3

The latest changeset include some performance improvements for transitions. You could give them a try.

WHat's on the page could also impact performance. Does it contain a lot? or any events/storyboards which could be being triggered by the transition?

Matt Lacey
  • 65,560
  • 11
  • 91
  • 143
  • Thanks for the link. Unfortunately it isn't better with the latest changeset. There isn't much on my page. Basically, only a ListBox which is filled with static data in the Loaded-eventhandler function. I'm using the toolkit and the ControlTiltEffect on the pages - that's all. – j00hi Jan 14 '11 at 20:11
1

The new version of the silverlight toolkit (august 11) is much more faster than the old one! Transition animation begins right after click on an item. Try it out, eventually you also have to change other libraries (eg Microsoft.Phone.Controls) as found in

C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Libraries\Silverlight

Toolkit can be found in:

C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Toolkit\Aug11
Rico Suter
  • 11,548
  • 6
  • 67
  • 93
1

This Link might help,

the frame is painted with the background brush colour with every frame, as well as the page being painted.

The striking thing about this is that it's painting the colour that is the same as the background behind it anyway. If the selected theme has a dark background it's painting black on top of black. Or, if the theme has a light background it paints white on white.

If we combine this knowledge of the unnecessary work the TransitionFrame is doing with the fact that anything transparent doesn't contribute to the fill rate a solution presents itself to us. We just need to make the background of the TransitionFrame transparent

Awais Qarni
  • 17,492
  • 24
  • 75
  • 137