我想编写一个函数,它可以简单地最小化我的Windows 8沉浸式应用程序,并在资源管理器中打开一个文件 - 最好是如果该文件位于多个文件的文件夹中,则高亮显示该文件。
这段代码给我返回了一个权限错误。有什么想法吗?
public async void OpenFile( string filePath)
{
StorageFile File = await StorageFile.GetFileFromApplicationUriAsync
(new Uri(filePath, UriKind.RelativeOrAbsolute)); ;
if (File != null)
{
await Launcher.LaunchUriAsync(new Uri(File.Path));
}
}
这段代码给我返回了一个权限错误。有什么想法吗?