Reputation: 246
We've built a Windows Phone app (built for 7.1 but works with 8.1) for one of our clients. In this app the user can fill in their username and password. When this is done, a webtask opens and the user is sent to their intranet environment. This is the code to open the WebBrowserTask:
WebBrowserTask webTask = new WebBrowserTask();
string url = string.Format("http://{0}{1}", ServerInterface.baseUrl, string.Format(ServerInterface.cookieAuthUrl, HttpUtility.UrlEncode(RootController.Username), HttpUtility.UrlEncode(RootController.Password)));
webTask.Uri = new Uri(url, UriKind.Absolute);
webTask.Show();
Is there a method or event which is triggered if an url in the browser is clicked? The point is: if the user clicks on a URL which links to a page outisde of the intranet, we would like to open a new page. This is probably also possible by using JavaScript, but I would like to handle this event in the app itself.
Thanks in advance for the answers.
Upvotes: 0
Views: 220
Reputation: 16361
Not possible with the WebBrowserTask
, only when you use an "internal" browser (a page in your app with a WebBrowser
component where you can tap into the Navigating/Navigated event)
Upvotes: 1