共用方式為


TextWrap Class

Text Wrapping.When the object is serialized out as xml, its qualified name is w10:wrap.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Vml.Wordprocessing.TextWrap

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

Syntax

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

Remarks

[ISO/IEC 29500-1 1st Edition]

14.3.2.6 wrap (Text Wrapping)

This element specifies the type of text wrapping which should be allowed around the contents of this VML object.

If this element is omitted, then no text wrapping shall be performed (i.e. the object shall be presented in line with text).

[Example: Consider the following VML object:

<v:shape … >
…
<wd:wrap wd:type="square" />
</v:shape>

The wrap element specifies how surrounding WordprocessingML document content must wrap around the floating VML object - in this case, by wrapping around its extents in a square via the type attribute value of square. end example].

Parent Elements

arc (§14.1.2.1); curve (§14.1.2.3); group (§14.1.2.7); image (§14.1.2.10); line (§14.1.2.12); oval (§14.1.2.13); polyline (§14.1.2.15); rect (§14.1.2.16); roundrect (§14.1.2.17); shape (§14.1.2.19); shapetype (§14.1.2.20)

Attributes

Description

anchorx (Horizontal Positioning Base)

Specifies the base object from which the horizontal positioning of the object should be calculated.

A VML object can be horizontally positioned relative to:

  • The vertical edge of the page before any runs of text (the left edge for left-to-right paragraphs, the right edge for right-to-left paragraphs)

  • The vertical edge of the text margin before any runs of text (the left edge for left-to-right paragraphs, the right edge for right-to-left paragraphs)

  • The vertical edge of the text in the paragraph containing the VML object

  • The position of anchor for the floating VML object in the text.

If this attribute is omitted, then its value shall be assumed to be page.

[Example: Consider a VML object which should be positioned relative to the page edges, which is specified as follows:

<wd:wrap wd:anchorx="page" wd:anchory="page" />

The anchorx attribute specifies that horizontal anchoring is relative to the edge of the page. end example]

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

anchory (Vertical Positioning Base)

Specifies the base object from which the vertical positioning of the object should be calculated.

A VML object can be vertically positioned relative to:

  • The horizontal top edge of the page

  • The horizontal edge of the top text margin before any runs of text

  • The horizontal top edge of line containing the VML object

  • The horizontal top edge of the paragraph containing the text.

If this attribute is omitted, then its value shall be assumed to be page.

[Example: Consider a VML object which should be positioned relative to the page edges, which is specified as follows:

<wd:wrap wd:anchorx="page" wd:anchory="page" />

The anchory attribute specifies that horizontal anchoring is relative to the edge of the page. end example]

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

side (Wrapping side)

Specifies how text shall wrap around the object's left and right sides.

[Example: Consider a floating DrawingML object which must allow text to wrap around its left side only. This setting is specified as follows:

<wd:wrap side="left" … />

The side attribute value of left specifies that text must only wrap around the left side of the object. end example]

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

type (Wrapping type)

Specifies the type of wrapping - see the simple type definition for a description of each type.

[Example: Consider the following VML object:

<v:shape … >
…
<wd:wrap wd:type="topAndBottom" />
</v:shape>

The wrap element specifies how surrounding WordprocessingML document content must wrap around the floating VML object - in this case, by wrapping around its top and bottom extents via the type attribute value of topAndBottom. end example]

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

[Note: The W3C XML Schema definition of this element’s content model (CT_Wrap) is located in §A.6.3. 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

TextWrap Members

DocumentFormat.OpenXml.Vml.Wordprocessing Namespace