[英]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.