[英]FileOpenPicker not working in C# on Windows 11 Desktop
I am creating a Windows Form App in VS on Windows11 and get this error when I attempt to run my file picker function: System.NotImplementedException: 'The member IAsyncOperation<IReadOnlyList> FileOpenPicker.PickMultipleFilesAsync() is not implemented in Uno.'我正在 Windows11 上的 VS 中创建一个 Windows 表单应用程序,当我尝试运行我的文件选择器 function 时出现此错误:System.NotImplementedException:'The member IAsyncOperation<IReadOnlyList> FileOpenPicker.PickMultipleFilesAsync() is not implemented in Uno.'
The Code:代码:
var picker = new FileOpenPicker();
picker.ViewMode = PickerViewMode.Thumbnail;
picker.SuggestedStartLocation = PickerLocationId.PicturesLibrary;
picker.FileTypeFilter.Add(".png");
var files = await picker.PickMultipleFilesAsync();
if(files!=null){//stuff n things}
Windows 11 has its own method for opening files. Windows 11 有自己的文件打开方法。 FilePicker will not work in the new App environtment. FilePicker 将无法在新的 App 环境中工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.