PrintingSystemBase.BeforeMarginsChange Event

Occurs when page margins are about to change.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.Printing.v19.2.Core.dll

Declaration

public event MarginsChangeEventHandler BeforeMarginsChange
Public Event BeforeMarginsChange As MarginsChangeEventHandler

Event Data

The BeforeMarginsChange event handler receives an argument of the MarginsChangeEventArgs type. 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.

Remarks

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

Examples

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