Share via


FilePicker.PickAsync(PickOptions) Method

Definition

Starts file picker for selecting a single file.

public static System.Threading.Tasks.Task<Xamarin.Essentials.FileResult> PickAsync (Xamarin.Essentials.PickOptions options = null);

Parameters

options
PickOptions

File picker options to use; may be null

Returns

System.Threading.Tasks.Task<FileResult>

File picking result object, or null when 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 occured during file picking. When calling PickAsync() 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