如何从Windows Phone应用程序打开Web浏览器 [英] how to open a web browser from an windows phone app

查看:84
本文介绍了如何从Windows Phone应用程序打开Web浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我是Windows Phone 7的新手,现在我要做的就是创建一个简单的应用程序。当用户单击以启动此应用程序时,将打开一个浏览器并显示来自特定地址的网页内容。

I am pretty new to Windows Phone 7, and now what I am trying to do is to create a simple app. When a user click to start this app, a browser will open and show the content of a webpage from a specific address.

我尝试使用webbrowser对象,但似乎没有运动饼干。所以我需要我的应用程序打开一个真正的网络浏览器(也许是IE手机)来完成这项工作。

I tried to use a webbrowser object, but it seems like that doesn't sport cookies. So I need my app to open a real web browser (maybe IE mobile) to do the job.

谢谢。

推荐答案

使用WebBrowserTask。以下是示例代码:

Use WebBrowserTask. Following is the sample code:

WebBrowserTask task = new WebBrowserTask();

task.URL = WebSiteAddress;
$
task.Show();

WebBrowserTask task = new WebBrowserTask();
task.URL = WebSiteAddress;
task.Show();

确保添加"使用Microsoft.Phone"。任务和QUOT;名称空间。

Make sure you add "using Microsoft.Phone.Tasks" namespace.

  Anand Kalyanam

 Anand Kalyanam


这篇关于如何从Windows Phone应用程序打开Web浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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