We use cookies on this site to enhance your user experience

ScaleType

ScaleType

Determines how an image (of a /ImageLabel or /ImageButton) is scaled.

Example

Below is an example of the Stretch, Fit, and Crop ScaleTypes:
enter image description here

Enums

Name Value Description
Stretch0

The image is stretched to fit within the element.

Slice1

The part of the image contained within the /ImageLabel/SliceCenter or /ImageButton/SliceCenter maintains its aspect ratio within the element, while everything outside is stretched and used as borders.

Tile2

The image is is tiled to fit within the element. For example, if the element is twice the X dimension of the image, the image will appear twice (2 tiles).

Fit3

The image is scaled fit within the element X or Y dimension (whichever fits first).

Crop4

The image is cropped to fit within the element.