以下代码可用于UWP应用打开Win10资源管理器,并指定文件路径。
private async void OpenFilePath_Click(object sender, RoutedEventArgs e)
{
var t = new FolderLauncherOptions();
StorageFolder folder = ApplicationData.Current.LocalFolder;
await Launcher.LaunchFolderAsync(folder, t);
}
如要获得文件权限,还应使用FileOpenPicker或者FileSavePicker