PrintingSystemBase.BeforeMarginsChange Event
In This Article
Occurs when page margins are about to change.
Namespace: DevExpress.XtraPrinting
Assembly: DevExpress.Printing.v24.2.Core.dll
NuGet Package: DevExpress.Printing.Core
#Declaration
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. |
#Remarks
When this event occurs, the MarginsChangeEventArgs.Value contains the changed margin size. You can change it back to an appropriate value if necessary.
#Example
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