Export (0) Print
Expand All

AutofitToFirstFixedWidthCell class

Allow Table Columns To Exceed Preferred Widths of Constituent Cells. When the object is serialized out as xml, its qualified name is w:autofitToFirstFixedWidthCell.

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

public class AutofitToFirstFixedWidthCell : OnOffType

[ISO/IEC 29500-1 1st Edition]

autofitToFirstFixedWidthCell (Allow Table Columns To Exceed Preferred Widths of Constituent Cells)

This element specifies that when performing an AutoFit on a table in a WordprocessingML document in order to display it, applications shall alter that logic slightly in order to mimic the behavior of a previous word processing application.

Normally, the AutoFit behavior of a table is as is described in the associated simple type. This element, when present with a val attribute value of true (or equivalent), specifies that this logic shall be changed as follows:

  • If the width of a grid column in a table has been set by a preferred table cell width, then that column's width can be enlarged by the content of cells which themselves do not have a preferred width (in contrast, the normal logic never allows the content of cells to override a preferred width on a grid column).

[Example: Consider a WordprocessingML table with only one preferred cell width, a width of 720 points on the second cell in the first column, as follows:

  …  <w:tr>
        <w:tcW w:w="720" w:type="dxa" />

The default presentation would have the first column constrained to 720 points by the preferred width of the second cell in the first column:

However, if this compatibility setting is turned on:

  <w:autofitToFirstFixedWidthCell />

Then the column would be resized proportionally based on the content (ignoring the preferred width in that row), 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.
© 2015 Microsoft