Skip to main content

PictureEditOptionsMask.Margin Property

Gets or sets the outer margin of the mask.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation


public Padding Margin { get; set; }

Property Value

Type Description

The outer margin of the mask.

Property Paths

You can access this nested property as listed below:

Object Type Path to Margin
.OptionsMask .Margin


Using the Margin property you can shift or reduce the boundaries of the mask relative to the target image. Setting the Margin property to positive values squeezes the mask. Once the mask is squeezed, the new display rectangle of the target image is also squeezed. In this case, if the target image is stretched within the PictureEdit control (see RepositoryItemPictureEdit.SizeMode), you will notice that the masked image is zoomed in after the Margin property is set.

Consider the following examples, where the Margin property is set to the default and non-default value, respectively. The image is stretched within the PictureEdit control by setting the RepositoryItemPictureEdit.SizeMode property to Squeeze.

Margin=(0, 0, 0, 0):


Margin=(50, 50, 50, 50):


In the second image, the mask is reduced and thus, the target image is zoomed in, since image stretching is enabled.

To shift the mask relative to the target image, use the PictureEditOptionsMask.Offset property.

See Also