/// <summary> /// Shows the file picker so that the user can pick multiple files. /// </summary> /// <param name="settings">The settings for the file open picker.</param> /// <returns> /// When the call to this method completes successfully, it returns a /// <see cref="IReadOnlyList{StorageFile}" /> object that contains all the files that were /// picked by the user. Picked files in this array are represented by /// <see cref="StorageFile" /> objects. /// </returns> public IAsyncOperation <IReadOnlyList <StorageFile> > PickMultipleFilesAsync(FileOpenPickerSettings settings) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } Logger.Write($"Commit button text: {settings.CommitButtonText}"); var dialog = new FileOpenPickerWrapper(settings); return(dialog.PickMultipleFilesAsync()); }
private async void PickMultipleFiles() { var settings = new FileOpenPickerSettings { SuggestedStartLocation = PickerLocationId.DocumentsLibrary, FileTypeFilter = new List<string> { ".txt" } }; IReadOnlyList<StorageFile> storageFiles = await dialogService.PickMultipleFilesAsync(settings); if (storageFiles.Any()) { MultipleFilesPath = string.Join(";", storageFiles.Select(storageFile => storageFile.Path)); } }
private async void PickSingleFile() { var settings = new FileOpenPickerSettings { SuggestedStartLocation = PickerLocationId.DocumentsLibrary, FileTypeFilter = new List<string> { ".txt" } }; StorageFile storageFile = await dialogService.PickSingleFileAsync(settings); if (storageFile != null) { SingleFilePath = storageFile.Path; } }
private async void PickMultipleFiles() { var settings = new FileOpenPickerSettings { SuggestedStartLocation = PickerLocationId.DocumentsLibrary, FileTypeFilter = new List <string> { ".txt" } }; IReadOnlyList <StorageFile> storageFiles = await dialogService.PickMultipleFilesAsync(settings); if (storageFiles.Any()) { MultipleFilesPath = string.Join(";", storageFiles.Select(storageFile => storageFile.Path)); } }
private async void PickSingleFile() { var settings = new FileOpenPickerSettings { SuggestedStartLocation = PickerLocationId.DocumentsLibrary, FileTypeFilter = new List <string> { ".txt" } }; StorageFile storageFile = await dialogService.PickSingleFileAsync(settings); if (storageFile != null) { SingleFilePath = storageFile.Path; } }
public IAsyncOperation <StorageFile> PickSingleFileAsync(FileOpenPickerSettings settings) { throw new NotImplementedException(); }
public IAsyncOperation <IReadOnlyList <StorageFile> > PickMultipleFilesAsync(FileOpenPickerSettings settings) { throw new NotImplementedException(); }