Skip to main content

RepositoryItemImageEdit.SizeMode Property

Gets or sets a value specifying how the image is displayed within the image editor.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v23.1.dll

NuGet Package: DevExpress.Win.Navigation


public PictureSizeMode SizeMode { get; set; }

Property Value

Type Default Description
PictureSizeMode Clip

A PictureSizeMode enumeration value.

Available values:

Name Description

A picture is not stretched.


A picture is stretched in order to fit within the area of an editor (or editor’s dropdown window).


A picture is stretched proportionally. The picture fits within the area of an editor (or editor’s dropdown window) at least in one direction.


A picture is stretched horizontally. Its height remains unchanged.


A picture is stretched vertically. Its width remains unchanged.


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.


Use the SizeMode property to control how the image is displayed within the editor’s dropdown. It can be displayed as is, stretched to fit the dropdown window or stretched proportionally.

The effect of the size mode can depend upon the RepositoryItemImageEdit.PictureAlignment property setting.

Changing the SizeMode value at runtime raises the RepositoryItem.PropertiesChanged event.


Stretching an image (especially one in bitmap format) can reduce image quality. Metafiles (lists of graphical instructions for drawing images at run time) are better suited for stretching than bitmaps.

See Also