的Windows Phone 8.1 - 页面导航 [英] Windows Phone 8.1 - Page Navigation

查看:98
本文介绍了的Windows Phone 8.1 - 页面导航的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从即将的Windows Phone 8 我从来没有想过会有很多做给的Windows Phone 8.1 code。基本上,我只是想知道如何做页面导航,就像你会怎么做它<​​code>的Windows Phone 8 。要做到这一点,你应该加上:

  NavigationService.Navigate(新的URI(/ SecondPage.xaml,UriKind.Relative));

但code不为合作的Windows Phone 8.1

有人可以帮助我?如果可能的话提供所有新的的Windows Phone 8.1 方法的任何链接或文件。


解决方案

在的Windows Phone 8.1,页面导航的方法是这样的:

  Frame.Navigate(typeof运算(SecondPage),参数);

这意味着你将navagate为SecondPage,并通过参数(基于对象的类)。

如果您不需要传递任何参数,您可以使用此:

  Frame.Navigate(typeof运算(SecondPage));

您可以找到这个MSDN链接 p>

Coming from Windows Phone 8 I have never thought there will be a lot of changes done to the Windows Phone 8.1 code. Basically I'm just wondering how to do page navigation just like how you would do it on Windows Phone 8. To do that you should add:

NavigationService.Navigate(new Uri("/SecondPage.xaml", UriKind.Relative));

but that code doesn't work for Windows Phone 8.1.

Can someone please help me with this? If possible provide any links or documentation on all the new Windows Phone 8.1 methods.

解决方案

In Windows Phone 8.1, Page Navigation method is like this:

Frame.Navigate(typeof(SecondPage), param);

It means that you will navagate to 'SecondPage', and pass 'param' (a class based on object).

If you needn't to pass any parameters, You can use this:

Frame.Navigate(typeof(SecondPage));

You can find the documentation for this MSDN link

这篇关于的Windows Phone 8.1 - 页面导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆