Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.Windows.Browser in Windows Phone

I'm trying to open a webpage in a Silverlight App for Windows Phone 7.

Is there a way to open Internet Explorer?

like image 220
Tim van Dalen Avatar asked May 24 '26 21:05

Tim van Dalen


2 Answers

You'll need to use the WebBrowser Task to open a WebPage in Internet Explorer.
Add the following using statement:

using Microsoft.Phone.Tasks;

Then you can use the Task in a function such as below:

WebBrowserTask task = new WebBrowserTask();
task.URL = "http://www.stackoverflow.com";
task.Show();

Hope this helps!

like image 176
RoguePlanetoid Avatar answered May 27 '26 09:05

RoguePlanetoid


You can use the WebBrowser control in your app to open local HTML content or open a website. Here is an article that shows you how to load content into the WebBrowser control. if you need to style the content in the WebBrowser control, check this link and this.

like image 34
indyfromoz Avatar answered May 27 '26 09:05

indyfromoz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!