在WinRT中的默认Web浏览器中打开一个URL [英] Open an URL in the Default Web Browser in WinRT

查看:119
本文介绍了在WinRT中的默认Web浏览器中打开一个URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题说明了一切。基本上,我只是想知道在WinRT中的替代方案是:

 的Process.Start(http://www.google.com/);
 

解决方案

在WinRT中,你可以使用 Windows.System.Launcher.LaunchUriAsync 启动与相关联的默认应用程序指定的URI。对于网络链接,默认的浏览器会被使用。

:Launcher.LaunchUriAsync(URI)| launchUriAsync(URI)方法

The question says it all. Basically, I just want to know the alternative for this in WinRT:

Process.Start("http://www.google.com/");

解决方案

In WinRT, you can use Windows.System.Launcher.LaunchUriAsync to launch the default app associated with the specified URI. For a web link, the default browser would be used.

MSDN: Launcher.LaunchUriAsync(Uri) | launchUriAsync(Uri) method

这篇关于在WinRT中的默认Web浏览器中打开一个URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆