Open Web browser using Web Browser Task in Windows Phone App

Some times we need to open external web site in our app. We can use WebBrowser Control to load web site. But we need to enable script by set IsScriptEnabled value to true, and also it takes app memory.

Web Browser Task to open browser (IE) app
Web Browser Task to open browser (IE) app

Think when your app is running in 256 RAM device. Please check with this below line.

“The way that memory is used/allocated is different on 256 MB phones when compared to 512 MB devices. Apps running on 256 MB phones will still have the same total amount of memory available (90 MB), but everything after the first 60 MB “Working set” will be paged. Therefore while it is permissible for apps to use up to 90 MB, apps that use less than 60 MB may perform better. Secondly, support for scheduled tasks with potentially unbounded memory consumption are not supported on 256 MB devices.” –

So, if you open Web browser from your app using Web browser task. That memory won’t count in your app. MSDN site they’re recommending this way only.

You can open web browser with few links of code:-

WebBrowserTask webBrowserTask = new WebBrowserTask();
webBrowserTask.Uri = new Uri("", UriKind.Absolute);
//webBrowserTask.URL = "";

This above code will automatically open Mobile IE app. Some this you can see in above image when button press it will open share our ideas website in IE app.

Enjoy while coding..!

Leave a Reply