Export (0) Print
Expand All

ParagraphBorders class

Defines the ParagraphBorders Class. When the object is serialized out as xml, its qualified name is w:pBdr.

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

[ChildElementInfoAttribute(typeof(RightBorder))]
[ChildElementInfoAttribute(typeof(TopBorder))]
[ChildElementInfoAttribute(typeof(LeftBorder))]
[ChildElementInfoAttribute(typeof(BottomBorder))]
[ChildElementInfoAttribute(typeof(BetweenBorder))]
[ChildElementInfoAttribute(typeof(BarBorder))]
public class ParagraphBorders : OpenXmlCompositeElement

[ISO/IEC 29500-1 1st Edition]

pBdr (Paragraph Borders)

This element specifies the borders for the parent paragraph. Each child element shall specify a specific kind of border (left, right, bottom, top, and between).

If this element is omitted on a given paragraph, its value is determined by the setting previously set at any level of the style hierarchy (i.e. that previous setting remains unchanged). If this setting is never specified in the style hierarchy, then no paragraph borders shall be applied.

[Example: Consider a pairing of paragraphs which have a three point red border around them, and a six point border between them. These paragraphs would each have the following set of paragraph borders:

<w:pBdr>
  <w:top w:val="single" w:sz="24" w:space="1" w:color="FF0000" /> 
  <w:left w:val="single" w:sz="24" w:space="4" w:color="FF0000" /> 
  <w:bottom w:val="single" w:sz="24" w:space="1" w:color="FF0000" /> 
  <w:right w:val="single" w:sz="24" w:space="4" w:color="FF0000" /> 
  <w:between w:val="single" w:sz="48" w:space="1" w:color="4D5D2C" /> 
</w:pBdr>

The resulting paragraphs have identical pBdr values, therefore they would use the top, left, bottom, and right borders around them as a units, and the between border between each other. This matching heuristic is further discussed in the child elements of the pBdr element. end example]

Parent Elements

pPr (§17.3.1.26); pPr (§17.3.1.25); pPr (§17.7.5.2); pPr (§17.7.6.1); pPr (§17.9.23); pPr (§17.7.8.2)

Child Elements

Subclause

bar (Paragraph Border Between Facing Pages)

§17.3.1.4

between (Paragraph Border Between Identical Paragraphs)

§17.3.1.5

bottom (Paragraph Border Below Identical Paragraphs)

§17.3.1.7

left (Left Paragraph Border)

§17.3.1.17

right (Right Paragraph Border)

§17.3.1.28

top (Paragraph Border Above Identical Paragraphs)

§17.3.1.42

[Note: The W3C XML Schema definition of this element’s content model (CT_PBdr) is located in §A.1. end note]

© ISO/IEC29500: 2008.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

Show:
© 2014 Microsoft