Skip to main content

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

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

NuGet Package: DevExpress.Win.Navigation

#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