[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Margin

Margin Class

Represents the watermark margin in pixels relative to a cell.

Use this class to define the top, right, bottom, and left margins applied to a watermark in a range through Margin. You can create a margin with the same value on all sides or specify each side separately.

Inheritance
Margin
Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public class Margin
Public Class Margin
Examples
worksheet.Range["A1"].Value = "Draft";
Margin margin = new Margin(4, 8, 4, 8);
worksheet.Range["A1"].LabelOptions.Margin = margin;

Constructors

Name Description
Margin(int)

Creates a Margin instance that applies the same margin value to all four sides.

Use this constructor to define the watermark margin in pixels relative to a cell when the top, right, bottom, and left margins should be identical. The created margin can be applied through Margin.

Margin(int, int, int, int)

Creates a margin with individual top, right, bottom, and left values.

Represents the watermark margin in pixels relative to the cell, with each side specified independently.

Properties

Name Description
Bottom

Returns the bottom margin.

The returned value is the bottom watermark margin, in pixels, relative to the cell.

Left

Returns the left margin.

The returned value is the left watermark margin, in pixels, relative to the cell.

Right

Returns the right margin.

The returned value specifies the right watermark margin in pixels relative to the cell.

Top

Returns the top margin.

Returns the top margin value in pixels relative to the cell.