O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Navigating to a Web Page Using the WebBrowserTask

The web browser task is used to launch the built-in Web Browser app and optionally navigates the browser to a specified URL:

Uri uri = new Uri("http://msdn.microsoft.com", UriKind.RelativeOrAbsolute);WebBrowserTask task = new WebBrowserTask { Uri = uri };task.Show();

If the Uri results in a 404 HTTP standard response code (Not Found), no exception is raised; instead the Windows Phone Search application is launched.

Sample Overview

Example code for the WebBrowserTask can be found in the LaunchWebBrowserViewModel in the downloadable sample code.

The LaunchWebBrowserView page contains a TextBox in which the user can enter a URL and a Launch Web Browser Button (see ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required