Cloud Training (Online)

Windows Phone 8.1 and Windows Runtime Apps How to #16 – Displaying External Web Page with in a Windows Phone 8.1 App

In Windows Phone 8 and earlier version , the developers could use the WebBrowser control or the WebBrowserTask to display external webpages within the app .

If you want to display an external webpage within your Windows Phone 8.1 Windows runtime app , you can use the WebView which provides the page a control which can host some HTML content.

How to display external web page with in a Windows Phone 8.1 App ?

1. Simply add the WebView control to the page from the toolbox or by adding the below tag . Provide a name to the WebView control . In this example , the control name is provided as “MobileOSGeekView”.

  <WebView x:Name="MobileOSGeekView">           

2. Use the Navigate method of the WebView object by providing the necessary Uri which you need to display in a WebView.

private void LaunchMobileOSGeekWebsite()
   Uri NavigateUrl = new Uri(@"");
   // Navigate to the MobileOSGeek website within the webview


3. When you call the above method , you will see the external webpage being loaded in to the WebView control of the page.


Senthil Kumar B
Senthil Kumar is a former Microsoft MVP (Most Valuable Professional). He is a Co-Author of the book "Windows 10 Development Recipes using JavaScript and CSS" for Apress Publication. He is a technical presenter, blogger, mentor and a Geek.  Senthil is a regular speaker is various local user groups. He has presented at conferences like Great Indian Developer Summit (GIDS) & Microsoft DevCamps. You can reach out to him via his Twitter handle @isenthil.