Skip to main content

PictureEditOptionsMask.MaskLayoutMode Property

Gets or sets how a mask is aligned relative to the target image.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(PictureEditMaskLayoutMode.Default)]
[SupportedMaskOption(SupportedMaskOptionKind.NotNone)]
public PictureEditMaskLayoutMode MaskLayoutMode { get; set; }

Property Value

Type Default Description
PictureEditMaskLayoutMode Default

A value that specifies how a mask is aligned relative to the target image. The Default value is equivalent to ZoomInside.

Available values:

Show 12 items
Name Description
Default

The same as ZoomInside.

ZoomInside

A mask is stretched proportionally within the image’s boundaries.

Stretch

A mask is stretched to fit the image’s boundaries.

BottomCenter

A mask is aligned at the center of the bottom side of the image.

BottomLeft

A mask is aligned to the bottom left corner of the image.

BottomRight

A mask is aligned to the bottom right corner of the image.

MiddleCenter

A mask is aligned to the middle of the image.

MiddleLeft

A mask is aligned at the center of the left side of the image.

MiddleRight

A mask is aligned at the center of the right side of the image.

TopCenter

A mask is aligned at the center of the top side of the image.

TopLeft

A mask is aligned to the top left corner of the image.

TopRight

A mask is aligned to the top right corner of the image.

Property Paths

You can access this nested property as listed below:

Object Type Path to MaskLayoutMode
RepositoryItemPictureEdit
.OptionsMask .MaskLayoutMode

Remarks

A mask determines the part of the target image that is visible to end-users. By default, the mask is proportionally stretched to fit the image’s bounds. Using the MaskLayoutMode property, you can change how the mask is positioned relative to the image.

For masks of the Circle and RoundedRect types (see PictureEditOptionsMask.MaskType), setting the MaskLayoutMode property to BottomCenter, BottomLeft, BottomRight, MiddleCenter, MiddleLeft, MiddleRight, TopCenter, TopLeft or TopRight has no visual effect unless you modify the PictureEditOptionsMask.Size property.

The PictureEditOptionsMask.Offset and PictureEditOptionsMask.Margin properties allow you to shift the mask relative to the image.

See Also