PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. To see our new and improved documentation, please click here. You can read more about the future of documentation here.
Collapse Sidebar

ScaleType

ScaleType

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

Example

Below is an example of different ScaleTypes applied to the same /ImageLabel or /ImageButton:
ScaleType Example


Enums

Name Value Description

Stretch

0

The image is stretched to fit within the element.

Slice

1

9-Slice scaling: slice the image into 9 regions and apply different scaling rules to each region. The slice boundaries are determined by /ImageLabel/SliceCenter or /ImageButton/SliceCenter. See UI 9 Slice Design for more information.

Tile

2

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).

Fit

3

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

Crop

4

The image is cropped to fit within the element.