WidthBeforeTableRow class

Office 2013 and later

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

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

public class WidthBeforeTableRow : TableWidthType

[ISO/IEC 29500-1 1st Edition]

wBefore (Preferred Width Before Table Row)

This element specifies the preferred width for the total number of grid columns before this table row as specified in the gridAfter element (§17.4.14). This preferred width is used as part of the table layout algorithm specified by the tblLayout element (§17.4.53; §17.4.54) - full description of the algorithm in the ST_TblLayout simple type (§17.18.87).

All widths in a table are considered preferred because:

  • The table shall satisfy the shared columns as specified by the tblGrid element (§17.4.49)

  • Two or more widths can have conflicting values for the width of the same grid column

  • The table layout algorithm (§17.18.87) might require a preference to be overridden

This value is specified in the units applied via its type attribute. Any width value of type pct for this element shall be calculated relative to the text extents of the page (page width excluding margins).

If this element is omitted, then the cell width shall be of type auto.

[Example: Consider a WordprocessingML table row defined as follows:

<w:tr>
  <w:trPr>
    <w:gridBefore w:val="1"/>
    <w:wBefore w:type="dxa" w:w="1440"/>
  </w:trPr>
  …</w:tr>

This table specifies that it has a preferred table width of 1440 twentieths of a point (one inch) for the grid column before the start of the row. The resulting table would therefore be sized such that that grid column is one inch whenever possible, for example the second row in this table:

end example]

Parent Elements

trPr (§17.4.82); trPr (§17.7.6.10); trPr (§17.7.6.11); trPr (§17.4.83)

This element’s content model is defined by the common table measurement definition in §17.4.88.

© ISO/IEC29500: 2008.

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