How to navigate to an External URI using WebBrowserTask in Windows Phone 8?

The Windows Phone 8 SDK provides the WebBrowserTask launcher which allows the user to navigate to the external URI using the web browser.

How to navigate to an External URI using WebBrowserTask in Windows Phone 8?

To navigate to an external URL using WebBrowserTask, just create an instance of the WebBrowserTask and set the Uri property to the external link that should be displayed and call the show method.

You are done. The link will be opened in the Web Browser of your Windows Phone.

XAML

<Button Content="Open DeveloperPublish.COM" HorizontalAlignment="Left" Height="127" Margin="72,66,0,0" VerticalAlignment="Top" Width="297" Click="Button_Click_1"/>

C#

private void Button_Click_1(object sender, RoutedEventArgs e)

{

WebBrowserTask browser = new WebBrowserTask();

browser.Uri = new Uri("http://www.DeveloperPublish.com");

browser.Show();

}

Note that the application is deactivated when the user views the page using the WebBrowserTask which will cause the WP8 to launch the browser.

How to navigate to an External URI using WebBrowserTask in Windows Phone 8?

How to navigate to an External URI using WebBrowserTask in Windows Phone 8?

How to navigate to an External URI using WebBrowserTask in Windows Phone 8?

    1 Comment

Leave A Reply

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

You May Also Like

In this post, you’ll learn about the Win32 Error “0x000019E5 – ERROR_COULD_NOT_RESIZE_LOG” that you get when debugging system erors in...
In this post, you’ll learn about the error “CO_E_DBERROR 0x8004E02B” that is returned when working with COM based APIs or...
In this post, you’ll learn about the Win32 Error “0x000019D0 – ERROR_LOG_BLOCK_VERSION” that you get when debugging system erors in...