Windows Phone 7 Navigation Animation

前端 未结 2 811
北荒
北荒 2021-01-19 06:53

I\'m trying to do an animation when navigating away from a page, but I get this error:

Cannot resolve TargetProperty (UIElement.RenderTransform).(CompositeTransform.

相关标签:
2条回答
  • 2021-01-19 07:37

    You forgot to set the CompositeTransform object, which define what kind of transform you are using.

    <phone:PhoneApplicationPage.RenderTransform>
        <CompositeTransform/>
    </phone:PhoneApplicationPage.RenderTransform>
    
    0 讨论(0)
  • 2021-01-19 07:43

    The Silverlight toolkit at http://silverlight.codeplex.com/ now includes animations for Windows Phone 7 pages using the TransitionFrame control. You can read more about it here: http://blogs.msdn.com/b/delay/archive/2010/11/02/mo-controls-mo-controls-mo-controls-announcing-the-second-release-of-the-silverlight-for-windows-phone-toolkit.aspx

    Basically, it works by setting your RootFrame to a TransitionFrame in App.xaml.cs:

    RootFrame = new TransitionFrame();

    And then setting navigation transitions for each page:

    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>
    0 讨论(0)
提交回复
热议问题