TableCellMargin Class

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

Inheritance Hierarchy


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


<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
Dim instance As TableCellMargin
[ChildElementInfoAttribute(typeof(StartMargin), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(EndMargin), FileFormatVersions.Office2010)]
public class TableCellMargin : OpenXmlCompositeElement


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:



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

<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"/>

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 (§; tcPr (§; tcPr (§17.4.70); tcPr (§17.4.71)

Child Elements


bottom (Table Cell Bottom Margin Exception)


end (Table Cell Trailing Margin Exception)


start (Table Cell Leading Margin Exception)


top (Table Cell Top Margin Exception)


[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


TableCellMargin Members

DocumentFormat.OpenXml.Wordprocessing Namespace