Windows Phone 8.1 - 页面导航 [英] Windows Phone 8.1 - Page Navigation
问题描述
来自Windows Phone 8
我从没想过会对Windows Phone 8.1
代码进行大量更改.基本上,我只是想知道如何进行页面导航,就像在 Windows Phone 8
上一样.为此,您应该添加:
NavigationService.Navigate(new Uri("/SecondPage.xaml", UriKind.Relative));
但该代码不适用于 Windows Phone 8.1
.
有人可以帮我解决这个问题吗?如果可能,请提供有关所有新 Windows Phone 8.1
方法的任何链接或文档.
在Windows Phone 8.1中,Page Navigation方法是这样的:
Frame.Navigate(typeof(SecondPage), param);
这意味着您将导航到SecondPage",并传递param"(基于对象的类).
如果你不需要传递任何参数,你可以使用这个:
Frame.Navigate(typeof(SecondPage));
您可以找到此 MSDN 链接的文档>
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屋!