Skip to main content

Image Item Settings in WinForms Dashboard

  • 3 minutes to read

This help topic describes Size Mode and Alignment settings that control how Image and Bound Image dashboard items are displayed. To access these settings, go to the Ribbon’s Design tab under the Image Tools/Bound Image Tools contextual tab set:

Static Image Item
Image_Alignment_Ribbon
Bound Image Item
Image_SizeMode_Ribbon

Image Alignment

To specify how the image is aligned within the dashboard item, under Image Tools, select the Design tab and choose the desired alignment thumbnail in the Alignment group. You can choose a combination of the following alignments:

Vertical:
Top, Middle, Bottom
Horizontal:
Left, Center, Right

A total of nine positions are available.

To do the same thing in code, specify the vertical and horizontal alignment separately. Use the ImageDashboardItem.HorizontalAlignment and ImageDashboardItem.VerticalAlignment properties to do this.

Image Size Mode

You can specify the image size mode that defines how the image fits within the dashboard item.

To do this, use the Size Mode group in the Design contextual tab.

The following table illustrates each size mode in two cases: when the image is smaller than the dashboard item, and vice versa.

Size Mode Image Smaller than Dashboard Item Image Larger than Dashboard Item Description
Clip Image_SizeMode_1_Clip Image_SizeMode_2_Clip The image is clipped if it is larger than the ImageDashboardItem.
Stretch Image_SizeMode_1_Stretch Image_SizeMode_2_Stretch The image within the ImageDashboardItem is stretched or shrunk to fit the size of the ImageDashboardItem.
Squeeze Image_SizeMode_1_Squeeze Image_SizeMode_2_Squeeze If the dimensions of the ImageDashboardItem exceed those of the image it contains, the image is shown full-size. Otherwise, the image is resized to fit the dimensions of the ImageDashboardItem.
Zoom Image_SizeMode_1_Zoom Image_SizeMode_2_Zoom The image is sized proportionally (without clipping), so that it best fits the ImageDashboardItem. If the aspect ratio of the ImageDashboardItem is the same as the aspect ratio of the image, it will be resized to fit into the ImageDashboardItem while maintaining its aspect ratio. Otherwise, the closest fitting side of the image (either the height or the width) will be sized to fit the dashboard item, and the remaining side (height or width) will be sized proportionally (leaving empty space).

To specify the size mode in code, use the ImageDashboardItem.SizeMode property.

Alternative Text (Alt Text)

Alt text (alternative text) gives equal access to information for all users. If the image adds meaning, it needs alt text.

You can set alt text to make images accessible to users who cannot see them, especially those using screen readers.

For more information, see the following help topic: Add Alternative Text for Image and Bound Image Items in WinForms.