Search code examples
.netwindows-phonewindows-phone-8.1

WebBrowserTask for Windows Phone 8.1


I may sound like a noob, but this problem is really not getting out of my mind, you should try it too.

whenever i add Microsoft.Phone.dll to a new project of Windows Phone 8.1 for the WebBrowserTask control, i get the following error.

And i have really no idea how to solve this.

http://2.bp.blogspot.com/-esfQ3c5cZ80/U2KBD5JRDyI/AAAAAAAAAiQ/HyorukOc_a4/s1600/Screenshot+(6).png

In previous versions (Windows Phone 8) it is fully functioning, but as we all know there are many changes in the WP8.1 SDK, therefore, i am not able to fix this issue.


Solution

  • If you use Windows store apps project (WP8.1/Win8.1), WebBrowserTask class was replaced by Launcher class.

    Now you must use LaunchUriAsync method from Launcher class

    Some useful resources :

    What's New in Windows Phone 8.1

    Migrating your Windows Phone 8 app to a Windows Runtime XAML app