Skip to main content
.NET 8.0+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ImageEditorAttribute.ImageSizeMode Property

Specifies how images persisted by the target byte array property must be resized in Image Property Editors.

Namespace: DevExpress.Persistent.Base

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

#Declaration

public ImageSizeMode ImageSizeMode { get; set; }

#Property Value

Type Description
ImageSizeMode

An ImageSizeMode enumeration value that specifies how images represented by the target Image property must be resized in Image Property Editors. The default value is specified by the ImageSizeMode property of the Application Model‘s BOModel | <Class> | OwnMembers | <Member> node, that represents the target Image property.

Available values:

Name Description
Normal

The Image Property Editor displays the StaticImage in the upper-left corner. The image is clipped if it is larger than the Property Editor’s region.

StretchImage

The StaticImage stretches or shrinks to fit the Image Property Editor.

AutoSize

The Image Property Editor’s control is sized to the size of the StaticImage.

CenterImage

The StaticImage is centered inside the Image Property Editor. The StaticImage is clipped if it does not fit into the Property Editor’s region.

Zoom

The StaticImage‘s size is scaled to fit the the Image Property Editor. The StaticImage’s aspect ratio is retained.

#Remarks

Currently, the ImageSizeMode.Zoom and ImageSizeMode.StretchImage modes are not supported in ASP.NET Web Forms applications.

See Also