Skip to main content
A newer version of this page is available. .

ReportSettingsBase.Margins Property

Gets or sets report page margins, measured in report units.

Namespace: DevExpress.XtraReports.UserDesigner

Assembly: DevExpress.XtraReports.v21.2.dll

NuGet Package: DevExpress.Reporting.Core

Declaration

public Margins Margins { get; set; }

Property Value

Type Description
Margins

Report page margins.

Remarks

The margins are measured in report units. Use the ReportUnit property to change the currently used report units.

The code sample below illustrates how to create an End-User Designer instance and set the Margins property default value for its reports.

using DevExpress.XtraReports.UI;
using DevExpress.XtraReports.UserDesigner;
// ...
XRDesignForm form = new XRDesignForm();
XRDesignMdiController reportDesigner = form.DesignMdiController;
reportDesigner.DefaultReportSettings.PaperKind = System.Drawing.Printing.PaperKind.Letter;
reportDesigner.DefaultReportSettings.Landscape = true;
reportDesigner.DefaultReportSettings.RollPaper = false;
reportDesigner.DefaultReportSettings.ReportUnit = ReportUnit.HundredthsOfAnInch;
reportDesigner.DefaultReportSettings.Margins = new System.Drawing.Printing.Margins(50, 50, 100, 100);
form.ShowDialog();
See Also