第一步:使用Sliverlight工具 首先下载 Sliverlight Toolkit 然后根据下面的步骤操作。在你的应用中添加”Microsoft.Phone.Controls.Toolkit”引用。
第二步:修改 App.xaml.cs 修改 App.xaml.cs 来启用页面切换效果 将
RootFrame = new PhoneApplicationFrame();
替换为
RootFrame = new Microsoft.Phone.Controls.TransitionFrame();
第三步:为页面添加切换 首先添加XML name space:
xmlns:toolkit=”clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit”
然后就可以添加切换效果了:
示例 1:装载和退出的时候旋转页面
<toolkit:transitionservice .NavigationInTransition> <toolkit:navigationintransition> </toolkit:navigationintransition><toolkit:navigationintransition .Backward> <toolkit:rotatetransition></toolkit:rotatetransition> </toolkit:navigationintransition> <toolkit:navigationintransition .Forward> <toolkit:rotatetransition></toolkit:rotatetransition> </toolkit:navigationintransition> </toolkit:transitionservice> <toolkit:transitionservice .NavigationOutTransition> <toolkit:navigationouttransition> </toolkit:navigationouttransition><toolkit:navigationouttransition .Backward> <toolkit:rotatetransition></toolkit:rotatetransition> </toolkit:navigationouttransition> <toolkit:navigationouttransition .Forward> <toolkit:rotatetransition></toolkit:rotatetransition> </toolkit:navigationouttransition> </toolkit:transitionservice>
示例 2:装载和退出的时候垂直旋转(转门效果)
<toolkit:transitionservice .NavigationInTransition> <toolkit:navigationintransition> </toolkit:navigationintransition><toolkit:navigationintransition .Backward> <toolkit:turnstiletransition Mode="BackwardIn"></toolkit:turnstiletransition> </toolkit:navigationintransition> <toolkit:navigationintransition .Forward> <toolkit:turnstiletransition Mode="ForwardIn"></toolkit:turnstiletransition> </toolkit:navigationintransition> </toolkit:transitionservice> <toolkit:transitionservice .NavigationOutTransition> <toolkit:navigationouttransition> </toolkit:navigationouttransition><toolkit:navigationouttransition .Backward> <toolkit:turnstiletransition Mode="BackwardOut"></toolkit:turnstiletransition> </toolkit:navigationouttransition> <toolkit:navigationouttransition .Forward> <toolkit:turnstiletransition Mode="ForwardOut"></toolkit:turnstiletransition> </toolkit:navigationouttransition> </toolkit:transitionservice>
感谢分享!超级赞!
捧腹网是中国领先的笑话幽默分享网站,捧腹致力于打造一个分享各类欢乐内容的互动平台,让我们一起: “捧腹开怀、乐享人生”!屌丝的生活
年年有余[标签:标题]
万圣节搞笑短信祝你
捧腹网是中国领先的笑话幽默分享网站,捧腹致力于打造一个分享各类欢乐内容的互动平台,让我们一起: “捧腹开怀、乐享人生”!你出什么?