Back to Devexpress

ImageEditingField.ImageSizeMode Property

corelibraries-devexpress-dot-xtraprinting-dot-imageeditingfield-cc3b83b6.md

latest4.8 KB
Original Source

ImageEditingField.ImageSizeMode Property

The size mode of the associated image brick.

Namespace : DevExpress.XtraPrinting

Assembly : DevExpress.Printing.v25.2.Core.dll

NuGet Package : DevExpress.Printing.Core

Declaration

csharp
public ImageSizeMode ImageSizeMode { get; set; }
vb
Public Property ImageSizeMode As ImageSizeMode

Property Value

TypeDescription
ImageSizeMode

The image brick’s ImageBrick.SizeMode option value.

|

Available values:

NameDescription
Normal

The image is placed in the upper-left corner of the Picture Box. The image is clipped if it does not fit into the control’s bounds.

| | StretchImage |

The image is stretched or shrunk to fit into the current Picture Box dimensions.

| | AutoSize |

The Picture Box size is adjusted to that of the image it contains.

| | CenterImage |

This option is obsolete. To achieve the same result, set the XRPictureBox.Sizing property of a Picture Box to ImageSizeMode.Normal and the XRPictureBox.ImageAlignment property to ImageAlignment.MiddleCenter.

| | ZoomImage |

The image is sized proportionally (without clipping), so that it fits best within the Picture Box dimensions. If the height-to-width ratio of the control and the image are equal, the image will be resized to exactly fit into the control’s dimensions. Otherwise, the closest matching image side (height or width) will be sized to the control, and the other side will be sized proportionally (possibly leaving empty space within the control).

| | Squeeze |

If the Picture Box 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 control’s dimensions.

| | Tile |

The image is replicated within the Picture Box starting from the upper-left corner. The image is clipped if it does not fit into the control’s dimensions.

| | Cover |

The image is sized proportionally, so that it fits the Picture Box control’s entire area. If the height-to-width ratio of the control and the image are equal, the image is resized to exactly fit into the control’s dimensions. Otherwise, the least matching image side (height or width) is sized to the control, the other side is sized proportionally. The resulting image is centered as the control’s ImageAlignment property specifies. Image parts that do not fit the control are clipped.

|

Remarks

This property gets and sets the associated image brick’s ImageBrick.SizeMode property.

The PrintingSystemBase.EditingFieldChanged event occurs when changing the ImageSizeMode property.

See Also

Brick

ImageEditingField Class

ImageEditingField Members

DevExpress.XtraPrinting Namespace