Windows Phone 7:如何打开网络浏览器? [英] Windows Phone 7: How do I open the web browser?

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

问题描述

如何在 Windows Phone 7 中打开网络浏览器?我不在乎它是默认浏览器还是嵌入式浏览器,但如果两者都有可能,我想知道.

How do I open a web browser in Windows Phone 7? I don't care if it is the default browser or an embedded browser, though if both are possible I would like to know.

推荐答案

Windows Phone 论坛 > Windows Phone 7 > 打开网络浏览器

如果你想打开内置的IE浏览器,那么你需要使用WebBrowserTask 对象.

If you want to open the built-in IE Browser then you need to use WebBrowserTask object.

为此添加对 Microsoft.Phone 和Microsoft.Phone.Tasks.然后,您可以使用以下代码:

To do this add references to Microsoft.Phone and Microsoft.Phone.Tasks. You can then launch the IE Browser using the following code:

WebBrowserTask wbt = new WebBrowserTask(); 
wbt.URL = "http://www.google.com";  
wbt.Show();

如果您想在应用程序中嵌入浏览器窗口,请使用浏览器控件.将 WebBrowser 控件的实例添加到您的表单然后您可以使用您提供的名称在代码中引用它它.(默认名称为webBrowser1")

If you want to embed a browser window inside your application then use the WebBrowser control. Add an instance of the WebBrowser control to your form then you can reference it in code using the name you give it. (Default name is "webBrowser1")

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

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