我需要一个没有任何 FileTypeFilter 的 FileOpenPicker !!当我不添加任何 FileTypeFilter 时,它会给出如下异常:“FileTypeFilters 属性必须至少指定一个文件类型过滤器。” 但我需要在 FileOpenPicker 中查看所有类型的文件!
FileOpenPicker fileOpenPicker = new FileOpenPicker();
fileOpenPicker.ViewMode = PickerViewMode.Thumbnail;
//fileOpenPicker.FileTypeFilter.Add(".txt"); I dot not need any filter !!
fileOpenPicker.CommitButtonText = "Select Files";
fileOpenPicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary;
IReadOnlyList<StorageFile> files =await fileOpenPicker.PickMultipleFilesAsync();
List<string> fileList = new List<string>();
StringBuilder sb = new StringBuilder();
foreach (StorageFile file in files)
{
fileList.Add(file.Name);
sb.AppendLine(file.Name);
}
谁能帮我吗?