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>里面