Skip to main content
A newer version of this page is available. .

BoundImageDashboardItem.SizeMode Property

Gets or sets how an image is positioned within an BoundImageDashboardItem.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v18.2.Core.dll

Declaration

[DefaultValue(ImageSizeMode.Clip)]
public ImageSizeMode SizeMode { get; set; }

Property Value

Type Default Description
ImageSizeMode **Clip**

An ImageSizeMode enumeration member that specifies how an image is positioned within an BoundImageDashboardItem.

Available values:

Name Description
Clip

The image is placed in the upper-left corner of the ImageDashboardItem. The image is clipped if it is larger than the ImageDashboardItem which contains it.

Stretch

The image within the ImageDashboardItem is stretched or shrunk as appropriate to fit the size of the ImageDashboardItem.

Zoom

The image is sized proportionally (without clipping), so that it best fits the ImageDashboardItem. If the ratio of height to width of the ImageDashboardItem is the same as the image’s ratio, it will be resized to exactly fit into the ImageDashboardItem. Otherwise, the closest fitting side (height or width) of the image will be sized to the dashboard item and the other side (height or width) of the image is sized proportionally (leaving empty space).

Squeeze

If the ImageDashboardItem‘s dimensions exceed that of the image it contains, the image is centered and shown full-size. Otherwise, the image is resized to fit into the ImageDashboardItem‘s dimensions.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SizeMode property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also