Sándor Rakonczai
Sándor Rakonczai

Reputation: 213

Execute a command in Windows Store app

I am developing a Windows Store app that has some URL-s. I just would like to reach is if I click on one of these, my app will switch to Internet Explorer.

Is there any way to do this?

Sándor

Upvotes: 0

Views: 259

Answers (1)

Manuel Schweigert
Manuel Schweigert

Reputation: 4974

// The URI to launch
var uriToLaunch = "http://www.bing.com";
// Create a Uri object from a URI string 
var uri = new Windows.Foundation.Uri(uriToLaunch);

Windows.System.Launcher.launchUriAsync(uri).then(
   function (success) {
       if (success) {
           // URI launched
       } else {
           // URI launch failed
       }
   });

does this do it?

Upvotes: 2

Related Questions