从Metro风格应用启动Windows资源管理器

编程入门 行业动态 更新时间:2024-10-27 12:23:50
本文介绍了从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.

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

更多推荐

从Metro风格应用启动Windows资源管理器

本文发布于:2023-11-03 19:54:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1555942.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:资源管理器   风格   Metro   Windows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!