NoWrap Class

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

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.OnOffOnlyType
        DocumentFormat.OpenXml.Wordprocessing.NoWrap

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

Syntax

'Declaration
Public Class NoWrap _
    Inherits OnOffOnlyType
'Usage
Dim instance As NoWrap
public class NoWrap : OnOffOnlyType

Remarks

[ISO/IEC 29500-1 1st Edition]

17.4.30 noWrap (Don't Wrap Cell Content)

This element specifies how this table cell shall be laid out when the parent table is displayed in a document. This setting only affects the behavior of the cell when the tblLayout for this row (§17.4.53; §17.4.54) is set to use the auto algorithm.

This setting shall be interpreted in the context of the tcW element (§17.4.72) as follows:

  • If the table cell width has a type attribute value of fixed, then this element specifies that that this table cell shall never be smaller than that fixed value when other cells on the line are not at their absolute minimum width.

  • If the table cell width has a type attribute value of pct or auto, then this element specifies that when running the auto fit algorithm, the contents of that this table cell shall be treated as though they have no breaking characters (the contents should be treated as a single contiguous non-breaking string)

If this element is omitted, then cell content shall be allowed to wrap (the cell can be shrunk as needed if it is a fixed preferred width value, and the contents shall be treated as having breaking characters if it is a percentage or automatic width value).

[Example: Consider the following three row by three column WordprocessingML table:

In this table, each cell has a fixed preferred width of 2.38 inches (3427 twentieths of a point), and the tblLayout for this row (§17.4.53; §17.4.54) is set to use the auto algorithm. If a long non breaking string is added to the middle row, as follows, the two cells are adjusted to override their preferences and accommodate the string:

sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss

However, if the first table cell has the noWrap element present as follows:

<w:tcPr>
<w:noWrap/>
</w:tcPr>

The noWrap element specifies that because it is a fixed width cell, that cell shall not be collapsed beyond its original size until all other cells are at their minimum size, so in this example the cell maintains its width:

sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss

end example]

Parent Elements

tcPr (§17.7.6.8); tcPr (§17.7.6.9); tcPr (§17.4.70); tcPr (§17.4.71)

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

© 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

NoWrap Members

DocumentFormat.OpenXml.Wordprocessing Namespace