PictureEditOptionsMask.Margin Property

Gets or sets the outer margin of the mask.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v20.1.dll

Declaration

[SupportedMaskOption(SupportedMaskOptionKind.NotNone)]
public Padding Margin { get; set; }
<SupportedMaskOption(SupportedMaskOptionKind.NotNone)>
Public Property Margin As Padding

Property Value

Type Description
Padding

The outer margin of the mask.

Property Paths

You can access this nested property as listed below:

Object Type Path to Margin
RepositoryItemPictureEdit
.OptionsMask.Margin

Remarks

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):

PictureEdit-Mask-Margin0.png

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

PictureEdit-Mask-Margin50.png

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