如何“向上”/“向下”动画页面导航?

时间:2013-03-31 06:42:47

标签: windows-phone-8

首先,我知道之前有人问过similar问题。

虽然我可以按照本指南here成功为页面设置动画,但我无法找到有关向上/向下动画的任何信息。我想要实现的动画是我的 ApplicationBarIconButton 。如果动画来自右/左,那就太奇怪了。

任何帮助?

1 个答案:

答案 0 :(得分:0)

以下是我与Windows Phone Toolkit一起使用的一些Xaml:

<toolkit:TransitionService.NavigationInTransition>
    <toolkit:NavigationInTransition>
        <toolkit:NavigationInTransition.Backward>
            <toolkit:SlideTransition Mode="SlideUpFadeIn"/>
        </toolkit:NavigationInTransition.Backward>
        <toolkit:NavigationInTransition.Forward>
            <toolkit:SlideTransition Mode="SlideUpFadeIn"/>
        </toolkit:NavigationInTransition.Forward>
    </toolkit:NavigationInTransition>
</toolkit:TransitionService.NavigationInTransition>
<toolkit:TransitionService.NavigationOutTransition>
    <toolkit:NavigationOutTransition>
        <toolkit:NavigationOutTransition.Backward>
            <toolkit:SlideTransition Mode="SlideDownFadeOut"/>
        </toolkit:NavigationOutTransition.Backward>
        <toolkit:NavigationOutTransition.Forward>
            <toolkit:SlideTransition Mode="SlideDownFadeOut"/>
        </toolkit:NavigationOutTransition.Forward>
    </toolkit:NavigationOutTransition>
</toolkit:TransitionService.NavigationOutTransition>

其他可用的转换是:

  • Roll
  • RotateIn180Clockwise
  • RotateIn180CounterClockwise
  • RotateIn90Clockwise
  • RotateIn90CounterClockwise
  • RotateOut180Clockwise
  • RotateOut180CounterClockwise
  • RotateOut90Clockwise
  • RotateOut90CounterClockwise
  • SlideDownFadeIn
  • SlideDownFadeOut
  • SlideLeftFadeIn
  • SlideLeftFadeOut
  • SlideRightFadeIn
  • SlideRightFadeOut
  • SlideUpFadeIn
  • SlideUpFadeOut
  • SwivelBackwardIn
  • SwivelBackwardOut
  • SwivelForwardIn
  • SwivelForwardOut
  • SwivelFullScreenIn
  • SwivelFullScreenOut
  • TurnstileBackwardIn
  • TurnstileBackwardOut
  • TurnstileForwardIn
  • TurnstileForwardOut

如果找不到能够提供所需效果的转换,只需创建自己的转换,毕竟它们只是Xaml Storyboards。如果您查看CodePlex上Windows Phone Toolkit的源代码,您应该拥有所需的所有线索。