Skip to main content

TileItem.ImageScaleMode Property

Gets or sets the way a TileItem‘s glyph is stretched within the item.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

Declaration

[Browsable(false)]
[DefaultValue(TileItemImageScaleMode.Default)]
[DXCategory("Appearance")]
public TileItemImageScaleMode ImageScaleMode { get; set; }

Property Value

Type Default Description
TileItemImageScaleMode Default

A TileItemImageScaleMode enumerator value that specifies the way a TileItem‘s glyph is stretched within the item.

Available values:

Name Description
Default

Acts as the TileItemImageScaleMode.NoScale value.

NoScale

An image is displayed in its original size and arranged according to the TileItem.ImageAlignment property.

Stretch

A glyph is stretched in order to fit within the area of a tile item.

StretchVertical

A glyph is stretched vertically. Its width remains unchanged.

StretchHorizontal

A glyph is stretched horizontally. Its height remains unchanged.

ZoomInside

Zooms an image proportionally so that it’s displayed within the client area in its entirety.

ZoomOutside

Zooms an image proportionally, allowing its smaller side (width or height) to be displayed in its entirety. The image is centered, so the larger side (height or width) will not be displayed in its entirety.

Squeeze

An image is displayed as is if its actual size is smaller than the size of the container. If the image size is larger than the container’s size, the image is shrunk proportionally to fit the container’s bounds.

Remarks

The TileItem.Image property specifies an image used as a tile’s icon. The ImageScaleMode property value specifies the way an image is stretched inside its parent tile. The TileItem.ImageAlignment property sets the icon’s alignment mode.

Icon appearance settings, provided via the ImageScaleMode and TileItem.ImageAlignment properties, affect both static tiles and tiles with frame animation. They also override corresponding TileControl.ItemImageAlignment and TileControl.ItemImageScaleMode property values that affect the entire TileControl.

Since a tile item can have multiple icons provided via the TileItem.Elements collection, the ImageScaleMode property affects an image in the first collection item only. For this reason, we recommend using the TileItemElement.ImageScaleMode property rather than the ImageScaleMode property to be able to customize all tile elements.

See Also