New to Telerik Document ProcessingStart a free 30-day trial

Defines the page margins for printed worksheets, including content margins and header/footer offsets.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model.Printing

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

C#
public class PageMargins

Inheritance: objectPageMargins

Constructors

Initializes a new instance of the PageMargins class with all margins set to zero.

C#
public PageMargins()

Initializes a new instance of the PageMargins class with individual content and header/footer margins.

C#
public PageMargins(double left, double top, double right, double bottom, double header, double footer)
Parameters:leftdouble

The left margin.

topdouble

The top margin.

rightdouble

The right margin.

bottomdouble

The bottom margin.

headerdouble

The header margin.

footerdouble

The footer margin.

Initializes a new instance of the PageMargins class with individual content margins.

C#
public PageMargins(double left, double top, double right, double bottom)
Parameters:leftdouble

The left margin.

topdouble

The top margin.

rightdouble

The right margin.

bottomdouble

The bottom margin.

Initializes a new instance of the PageMargins class with symmetric content and header/footer margins.

C#
public PageMargins(double leftRight, double topBottom, double headerFooter)
Parameters:leftRightdouble

The left and right margins.

topBottomdouble

The top and bottom margins.

headerFooterdouble

The header and footer margins.

Initializes a new instance of the PageMargins class with symmetric horizontal and vertical margins.

C#
public PageMargins(double leftRight, double topBottom)
Parameters:leftRightdouble

The left and the right margin.

topBottomdouble

The top and the bottom margin.

Initializes a new instance of the PageMargins class with uniform margins on all sides.

C#
public PageMargins(double all)
Parameters:alldouble

All margins.

Fields

Provides narrow page margins (0.25" left/right, 0.75" top/bottom, 0.3" header/footer).

C#
public static readonly PageMargins NarrowMargins

Provides standard page margins (0.7" left/right, 0.75" top/bottom, 0.3" header/footer).

C#
public static readonly PageMargins NormalMargins

Provides wide page margins (1" left/right, 1" top/bottom, 0.5" header/footer).

C#
public static readonly PageMargins WideMargins

Methods

Determines whether the specified object is equal to the current object.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with the current object.

Returns:

bool

True if the specified object is equal to the current object; otherwise, false.

Overrides: object.Equals(object)

Serves as a hash function for a particular type.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current object.

Overrides: object.GetHashCode()

Properties

Gets the bottom margin in device-independent pixels (1/96 inch).

C#
public double Bottom { get; }
Property Value:

The bottom margin.

Gets the distance from the bottom edge of the page to the footer content, in device-independent pixels (1/96 inch).

C#
public double Footer { get; }
Property Value:

The footer margin.

Gets the distance from the top edge of the page to the header content, in device-independent pixels (1/96 inch).

C#
public double Header { get; }
Property Value:

The header margin.

Gets the left margin in device-independent pixels (1/96 inch).

C#
public double Left { get; }
Property Value:

The left margin.

Gets the right margin in device-independent pixels (1/96 inch).

C#
public double Right { get; }
Property Value:

The right margin.

Gets the top margin in device-independent pixels (1/96 inch).

C#
public double Top { get; }
Property Value:

The top margin.