Partager via


WrapSquare Class

Square Wrapping.When the object is serialized out as xml, its qualified name is wp:wrapSquare.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Drawing.Wordprocessing.WrapSquare

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(EffectExtent))> _
Public Class WrapSquare _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As WrapSquare
[ChildElementInfoAttribute(typeof(EffectExtent))]
public class WrapSquare : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • EffectExtent <wp:effectExtent>

[ISO/IEC 29500-1 1st Edition]

20.4.2.17 wrapSquare (Square Wrapping)

This element specifies that text shall wrap around a virtual rectangle bounding this object. The bounds of the wrapping rectangle shall be dictated by the extents including the addition of the effectExtent element as a child of this element (if present) or the effectExtent present on the parent element.

[Example: Consider a DrawingML object using square wrapping and defined as follows:

<wp:anchor … >
  …
<wp:wrapSquare wrapText="bothSides" />
</wp:anchor>

The wrapSquare element specifies that text must wrap around both sides of a rectangle around this object which includes its effect extents. end example]

Parent Elements

anchor (§20.4.2.3)

Child Elements

Subclause

effectExtent (Object Extents Including Effects)

§20.4.2.6

Attributes

Description

distB (Distance From Text on Bottom Edge)

Specifies the minimum distance which shall be maintained between the bottom edge of this drawing object and any subsequent text within the document when this graphical object is displayed within the document's contents.

The distance shall be measured in EMUs (English Metric Units).

[Example: Consider a floating DrawingML object which must have one-half of an inch of padding between its bottom edge and the nearest text. This setting would be specified as follows:

<wp:anchor  >

  <wp:wrapSquare distB="457200"  />
</wp:anchor>

The distB attribute specifies that the padding distance must be 457200 EMUs or one-half of an inch. end example]

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

distL (Distance From Text on Left Edge)

Specifies the minimum distance which shall be maintained between the left edge of this drawing object and any subsequent text within the document when this graphical object is displayed within the document's contents.

The distance shall be measured in EMUs (English Metric Units).

[Example: Consider a floating DrawingML object which must have one-half of an inch of padding between its left edge and the nearest text. This setting would be specified as follows:

<wp:anchor  >

  <wp:wrapSquare distL="457200"  />
</wp:anchor>

The distL attribute specifies that the padding distance must be 457200 EMUs or one-half of an inch. end example]

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

distR (Distance From Text on Right Edge)

Specifies the minimum distance which shall be maintained between the right edge of this drawing object and any subsequent text within the document when this graphical object is displayed within the document's contents.

The distance shall be measured in EMUs (English Metric Units).

[Example: Consider a floating DrawingML object which must have one-half of an inch of padding between its right edge and the nearest text. This setting would be specified as follows:

<wp:anchor  >

  <wp:wrapSquare distR="457200"  />
</wp:anchor>

The distR attribute specifies that the padding distance must be 457200 EMUs or one-half of an inch. end example]

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

distT (Distance From Text (Top))

Specifies the minimum distance which shall be maintained between the top edge of this drawing object and any subsequent text within the document when this graphical object is displayed within the document's contents.

The distance shall be measured in EMUs (English Metric Units).

[Example: Consider a floating DrawingML object which must have one-half of an inch of padding between its top edge and the nearest text. This setting would be specified as follows:

<wp:anchor  >

  <wp:wrapSquare distT="457200"  />
</wp:anchor>

The distT attribute specifies that the padding distance must be 457200 EMUs or one-half of an inch. end example]

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

wrapText (Text Wrapping Location)

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 would be specified as follows:

<wp:anchor  >

  <wp:wrapSquare wrapText="left"  />
</wp:anchor>

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

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

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

WrapSquare Members

DocumentFormat.OpenXml.Drawing.Wordprocessing Namespace