Windows Phone WebBrowser control is a great option for those applications that should host HTML content.
Using the WebBrowser control is so simple, you just have to instantiate one and start using it by just calling the Navigate method:
Clicking on links inside the WebBrowser control, navigate to pages inside the WebBrowser control, without closing the application and opening IE.
Sometimes it is preferable opening some links using IE itself, and the question is how?
In Windows Phone there is a special Launcher, for doing exactly that, and it called WebBrowserTask.
So you can create one, providing valid URL and then launch it.
Now the question is: How can I open some links inside the WebBrowser control and others inside IE?
In such case all you have to do is register the WebBrowser.Navigating event, which raises any time you browse to a URL or just clicking a Link. There you can check the arguments for the relevant URL and decide if you want to use the Launcher and cancel the Navigation, or continue on with the WebBrowser control.
Here is a code snippet of how to do that:
In the code snippet above, the WebBrowser control is initialized with an address to my profile details. Now clicking on any link that doesn’t include “blogs.microsoft.co.il/blogs/tomershamam” opened inside the WebBrowser control. Otherwise the IE is launched, displaying the relevant link.
Note: you should save application’s state before launching the WebBrowserTask in case that your application is Tombstoned, specifically in Pre-Mango edition.