VegaRise.NET
Back to DOM

BorderStyleClass

Definition

Namespace
DOM.Styles
Assembly
DOM.dll

Describes the visual style of a rectangular border (color, thickness, spacing and style).

Remarks

is a simple container for border-related styling used by paragraphs, tables, shapes and other elements that support an outer or inner border. It derives from and implements . BorderStyle BaseStyle IBorderStyle A single describes one edge of a border. For multi-edge borders see,, and, which compose four instances (top, left, right, bottom) and, for tables, the inside horizontal and vertical separators. BorderStyle RectBorder ParagraphBorders TableBorder BorderStyle

Examples

csharp
1// 1. Simple solid black border, 1pt thickness
2var border = new BorderStyle
3{
4 BorderColor = Color.Black,
5 BorderSize = 1.0, // 1pt (implicit double to DocumentUnit)
6 BorderSpace = 0,
7 BorderValue = BorderValues.single
8};
9
csharp
1// 2. Double red border with padding
2var border = new BorderStyle
3{
4 BorderColor = Color.Red,
5 BorderSize = new DocumentUnit(2.5, Units.pt),
6 BorderSpace = new DocumentUnit(4, Units.pt),
7 BorderValue = BorderValues.Double
8};
9
csharp
1// 3. Dotted border for a subtle table cell separator
2var border = new BorderStyle
3{
4 BorderColor = Color.Gray,
5 BorderSize = new DocumentUnit(0.75, Units.pt),
6 BorderValue = BorderValues.dotted
7};
8
csharp
1// 4. Decorative "wave" border for a certificate or invitation
2var border = new BorderStyle
3{
4 BorderColor = Color.Gold,
5 BorderSize = new DocumentUnit(3, Units.pt),
6 BorderSpace = new DocumentUnit(12, Units.pt),
7 BorderValue = BorderValues.wave
8};
9
csharp
1// 5. Table cell with a customized border applied to its TableCellStyle
2var cell = new TableCell
3{
4 Style = new TableCellStyle
5 {
6 Borders = new TableBorder
7 {
8 Top = new BorderStyle { BorderColor = Color.DarkBlue, BorderSize = 2, BorderValue = BorderValues.single },
9 Left = new BorderStyle { BorderColor = Color.Gray, BorderSize = 1, BorderValue = BorderValues.dotted }
10 }
11 }
12};
13

Properties

BorderColorColor

Gets or sets the color used to draw the border.

BorderSizeDocumentUnit

Gets or sets the thickness of the border.

BorderSpaceDocumentUnit

Gets or sets the spacing between the border and the element's content.

BorderValueBorderValues

Gets or sets the border rendering style (solid, dashed, dotted, etc.).

includes both simple line styles (single, double, dashed, dotted) and decorative patterns (wave, apples, stars) for page borders. BorderValues

VegaRiseVDocs.NET

Create Account

Create your VDocs account.

or

Already have an account? Sign in