Partager via


TableCellBorders Class

Table Cell Borders.When the object is serialized out as xml, its qualified name is a:tcBdr.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Drawing.TableCellBorders

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(LeftBorder))> _
<ChildElementInfoAttribute(GetType(RightBorder))> _
<ChildElementInfoAttribute(GetType(TopBorder))> _
<ChildElementInfoAttribute(GetType(BottomBorder))> _
<ChildElementInfoAttribute(GetType(InsideHorizontalBorder))> _
<ChildElementInfoAttribute(GetType(InsideVerticalBorder))> _
<ChildElementInfoAttribute(GetType(TopLeftToBottomRightBorder))> _
<ChildElementInfoAttribute(GetType(TopRightToBottomLeftBorder))> _
<ChildElementInfoAttribute(GetType(ExtensionList))> _
Public Class TableCellBorders _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As TableCellBorders
[ChildElementInfoAttribute(typeof(LeftBorder))]
[ChildElementInfoAttribute(typeof(RightBorder))]
[ChildElementInfoAttribute(typeof(TopBorder))]
[ChildElementInfoAttribute(typeof(BottomBorder))]
[ChildElementInfoAttribute(typeof(InsideHorizontalBorder))]
[ChildElementInfoAttribute(typeof(InsideVerticalBorder))]
[ChildElementInfoAttribute(typeof(TopLeftToBottomRightBorder))]
[ChildElementInfoAttribute(typeof(TopRightToBottomLeftBorder))]
[ChildElementInfoAttribute(typeof(ExtensionList))]
public class TableCellBorders : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • LeftBorder <a:left>

  • RightBorder <a:right>

  • TopBorder <a:top>

  • BottomBorder <a:bottom>

  • InsideHorizontalBorder <a:insideH>

  • InsideVerticalBorder <a:insideV>

  • TopLeftToBottomRightBorder <a:tl2br>

  • TopRightToBottomLeftBorder <a:tr2bl>

  • ExtensionList <a:extLst>

[ISO/IEC 29500-1 1st Edition]

20.1.4.2.28 tcBdr (Table Cell Borders)

This element defines the borders for the cells within a table.

[Example: Consider the following example of table cell borders being used within DrawingML:

<tcBdr>
<left>
<lnRef idx="1">
<schemeClr val="accent1"/>
</lnRef>
</left>
  <right>
<lnRef idx="1">
<schemeClr val="accent1"/>
</lnRef>
</right>
  <top>
<lnRef idx="1">
<schemeClr val="accent1"/>
</lnRef>
</top>
  <bottom>
<lnRef idx="2">
<schemeClr val="lt1"/>
</lnRef>
</bottom>
  <insideH>
<ln>
<noFill/>
</ln>
</insideH>
  <insideV>
<ln>
<noFill/>
</ln>
</insideV>
</tcBdr>

In this example, we define borders for the bottom, top, right, and left borders of the table cells. end example]

Parent Elements

tcStyle (§20.1.4.2.29)

Child Elements

Subclause

bottom (Bottom Border)

§20.1.4.2.6

extLst (Extension List)

§20.1.2.2.15

insideH (Inside Horizontal Border)

§20.1.4.2.14

insideV (Inside Vertical Border)

§20.1.4.2.15

left (Left Border)

§20.1.4.2.18

right (Right Border)

§20.1.4.2.22

tl2br (Top Left to Bottom Right Border)

§20.1.4.2.31

top (Top Border)

§20.1.4.2.32

tr2bl (Top Right to Bottom Left Border)

§20.1.4.2.33

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

© ISO/IEC29500: 2008.

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

TableCellBorders Members

DocumentFormat.OpenXml.Drawing Namespace