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.
1 Comment