Cloud Training (Online)




Launching a Web Browser from Windows Phone 7 App

The WebBrowserTask allows an Windows Phone 7 App to launch the web browser .

This class is defined in Microsoft.Phone.Tasks namespace .

Using Microsoft.Phone.Tasks;

The WebBrowserTask includes a property “URL” that gets or sets the URL that should be navigated to when the web browser is launched.

private void button1_Click(object sender, RoutedEventArgs e)
{
      WebBrowserTask webbrowser = new WebBrowserTask();
      webbrowser.URL = "www.developerpublish.com";
      webbrowser.Show();
}

The webbrowser should be launched and the URL will be navigated to the specified URL when the Show method of the Web Browser is called .

 

 

Senthil Kumar B
Senthil Kumar is a former Microsoft MVP (Most Valuable Professional). He is a Co-Author of the book "Windows 10 Development Recipes using JavaScript and CSS" for Apress Publication. He is a technical presenter, blogger, mentor and a Geek.  Senthil is a regular speaker is various local user groups. He has presented at conferences like Great Indian Developer Summit (GIDS) & Microsoft DevCamps. You can reach out to him via his Twitter handle @isenthil.