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 .

    1 Comment

  1. Dattaswarup S
    December 13, 2011
    Reply

    webbrowser.URL is obsolete , please use Uri

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this post, you will learn about sync provider notifications in Windows 11 and how to disable or enable it...
In this tutorial, let’s learn how to enable or disable the startup sound in Windows 11. By default, when Windows...
The CameraCaptureTask allows the Windows Phone 7 App to launch the Camera Application . This will be useful when the...