ParagraphBorders Class

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

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Wordprocessing.ParagraphBorders

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

Syntax

声明
<ChildElementInfoAttribute(GetType(TopBorder))> _
<ChildElementInfoAttribute(GetType(BottomBorder))> _
<ChildElementInfoAttribute(GetType(RightBorder))> _
<ChildElementInfoAttribute(GetType(BetweenBorder))> _
<ChildElementInfoAttribute(GetType(BarBorder))> _
<ChildElementInfoAttribute(GetType(LeftBorder))> _
Public Class ParagraphBorders _
    Inherits OpenXmlCompositeElement
用法
Dim instance As ParagraphBorders
[ChildElementInfoAttribute(typeof(TopBorder))]
[ChildElementInfoAttribute(typeof(BottomBorder))]
[ChildElementInfoAttribute(typeof(RightBorder))]
[ChildElementInfoAttribute(typeof(BetweenBorder))]
[ChildElementInfoAttribute(typeof(BarBorder))]
[ChildElementInfoAttribute(typeof(LeftBorder))]
public class ParagraphBorders : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • TopBorder <w:top>

  • LeftBorder <w:left>

  • BottomBorder <w:bottom>

  • RightBorder <w:right>

  • BetweenBorder <w:between>

  • BarBorder <w:bar>

[ISO/IEC 29500-1 第 1 个版本]

17.3.1.24 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. 以上摘要已经由 Microsoft(和/或其代理公司)从英语翻译为简体中文,ISO 对此翻译不承担任何责任。

Thread Safety

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

See Also

Reference

ParagraphBorders Members

DocumentFormat.OpenXml.Wordprocessing Namespace