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

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

问题描述

我还是新的Windows Phone开发。所以现在我要开发的Windwos电话8.1。真的没有我知道什么是与页面导航的问题。我写了这样的

 私人无效hbGo_Click(对象发件人,RoutedEventArgs E)
{
这个代码.Frame.Navigate(typeof运算(SecondPage));
}



但它显示我的错误(此页面不包含定义框架,并没有扩展方法框架接受的第一个参数
即使我把像底部的代码也一样...

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


解决方案

导航依赖于一种项目的:



如果它的的Windows Phone 8.1的Silverlight ,然后你应该使用的 NavigationService.Navigate()方法




适用于:Windows Phone 8的和Windows Phone的Silverlight 8.1 |的Windows Phone OS 7.1




如果你的目标的 Windows Phone的运行时间,然后你应该使用的Frame.Navigate()方法




最低支持的手机的Windows Phone 8.1 [Windows运行时应用程式只有]



I'm still new with the Windows Phone development. So now I'm going to develop the Windwos Phone 8.1. I really no idea what's the problem with the page navigation. I wrote the code like this

private void hbGo_Click(object sender, RoutedEventArgs e)
{
    this.Frame.Navigate(typeof(SecondPage));
}

but it shows me the error (This page does not contain a definition for "Frame" and no extension method "Frame" accepting the first arguments) even i put like the code of bottom also the same...

Frame.Navigate(typeof(SecondPage));

解决方案

The Navigation depends on the kind of your project:

If it is Windows Phone 8.1 Silverlight then you should use NavigationService.Navigate() method:

Applies to: Windows Phone 8 and Windows Phone Silverlight 8.1 | Windows Phone OS 7.1

If you are targeting Windows Phone RunTime then you should use Frame.Navigate method():

Minimum supported phone Windows Phone 8.1 [Windows Runtime apps only]

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

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