Compartilhar via


TableCellMargin Class

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

Inheritance Hierarchy

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

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(BottomMargin))> _
<ChildElementInfoAttribute(GetType(RightMargin))> _
<ChildElementInfoAttribute(GetType(StartMargin), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(EndMargin), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(LeftMargin))> _
<ChildElementInfoAttribute(GetType(TopMargin))> _
Public Class TableCellMargin _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As TableCellMargin
[ChildElementInfoAttribute(typeof(BottomMargin))]
[ChildElementInfoAttribute(typeof(RightMargin))]
[ChildElementInfoAttribute(typeof(StartMargin), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(EndMargin), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(LeftMargin))]
[ChildElementInfoAttribute(typeof(TopMargin))]
public class TableCellMargin : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • TopMargin <w:top>

  • LeftMargin <w:left>

  • StartMargin <w:start>

  • BottomMargin <w:bottom>

  • RightMargin <w:right>

  • EndMargin <w:end>

[ISO/IEC 29500-1 1st Edition]

17.4.69 tcMar (Single Table Cell Margins)

This element specifies a set of cell margins for a single table cell in the parent table.

This setting, if present, shall override the table cell margins from the table-level cell margins (§17.4.43).

[Example: Consider a table whose first cell is defined to have default cell margins of 0.5 inches for all sides rather then the table defaults, as follows:

R1C1

R2C1

This set of table cell margins is specified using the following WordprocessingML:

<w:tcPr>
<w:tcMar>
<w:top w:w="720" w:type="dxa"/>
<w:left w:w="720" w:type="dxa"/>
<w:bottom w:w="720" w:type="dxa"/>
<w:right w:w="720" w:type="dxa"/>
</w:tcMar>
…
</w:tcPr>

The tcMar element as a child of tcPr specifies the set of table cell margins used for the first table cell, in this case, 720 twentieths of a point on all sides. end example]

Parent Elements

tcPr (§17.7.6.8); tcPr (§17.7.6.9); tcPr (§17.4.70); tcPr (§17.4.71)

Child Elements

Subclause

bottom (Table Cell Bottom Margin Exception)

§17.4.2

end (Table Cell Trailing Margin Exception)

§17.4.10

start (Table Cell Leading Margin Exception)

§17.4.36

top (Table Cell Top Margin Exception)

§17.4.78

[Note: The W3C XML Schema definition of this element’s content model (CT_TcMar) is located in §A.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

TableCellMargin Members

DocumentFormat.OpenXml.Wordprocessing Namespace