PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

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

Stretch

0

The image is stretched to fit within the element.

Slice

1

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.

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.

Referenced by

  • ImageLabel/ScaleType
  • ImageButton/ScaleType