Skip to main content

PictureEditOptionsMask.CustomMask Property

Gets or sets a custom mask, applied to the target image in PictureEditMaskType.Custom mode.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v24.2.dll

Declaration

[DefaultValue(null)]
[SupportedMaskOption(SupportedMaskOptionKind.Custom)]
public Image CustomMask { get; set; }

Property Value

Type Default Description
Image null

A custom mask.

Property Paths

You can access this nested property as listed below:

Object Type Path to CustomMask
RepositoryItemPictureEdit
.OptionsMask .CustomMask

Remarks

A mask applied to an image specifies what regions of the image are visible to and hidden from end-users. To make a certain part of the target image visible to end-users, add transparent or semi-transparent regions to the mask.

The figure below shows an original image, a custom mask and the result of combining the image and the mask.

PictureEdit-CustomMask.png

By default, the mask is proportionally stretched to fit the image’s bounds. You can change the mask layout behavior and mask size with the PictureEditOptionsMask.MaskLayoutMode and PictureEditOptionsMask.Size settings. The PictureEditOptionsMask.Offset and PictureEditOptionsMask.Margin properties allow you to shift the mask relative to the image.

See Also