Skip to main content

XtraPageSettings Class

Provides functionality to print reports.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.XtraPrinting.v24.1.dll

NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.Printing

Declaration

public class XtraPageSettings :
    XtraPageSettingsBase

The following members return XtraPageSettings objects:

Remarks

The XtraPageSettingsBase.TopMargin, XtraPageSettingsBase.RightMargin, XtraPageSettingsBase.BottomMargin and XtraPageSettingsBase.LeftMargin properties determine the top, right, bottom and left report page margins accordingly.

The XtraPageSettingsBase.Landscape property determines report page orientation (landscape if true, portrait if false). The XtraPageSettingsBase.PaperKind property determines the Paper Kind. All these settings are grouped in the Page Setup dialog shown below.

Page Setup Dialog

For more information on paper kinds refer to MSDN.

Alternatively, you can change margins by clicking them within the report page and dragging to the right, left, top or bottom.

Example

This example demonstrates how to use the XtraPageSettings class.

using System.Drawing.Printing;
using DevExpress.XtraPrinting;
// ...

// Create an XtraPageSettings instance.
XtraPageSettings pageSettings = printingSystem1.PageSettings;

// Specify the paper kind and page orientation.
pageSettings.PaperKind = PaperKind.Letter;
pageSettings.Landscape = true;

// Specify margins.
pageSettings.LeftMargin = 20;
pageSettings.RightMargin = 20;
pageSettings.TopMargin = 20;
pageSettings.BottomMargin = 20;

Inheritance

See Also