Class BorderStyle
Defines the properties of a border style.
Inheritance
Namespace: IronWord.Models
Assembly: IronWord.dll
Syntax
public class BorderStyle : Object
BorderStyle defines the appearance of a single border line in a Word document. It captures the color, thickness, spacing, and line pattern for one edge, so a developer drawing a box around a paragraph or styling a table cell describes how that line looks with this type. One BorderStyle covers a single side; the Borders container holds four of them to style a whole rectangle.
Set BorderColor with a Color to tint the line, BorderSize (a uint) for its thickness, and BorderSpace (a uint) for the gap between the border and the content it surrounds. BorderValue chooses the line pattern from the BorderValues enumeration, picking a solid, dashed, or other style. Assign a configured BorderStyle to one of the Borders sides (TopBorder, LeftBorder, and so on) to apply it. Because the sizes are unsigned, only non-negative values are valid.
The add table how-to shows borders applied to table structure, and the add styled text how-to covers the surrounding paragraph formatting.
Constructors
BorderStyle()
Declaration
public BorderStyle()
Properties
BorderColor
Gets or sets the color of the border.
Declaration
public Color BorderColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Color |
BorderSize
Gets or sets the border size in pixels.
Declaration
public uint BorderSize { get; set; }
Property Value
| Type | Description |
|---|---|
| System.UInt32 |
BorderSpace
Gets or sets the space between the border and the content in pixels.
Declaration
public uint BorderSpace { get; set; }
Property Value
| Type | Description |
|---|---|
| System.UInt32 |
BorderValue
Gets or sets the border value.
Declaration
public BorderValues BorderValue { get; set; }
Property Value
| Type | Description |
|---|---|
| BorderValues |