简体   繁体   English

没有Process类的情况下,如何在Windows 8文件浏览器中打开应用程序文件夹?

[英]How can I open the application folder in the Windows 8 file explorer without the Process class?

I have a Windows 8 application created in C# with XAML and in the settings charm for the application I have added a button. 我有一个使用XAML在C#中创建的Windows 8应用程序,并且在该应用程序的设置超级按钮中添加了一个按钮。

The purpose of this button is to open the application's folder in the Windows 8 file explorer. 此按钮的目的是在Windows 8文件浏览器中打开应用程序的文件夹。

In a normal C# app I would have used: 在普通的C#应用​​中,我会使用:

System.Diagnostics.Process.Start("path/to/folder");

However System.Diagnostics does not contain the Process object. 但是, System.Diagnostics不包含Process对象。

Can anyone recommend a workaround for this issue? 谁能推荐解决此问题的方法?

You can use 您可以使用

var success = await Windows.System.Launcher.LaunchFolderAsync(folder);

https://msdn.microsoft.com/en-us/library/windows/apps/dn889617.aspx https://msdn.microsoft.com/zh-CN/library/windows/apps/dn889617.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Windows 资源管理器中打开文件夹? - How can I open a folder in Windows Explorer? File.Delete 可以导致文件夹在 Windows Explorer 中打开吗? - Can File.Delete cause a folder to open in Windows Explorer? 如何将Windows资源管理器打开到用户指定的特定目录? - How can I open windows explorer to a certain directory specified by user? 如何使用带有用户名和密码的 Process.Start 方法在文件资源管理器上打开共享文件夹 - How to open a Shared Folder on the File Explorer using Process.Start Method with userName and Password 在Windows资源管理器中打开文件夹,然后选择仅第二次运行的文件 - Open a folder in Windows Explorer and select a file works second time only 如何在winform应用程序中打开Outlook中的.msg文件,而无需打开多个Outlook窗口 - how do i open .msg file in outlook from a winform application without opening multiple outlook windows 如何以编程方式使用Windows File Explorer执行搜索? - How can I programmatically use Windows File Explorer to perform a Search? 如何获取“文件资源管理器”打开的窗口的目录? - How can i get the directories of File Explorer opened windows? (如何)使用Windows文件资源管理器查找应用程序? - (How to) Use Windows file explorer to find an application? 打开Windows资源管理器进程,然后再次终止它 - Open a windows explorer process, and then terminate it again
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM