Class Borders
Defines the borders for a specific element.
Inheritance
Namespace: IronWord.Models
Assembly: IronWord.dll
Syntax
public class Borders : Object
The four edges of a box in a Word document, top, bottom, left, and right, are grouped on Borders. It bundles a BorderStyle for each side, so a developer outlining a paragraph or a table cell sets all four borders through one object instead of tracking them separately. Reach for it whenever a rectangle needs an outline, whether that is a full frame or a single ruled line.
Assign a BorderStyle to TopBorder, BottomBorder, LeftBorder, or RightBorder to style that edge; leave a side unset to leave it without a border. Each side is independent, so the same container can carry a heavy top rule and lighter sides, or only one ruled edge. Configure each BorderStyle first (its color, size, spacing, and line pattern), then attach the Borders group to the element it frames.
The add table how-to applies borders to table cells, and the add styled text how-to covers paragraph-level formatting around them.
Constructors
Borders()
Declaration
public Borders()
Properties
BottomBorder
Gets or sets the style of the bottom border.
Declaration
public BorderStyle BottomBorder { get; set; }
Property Value
| Type | Description |
|---|---|
| BorderStyle |
LeftBorder
Gets or sets the style of the left border.
Declaration
public BorderStyle LeftBorder { get; set; }
Property Value
| Type | Description |
|---|---|
| BorderStyle |
RightBorder
Gets or sets the style of the right border.
Declaration
public BorderStyle RightBorder { get; set; }
Property Value
| Type | Description |
|---|---|
| BorderStyle |
TopBorder
Gets or sets the style of the top border.
Declaration
public BorderStyle TopBorder { get; set; }
Property Value
| Type | Description |
|---|---|
| BorderStyle |