Skip to main content

PrintingSystemBase.BeforeMarginsChange Event

Occurs when page margins are about to change.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.Printing.v23.1.Core.dll

NuGet Packages: DevExpress.Printing.Core, DevExpress.Win.Dashboard.Design


public event MarginsChangeEventHandler BeforeMarginsChange

Event Data

The BeforeMarginsChange event's data class is MarginsChangeEventArgs. The following properties provide information specific to this event:

Property Description
Side Gets changed page margins.
Value Gets or sets the changed margin size in hundredths of an inch.


When this event occurs, the MarginsChangeEventArgs.Value contains the changed margin size. You can change it back to an appropriate value if necessary.


The following example uses the PrintingSystemBase.BeforeMarginsChange event handler to change the margin size to the default value of 100, if the margins have been moved:

using DevExpress.XtraPrinting;
// ...

private void printingSystem1_BeforeMarginsChange(object sender, 
MarginsChangeEventArgs e) {

    if (e.Value != 100) e.Value = 100;

See Also