Back to Devexpress

PictureEditOptionsMask.Margin Property

windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-pictureeditoptionsmask-90a6ed16.md

latest3.3 KB
Original Source

PictureEditOptionsMask.Margin Property

Gets or sets the outer margin of the mask.

Namespace : DevExpress.XtraEditors.Controls

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

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

Property Value

TypeDescription
Padding

The outer margin of the mask.

|

Property Paths

You can access this nested property as listed below:

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

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

MaskLayoutMode

Offset

SizeMode

PictureEditOptionsMask Class

PictureEditOptionsMask Members

DevExpress.XtraEditors.Controls Namespace