`

WP7 silverlight toolkit 学习之NavigationInTransition

    博客分类:
  • WP7
阅读更多

NavigationInTransition这个是实现页面切换效果,而且没控件来拖,要自己手动写,

将App.xaml.cs中InitializePhoneApplication()函数里的RootFrame进行修改

RootFrame=new TransitionFrame();

有五种动画效果

1.RollTransition(卷:)

2.RotateTransition(旋转 :类似(屏幕左右旋转)可设置顺时针方向,或者逆时针方向

3.SlideTransition(滑:类似(上下进去屏幕)

4.SwivelTransition(旋转 :类似(屏幕前后旋转)

5.TurnstileTransition(栅门:类似翻页效果)

 

写个案例:

xaml:

<toolkit:TransitionService.NavigationInTransition>
<toolkit:NavigationInTransition>
<toolkit:NavigationInTransition.Backward>
<toolkit:RotateTransition Mode="In180Clockwise"></toolkit:RotateTransition>
</toolkit:NavigationInTransition.Backward>
<toolkit:NavigationInTransition.Forward>
<toolkit:RotateTransition Mode="In180Clockwise"></toolkit:RotateTransition>
</toolkit:NavigationInTransition.Forward>
</toolkit:NavigationInTransition>
</toolkit:TransitionService.NavigationInTransition>
<toolkit:TransitionService.NavigationOutTransition>
<toolkit:NavigationOutTransition>
<toolkit:NavigationOutTransition.Backward>
<toolkit:RotateTransition Mode="Out180Clockwise"></toolkit:RotateTransition>
</toolkit:NavigationOutTransition.Backward>
<toolkit:NavigationOutTransition.Forward>
<toolkit:RotateTransition Mode="Out180Clockwise"></toolkit:RotateTransition>
</toolkit:NavigationOutTransition.Forward>
</toolkit:NavigationOutTransition>
</toolkit:TransitionService.NavigationOutTransition>

这个放在页面的前面,<phone:PhoneApplicationPage >放到这个后面,由于是手动写的,要自己写引入silverlight命名空间,xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" 这个是在<phone:PhoneApplicationPage>里面

0
0
分享到:
评论
发表评论

文章已被作者锁定,不允许评论。

相关推荐

Global site tag (gtag.js) - Google Analytics