这个问题说明了一切。 基本上,我只是想知道在WinRT中这样做的选择:
Process.Start("http://www.google.com/");
这个问题说明了一切。 基本上,我只是想知道在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
您可以使用Windows.System.Launcher
启动文件和URL的...
Windows.System.Launcher.LaunchUriAsync(Uri)
将推出一个给定的URI与默认应用程序。 如果它是一个链接它会与默认的Web浏览器中打开。 您可以使用file:///
方案到本地文件系统上打开一个网络资源,而不是资源。
Windows.System.Launcher.LaunchFileAsync(IStorageFile)
将推出针对给定文件的默认应用程序。
这两种方法都有类型的第二个可选参数Windows.System.LauncherOptions
用来定制推出。