Поделиться через


TextBoxTightWrap Class

Allow Surrounding Paragraphs to Tight Wrap to Text Box Contents.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.TextBoxTightWrap

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

Syntax

'Declaration
Public Class TextBoxTightWrap _
    Inherits OpenXmlLeafElement
'Usage
Dim instance As TextBoxTightWrap
public class TextBoxTightWrap : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 1st Edition]

17.3.1.40 textboxTightWrap (Allow Surrounding Paragraphs to Tight Wrap to Text Box Contents)

This element specifies whether, for paragraphs in a text box, the surrounding text shall be allowed to overlap with the empty text box boundaries and tight wrap to the extents of the text within the text box.

This element shall only be read for paragraphs which are contained within a text box (have a txbxContent ancestor), ignored otherwise.

If the parent text box does not meet the following three criteria, then this property has no effect:

  • The text box wrapping shall be set to tight

  • The text box border shall not be set

  • The text box shading shall not be set

If this element is omitted on a given paragraph, its value is determined by the setting previously set at any level of the style hierarchy (i.e. that previous setting remains unchanged). If this setting is never specified in the style hierarchy, then paragraphs in a text box have no tight wrapping overrides, and text shall wrap to the extents of the text box.

[Example: Consider a document with a tight wrapped text box which extends two-thirds of the way across the page, as follows:

DocumentFormat.OpenXml.Wordprocessing.TextBoxTight

The surrounding text is tightly wrapped to the extents of the text box. If the consumer must tight wrap to the extents of the text, that requirement would be specified using the following WordprocessingML:

<w:pPr>
  <w:textboxTightWrap w:val="all" />
</w:pPr>

This would result in the following display of the content:

DocumentFormat.OpenXml.Wordprocessing.TextBoxTight

The resulting paragraphs within the textbox use the textboxTightWrap element to specify that text should be tightly wrapped to the paragraph's extents. end example]

Parent Elements

pPr (§17.3.1.26); pPr (§17.3.1.25); pPr (§17.7.5.2); pPr (§17.7.6.1); pPr (§17.9.23); pPr (§17.7.8.2)

Attributes

Description

val (Lines to Tight Wrap to Paragraph Extents)

Specifies the lines in the parent paragraph which shall allow the text to be tight wrapped to the paragraph (and not the text box) extents when displaying the document.

[Example: Consider a paragraph in a text box which meets the criteria specified above which must allow wrapping to the text extents on its first line only. That requirement would be specified using the following WordprocessingML:

<w:pPr>
  <w:textboxTightWrap w:val="firstLineOnly" />
</w:pPr>

The resulting paragraph would allow text to tightly wrap to the contents of its first line only. All other lines would wrap to the text box's extents. end example]

The possible values for this attribute are defined by the ST_TextboxTightWrap simple type (§17.18.92).

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

TextBoxTightWrap Members

DocumentFormat.OpenXml.Wordprocessing Namespace