VegaRise.NET
Back to DOM

RectBorderClass

Definition

Namespace
DOM.Styles
Assembly
DOM.dll

Represents a rectangular border composed of per-edge border styles.

Remarks

groups four instances describing the visual appearance of the top, left, right and bottom edges of a rectangular area. Consumers (layout, rendering and serialization code) should consult each edge's to determine color, thickness, spacing and pattern when drawing borders around pages, paragraphs, shapes or other framed elements. RectBorder BorderStyle BorderStyle is the base for,, and, each of which adds page-, paragraph-, or table-specific behaviour. RectBorder PageBorders ParagraphBorders TableBorder

Examples

csharp
1// 1. Rectangle with identical edges
2var border = new RectBorder
3{
4 Top = new BorderStyle { BorderColor = Color.Black, BorderSize = 1, BorderValue = BorderValues.single },
5 Left = new BorderStyle { BorderColor = Color.Black, BorderSize = 1, BorderValue = BorderValues.single },
6 Right = new BorderStyle { BorderColor = Color.Black, BorderSize = 1, BorderValue = BorderValues.single },
7 Bottom = new BorderStyle { BorderColor = Color.Black, BorderSize = 1, BorderValue = BorderValues.single }
8};
9
csharp
1// 2. Different edges (thick top, dashed bottom)
2var border = new RectBorder
3{
4 Top = new BorderStyle { BorderColor = Color.DarkBlue, BorderSize = 3, BorderValue = BorderValues.double },
5 Bottom = new BorderStyle { BorderColor = Color.LightGray, BorderSize = 1, BorderValue = BorderValues.dash }
6};
7
csharp
1// 3. Left rule only
2var border = new RectBorder
3{
4 Left = new BorderStyle { BorderColor = Color.Gray, BorderSize = 2, BorderValue = BorderValues.single }
5};
6
csharp
1// 4. Decorative "wave" border for a certificate
2var border = new RectBorder
3{
4 Top = new BorderStyle { BorderColor = Color.Gold, BorderSize = 3, BorderValue = BorderValues.wave },
5 Bottom = new BorderStyle { BorderColor = Color.Gold, BorderSize = 3, BorderValue = BorderValues.wave },
6 Left = new BorderStyle { BorderColor = Color.Gold, BorderSize = 3, BorderValue = BorderValues.wave },
7 Right = new BorderStyle { BorderColor = Color.Gold, BorderSize = 3, BorderValue = BorderValues.wave }
8};
9

Properties

Gets or sets the border style applied to the bottom edge.

Gets or sets the border style applied to the left edge.

Gets or sets the border style applied to the right edge.

Gets or sets the border style applied to the top edge.

VegaRise.NET

Sign In

Welcome back. Please sign in to your account.

Forgot password?
or

Don't have an account? Create an account

By signing in, you agree to our Terms of Service and Privacy Policy.