DoNotVerticallyAlignCellWithShape class

Office 2013 and later

Don't Vertically Align Cells Containing Floating Objects. When the object is serialized out as xml, its qualified name is w:doNotVertAlignCellWithSp.


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

public class DoNotVerticallyAlignCellWithShape : OnOffType

[ISO/IEC 29500-1 1st Edition]

doNotVertAlignCellWithSp (Don't Vertically Align Cells Containing Floating Objects)

This element specifies whether applications shall vertically align the contents of a table cell, even when the contents of that table cell include one or more floating objects. Note that the floating object shall be part of the cell, and simply not displayed over the cell due to its anchoring relative to another part of the document.

Typically, if the alignment of a table cell in a WordprocessingML document is specified, then the entire contents of that cell are aligned as specified [Example: The entire contents of the cell are centered vertically and moved right-aligned horizontally at that point. end example]. This element, when present with a val attribute value of true (or equivalent), specifies that whenever a floating object is present in a table cell, that no vertical alignment shall be applied to the contents of that cell, and the contents of the cell shall instead always be top aligned to the cell's contents.

[Example: Consider a WordprocessingML table with two cells, each containing some text and a single floating shape. The first cell is vertically aligned to the bottom of the cell, and the second cell is vertically aligned to the center of the cell.

The default presentation of this document results in each cell (including the extents of the floating objects) being vertically aligned as specified, as follows:

However, if this compatibility setting is turned on:

  <w:doNotVertAlignCellWithSp />

Then the presence of a floating object in each cell must result in the vertical alignment setting being ignored (each vertical alignment must be top-aligned relative to the cell), resulting in the following output:

end example]

Parent Elements

compat (Part 1, §

This element’s content model is defined by the common boolean property definition in Part 1, §17.17.4.

© 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.