Language

IMediaPicker.PickPhotosAsync(MediaPickerOptions) Method

Definition

Opens the media browser to select photos.

public System.Threading.Tasks.Task<System.Collections.Generic.List<Microsoft.Maui.Storage.FileResult>> PickPhotosAsync(Microsoft.Maui.Media.MediaPickerOptions? options = default);
abstract member PickPhotosAsync : Microsoft.Maui.Media.MediaPickerOptions -> System.Threading.Tasks.Task<System.Collections.Generic.List<Microsoft.Maui.Storage.FileResult>>
Public Function PickPhotosAsync (Optional options As MediaPickerOptions = Nothing) As Task(Of List(Of FileResult))

Parameters

options
MediaPickerOptions

Pick options to use.

Returns

A list of FileResult objects containing details of the picked photos. When the operation was cancelled by the user, this will return an empty list.

Remarks

On Android, not all picker user interfaces enforce the SelectionLimit.

On Windows, SelectionLimit is not supported.

Implement your own logic to ensure that the limit is maintained and/or notify the user on these platforms.

Applies to