UserGuide

Mobile Image Viewer

From Xojo Documentation

(Redirected from UserGuide:iOS Image View)

Use an Image Viewer to display an Image that is added to the project, or any image that you create or load (from a file or even image data that was downloaded from the Internet).

Refer to MobileImageViewer in the Language Reference for the full list of events, properties and methods.

Properties

DisplayMode

Indicates how the image is displayed. Uses the DisplayModes enumeration to specify how the image should be scaled, stretched or aligned.

Image

The actual image that is displayed.

Usage

iOS Image View

An Image Viewer is a fast and easy way to display an image. You have control over how the image is scaled, stretched or aligned. An Image Viewer can only show a single image, so if you require more advanced display of images, us a Canvas.

Generally you'll probably set up the DisplayMode and image to display using the Inspector. In the Inspector, the Image property has a PopupMenu that displays all the images that are in the project. You can select any one to display. You can also choose to browse for an image on a drive and the image will be added to your project and selected here for display.

To add an image in code, just set the Image property yourself. This code in the Opening event handler for an Image Viewer displays an image:

Me.Image = MyCompanyLogo

See Also

MobileImageViewer, Picture classes; UserGuide:iOS User Interface Controls topic