Share via


FilePicker.PickMultipleAsync(PickOptions) Method

Definition

Opens the default file picker to allow the user to pick one or more files.

public static System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Maui.Storage.FileResult>> PickMultipleAsync (Microsoft.Maui.Storage.PickOptions? options = default);
static member PickMultipleAsync : Microsoft.Maui.Storage.PickOptions -> System.Threading.Tasks.Task<seq<Microsoft.Maui.Storage.FileResult>>
Public Shared Function PickMultipleAsync (Optional options As PickOptions = Nothing) As Task(Of IEnumerable(Of FileResult))

Parameters

options
PickOptions

File picker options to use; may be null for default options.

Returns

An IEnumerable of file picking result objects, or null if picking was cancelled by the user.

Remarks

File types can be specified in order to limit files that can be selected, using a PickOptions object. Note that this method may re-throw platform specific exceptions that occurred during file picking. When calling PickMultipleAsync(PickOptions) again while showing a file picker, the Task object that was returned from the first call is cancelled. Be sure to also handle the TaskCanceledException in this case.

Applies to