Mobile Image Picker

From Xojo Documentation

A Picture Picker provides a way for the user to choose an existing picture from the camera roll, photo library, or they can choose to take a new picture. This control does not have any user interface that displays on the layout so it appears in the Shelf when dragged to the layout.

iOS Picture Picker Library Icon

Below are commonly used events, properties and methods. Refer to MobileImagePicker in the Language Reference for the complete list.


Cancelled - Called when the user cancels picking a picture.

Selected - Called when the user selects a picture or takes a picture. The picture is provided as a parameter.


AllowEditing - Enables some basic editing controls in the Picture Picker.

Source - Specifies the where the user can choose the picture from using the Sources enum: Camera, CameraRoll, PhotoLibrary.


Show - Displays the Picture Picker. You have to provide the parent view.

Using the Mobile Image Picker


This code lets the user pick a picture from the photo library:

PicturePicker1.Source = MobileImagePicker.Sources.PhotoLibrary

This code in the Selected event handler displays the selected picture in an Image Viewer:

MyImageViewer.Image = pic

Example Projects

  • Examples/iOS/Controls/ImagePicker

See Also

MobileImagePicker class