VegaRise.NET
Back to DOM

PageBordersClass

Definition

Namespace
DOM.Styles
Assembly
DOM.dll

Represents the border configuration applied to a page.

Remarks

extends with page-specific metadata that controls which borders are displayed, how the border is offset relative to the page or text area, and the stacking order of the border relative to other page-level content. Consumers should consult both the inherited rectangular border properties (color, width, space, style) and the page-specific values defined here when rendering or exporting page borders. PageBorders RectBorder Page borders are configured through on the document or on an individual section. PageBorders

Examples

csharp
1// 1. Simple uniform page border
2var border = new PageBorders
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 DisplayValues = PageBorderDisplayValues.allPages,
9 OffsetFrom = PageBorderOffsetValues.page,
10 ZOrder = PageBorderZOrderValues.back
11};
12
csharp
1// 2. First page only decorative border
2var border = new PageBorders
3{
4 Top = new BorderStyle { BorderColor = Color.Gold, BorderSize = 3, BorderValue = BorderValues.apples },
5 Bottom = new BorderStyle { BorderColor = Color.Gold, BorderSize = 3, BorderValue = BorderValues.apples },
6 DisplayValues = PageBorderDisplayValues.firstPage,
7 OffsetFrom = PageBorderOffsetValues.text,
8 ZOrder = PageBorderZOrderValues.front
9};
10
csharp
1// 3. Top and bottom only, offset from text area
2var border = new PageBorders
3{
4 Top = new BorderStyle { BorderColor = Color.DarkBlue, BorderSize = 2, BorderValue = BorderValues.double },
5 Bottom = new BorderStyle { BorderColor = Color.DarkBlue, BorderSize = 2, BorderValue = BorderValues.double },
6 DisplayValues = PageBorderDisplayValues.allPages,
7 OffsetFrom = PageBorderOffsetValues.text
8};
9
csharp
1// 4. Apply to page setup
2doc.PageSettings = new PageSetup
3{
4 PageSize = new PageSize(PaperSize.A4),
5 Orientation = PageOrientation.Portrait,
6 Margin = new Margin(1.0, 1.0, 1.0, 1.0, Units.inch),
7 PageBorders = new PageBorders
8 {
9 Top = new BorderStyle { BorderColor = Color.Black, BorderSize = 1, BorderValue = BorderValues.single },
10 DisplayValues = PageBorderDisplayValues.allPages
11 }
12};
13
csharp
1// 5. Draw the border on top of shapes and text
2border.ZOrder = PageBorderZOrderValues.front;
3

Properties

Gets or sets which border edges should be displayed for the page.

Gets or sets the reference used to compute the border offset.

Gets or sets the z-order of the page border relative to other page content.

VegaRiseVDocs.NET

Reset Password

Enter your email and we'll send you a link to reset your password.

Remember your password? Sign in