Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Phone 7: How do I open the web browser?

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.

like image 254
Jonathan Allen Avatar asked Dec 07 '22 17:12

Jonathan Allen


1 Answers

Windows Phone Forums > Windows Phone 7 > Open web browser

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

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();

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")

like image 52
paulsm4 Avatar answered Apr 29 '23 03:04

paulsm4