从Metro风格应用启动Windows资源管理器 [英] Launch Windows Explorer from Metro style app

查看:79
本文介绍了从Metro风格应用启动Windows资源管理器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将文件下载到Windows Store应用程序中的DownloadsFolder.然后,我想在DownloadsFolder(实际上是我在DownloadsFolder中创建的文件夹)上打开一个Windows资源管理器.
但是我不知道该怎么做.

I would like to download a file to the DownloadsFolder in a Windows Store App. And then I'd like to bring up a Windows Explorer open on the DownloadsFolder (actually on the folder I create in the DownloadsFolder)
But I can't figure out how to do it.

此stackoverflow问题使用Metro-启动桌面应用程序,风格的应用建议使用Launcher.LaunchUriAsync.但是文档声称:

This stackoverflow question Launching a Desktop Application with a Metro-style app suggests using Launcher.LaunchUriAsync. But the documentation claims:

您不能使用此方法在本地区域中启动URI.例如,应用程序不能使用file:///协议访问本地计算机上的文件.相反,您必须使用Storage API来访问文件.

You cannot use this method to launch a URI in the local zone. For example, apps cannot use the file:/// protocol to access files on the local computer. Instead, you must use the Storage APIs to access files.

事实上,我试图使用"file:"协议打开资源管理器窗口.当我尝试这种机制时,Launcher.LaunchIUriAsync失败.

And indeed, I was trying to use the "file:" protocol to bring up the explorer window. When I did try this mechanism Launcher.LaunchIUriAsync fails.

如果浏览器可以做到这一点,我为什么不能呢? 有没有办法让我打开Windows资源管理器,或者这超出了实际可能性?

If the browser can do this, why can't I? Is there a way for me to bring up windows explorer, or is that outside the real of possibility?

推荐答案

我认为您无法从Metro启动Windows资源管理器.但是,您可以使用的一件事是文件选择器.

I don't think you can launch the Windows Explorer from metro. One thing you can use, however, is the File Picker.

http://code.msdn.microsoft.com/windowsapps/File-picker-app-extension-0cb95155

这篇关于从Metro风格应用启动Windows资源管理器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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