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

This blog post will guide you through several effective methods to troubleshoot and resolve the issue of Microsoft Edge not...
Windows 11 offers a range of audio enhancements that can enrich your listening experience. These enhancements include features like virtual...
Windows 11 brings a fresh and visually stunning design to your desktop, and one of the standout features is the...