Partager via


TableRowProperties Class

Table Row Properties.When the object is serialized out as xml, its qualified name is w:trPr.

Inheritance Hierarchy

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

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(Deleted))> _
<ChildElementInfoAttribute(GetType(TableRowHeight))> _
<ChildElementInfoAttribute(GetType(Hidden))> _
<ChildElementInfoAttribute(GetType(ConditionalFormatStyle))> _
<ChildElementInfoAttribute(GetType(DivId))> _
<ChildElementInfoAttribute(GetType(GridBefore))> _
<ChildElementInfoAttribute(GetType(GridAfter))> _
<ChildElementInfoAttribute(GetType(WidthBeforeTableRow))> _
<ChildElementInfoAttribute(GetType(WidthAfterTableRow))> _
<ChildElementInfoAttribute(GetType(CantSplit))> _
<ChildElementInfoAttribute(GetType(TableHeader))> _
<ChildElementInfoAttribute(GetType(TableCellSpacing))> _
<ChildElementInfoAttribute(GetType(TableJustification))> _
<ChildElementInfoAttribute(GetType(Inserted))> _
<ChildElementInfoAttribute(GetType(TableRowPropertiesChange))> _
<ChildElementInfoAttribute(GetType(ConflictInsertion), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(ConflictDeletion), FileFormatVersions.Office2010)> _
Public Class TableRowProperties _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As TableRowProperties
[ChildElementInfoAttribute(typeof(Deleted))]
[ChildElementInfoAttribute(typeof(TableRowHeight))]
[ChildElementInfoAttribute(typeof(Hidden))]
[ChildElementInfoAttribute(typeof(ConditionalFormatStyle))]
[ChildElementInfoAttribute(typeof(DivId))]
[ChildElementInfoAttribute(typeof(GridBefore))]
[ChildElementInfoAttribute(typeof(GridAfter))]
[ChildElementInfoAttribute(typeof(WidthBeforeTableRow))]
[ChildElementInfoAttribute(typeof(WidthAfterTableRow))]
[ChildElementInfoAttribute(typeof(CantSplit))]
[ChildElementInfoAttribute(typeof(TableHeader))]
[ChildElementInfoAttribute(typeof(TableCellSpacing))]
[ChildElementInfoAttribute(typeof(TableJustification))]
[ChildElementInfoAttribute(typeof(Inserted))]
[ChildElementInfoAttribute(typeof(TableRowPropertiesChange))]
[ChildElementInfoAttribute(typeof(ConflictInsertion), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(ConflictDeletion), FileFormatVersions.Office2010)]
public class TableRowProperties : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • ConditionalFormatStyle <w:cnfStyle>

  • DivId <w:divId>

  • GridBefore <w:gridBefore>

  • GridAfter <w:gridAfter>

  • WidthBeforeTableRow <w:wBefore>

  • WidthAfterTableRow <w:wAfter>

  • TableRowHeight <w:trHeight>

  • Hidden <w:hidden>

  • CantSplit <w:cantSplit>

  • TableHeader <w:tblHeader>

  • TableCellSpacing <w:tblCellSpacing>

  • TableJustification <w:jc>

  • Inserted <w:ins>

  • Deleted <w:del>

  • TableRowPropertiesChange <w:trPrChange>

  • DocumentFormat.OpenXml.Office2010.Word.ConflictInsertion <w14:conflictIns>

  • DocumentFormat.OpenXml.Office2010.Word.ConflictDeletion <w14:conflictDel>

[ISO/IEC 29500-1 1st Edition]

17.4.82 trPr (Table Row Properties)

This element specifies the set of row-level properties applied to the current table row. Each unique property is specified by a child element of this element. These properties affect the appearance of all cells in the current row within the parent table, but can be overridden by individual cell-level properties, as defined by each property.

[Example: Consider the following WordprocessingML table:

Some text in R1C1.

The first row must have a table-row level property which specifies that it shall be restricted to 0.1 inches high (144 twentieths of a point) regardless of its contents, that would be specified using the trHeight element as follows:

<w:trPr>
<w:trHeight w:val="144" w:hRule="exact"/>
  …
</w:trPr>

The trPr element specifies the set of table row properties applied to the current table row in the document, in this case a row height requirement using the trHeight element (§17.4.81). end example]

Parent Elements

tr (§17.4.79)

Child Elements

Subclause

cantSplit (Table Row Cannot Break Across Pages)

§17.4.6

cnfStyle (Table Row Conditional Formatting)

§17.4.7

del (Deleted Table Row)

§17.13.5.12

divId (Associated HTML div ID)

§17.4.9

gridAfter (Grid Columns After Last Cell)

§17.4.14

gridBefore (Grid Columns Before First Cell)

§17.4.15

hidden (Hidden Table Row Marker)

§17.4.20

ins (Inserted Table Row)

§17.13.5.17

jc (Table Row Alignment)

§17.4.28

tblCellSpacing (Table Row Cell Spacing)

§17.4.44

tblHeader (Repeat Table Row on Every New Page)

§17.4.50

trHeight (Table Row Height)

§17.4.81

trPrChange (Revision Information for Table Row Properties)

§17.13.5.37

wAfter (Preferred Width After Table Row)

§17.4.86

wBefore (Preferred Width Before Table Row)

§17.4.87

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

[ISO/IEC 29500-1 1st Edition]

17.7.4.10 trPr (Table Style Conditional Formatting Table Row Properties)

This element specifies the set of table row properties which shall be applied to all rows within a table which match the conditional formatting type specified on the parent tblStylePr element. These properties are applied in the order specified via the style hierarchy.

[Example: Consider a table style which contains conditional formatting for its firstRow, defined as follows:

<w:style w:type="table" w:styleId="exampleTableStyle">
…
<w:tblStylePr w:type="firstRow">
<w:trPr>
<w:tblHeader/>
<w:cantSplit/>
</w:trPr>
…
</w:tblStylePr>
</w:style>

The trPr element specified within the tblStylePr element specifies the set of table row properties which must be applied to all rows of the table which meet the criteria specified by the type value of firstRow - all of the header rows of the table. In this example, the table row properties applied are the fact that these rows must be repeated on each page via the tblHeader element (§17.4.50) and the fact that these rows must not be split across pages using the cantSplit element (§17.4.6). end example]

Parent Elements

tblStylePr (§17.7.6.6)

Child Elements

Subclause

cantSplit (Table Row Cannot Break Across Pages)

§17.4.6

cnfStyle (Table Row Conditional Formatting)

§17.4.7

del (Deleted Table Row)

§17.13.5.12

divId (Associated HTML div ID)

§17.4.9

gridAfter (Grid Columns After Last Cell)

§17.4.14

gridBefore (Grid Columns Before First Cell)

§17.4.15

hidden (Hidden Table Row Marker)

§17.4.20

ins (Inserted Table Row)

§17.13.5.17

jc (Table Row Alignment)

§17.4.28

tblCellSpacing (Table Row Cell Spacing)

§17.4.44

tblHeader (Repeat Table Row on Every New Page)

§17.4.50

trHeight (Table Row Height)

§17.4.81

trPrChange (Revision Information for Table Row Properties)

§17.13.5.37

wAfter (Preferred Width After Table Row)

§17.4.86

wBefore (Preferred Width Before Table Row)

§17.4.87

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

[ISO/IEC 29500-1 1st Edition]

17.7.4.11 trPr (Style Table Row Properties)

This element specifies the set of table row properties which shall be applied to the table. These properties are not conditional and shall always be applied (although they are applied before all conditional formatting properties).

[Example: Consider a table style defined as follows:

<w:style w:type="table" w:styleId="exampleTableStyle">
<w:trPr>
<w:jc w:val="center"/>
</w:trPr>
</w:style>

The trPr element specified within the style element specifies the set of table row properties which must be applied to all parts of the table. In this example, the single table row property applied is the alignment setting of center via the jc element (§17.4.28). end example]

Parent Elements

style (§17.7.4.17)

Child Elements

Subclause

cantSplit (Table Row Cannot Break Across Pages)

§17.4.6

cnfStyle (Table Row Conditional Formatting)

§17.4.7

del (Deleted Table Row)

§17.13.5.12

divId (Associated HTML div ID)

§17.4.9

gridAfter (Grid Columns After Last Cell)

§17.4.14

gridBefore (Grid Columns Before First Cell)

§17.4.15

hidden (Hidden Table Row Marker)

§17.4.20

ins (Inserted Table Row)

§17.13.5.17

jc (Table Row Alignment)

§17.4.28

tblCellSpacing (Table Row Cell Spacing)

§17.4.44

tblHeader (Repeat Table Row on Every New Page)

§17.4.50

trHeight (Table Row Height)

§17.4.81

trPrChange (Revision Information for Table Row Properties)

§17.13.5.37

wAfter (Preferred Width After Table Row)

§17.4.86

wBefore (Preferred Width Before Table Row)

§17.4.87

[Note: The W3C XML Schema definition of this element’s content model (CT_TrPr) 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

TableRowProperties Members

DocumentFormat.OpenXml.Wordprocessing Namespace