Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/308.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Windows Phone 7.1/8.1:WebBrowser链接上的任务单击_C#_Windows Phone 7_Windows Phone 8 - Fatal编程技术网

C# Windows Phone 7.1/8.1:WebBrowser链接上的任务单击

C# Windows Phone 7.1/8.1:WebBrowser链接上的任务单击,c#,windows-phone-7,windows-phone-8,C#,Windows Phone 7,Windows Phone 8,我们已经为我们的一个客户构建了一个Windows Phone应用程序(为7.1构建,但与8.1兼容)。在这个应用程序中,用户可以填写他们的用户名和密码。完成此操作后,将打开一个webtask,并将用户发送到其intranet环境。以下是打开WebBrowserTask的代码: WebBrowserTask webTask = new WebBrowserTask(); string url = string.Format("http://{0}{1}", ServerInterface.base

我们已经为我们的一个客户构建了一个Windows Phone应用程序(为7.1构建,但与8.1兼容)。在这个应用程序中,用户可以填写他们的用户名和密码。完成此操作后,将打开一个webtask,并将用户发送到其intranet环境。以下是打开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();
是否存在在单击浏览器中的url时触发的方法或事件?要点是:如果用户单击链接到intranet外部页面的URL,我们希望打开一个新页面。这可能也可以通过使用JavaScript实现,但我希望在应用程序本身中处理此事件


提前感谢您的回答。

只有在您使用“内部”浏览器(应用程序中带有
WebBrowser
组件的页面,您可以点击导航/导航事件)时,才能使用
WebBrowser任务。

谢谢您的回答。我打赌这是一条路。有可能有一个带有WebBrowser组件的地址栏吗?只有你自己做了