Partager via


Inline Class

Inline DrawingML Object.When the object is serialized out as xml, its qualified name is wp:inline.

Inheritance Hierarchy

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

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

Syntax

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

Remarks

The following table lists the possible child types:

  • Extent <wp:extent>

  • EffectExtent <wp:effectExtent>

  • DocProperties <wp:docPr>

  • NonVisualGraphicFrameDrawingProperties <wp:cNvGraphicFramePr>

  • DocumentFormat.OpenXml.Drawing.Graphic <a:graphic>

[ISO/IEC 29500-1 1st Edition]

20.4.2.8 inline (Inline DrawingML Object)

This element specifies that the DrawingML object located at this position in the document is an inline object. Within a WordprocessingML document, drawing objects can exist in two states:

  • Inline - The drawing object is in line with the text, and affects the line height and layout of its line (like a character glyph of similar size).

  • Floating - The drawing object is anchored within the text, but can be absolutely positioned in the document relative to the page.

When this element encapsulates the DrawingML object's information, then all child elements shall dictate the positioning of this object in line with text.

[Example: Consider a WordprocessingML document where an inline DrawingML object must be the first piece of run content within a paragraph. That paragraph's content would be specified as follows:

<w:p>
<w:r>
<w:drawing>
<wp:inline>
…
</wp:inline>
</w:drawing>
</w:r>
</w:p>

The inline element, when present as the child element of the drawing element, specifies that this DrawingML object must be positioned in line with the text of this paragraph, modifying line heights, etc. as necessary. end example]

Parent Elements

drawing (§17.3.3.9)

Child Elements

Subclause

cNvGraphicFramePr (Common DrawingML Non-Visual Properties)

§20.4.2.4

docPr (Drawing Object Non-Visual Properties)

§20.4.2.5

effectExtent (Object Extents Including Effects)

§20.4.2.6

extent (Drawing Object Size)

§20.4.2.7

graphic (Graphic Object)

§20.1.2.2.16

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).

If this object is an inline object (i.e. has a parent element of inline), then this value shall not have any effect when displaying the object in line with text, but can be maintained and used if the object is subsequently changed to floating. If the wrapping element [Example: wrapThrough or wrapSquare end example] present as a child element also has a distance from text, then this value shall be ignored.

[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 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).

If this object is an inline object (i.e. has a parent element of inline), then this value shall not have any effect when displaying the object in line with text, but can be maintained and used if the object is subsequently changed to floating. If the wrapping element [Example: wrapThrough or wrapSquare end example] present as a child element also has a distance from text, then this value shall be ignored.

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

<wp:anchor distL="228600"  >

</wp:anchor>

The distL attribute specifies that the padding distance must be 228600 EMUs or one-quarter 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).

If this object is an inline object (i.e. has a parent element of inline), then this value shall not have any effect when displaying the object in line with text, but can be maintained and used if the object is subsequently changed to floating. If the wrapping element [Example: wrapThrough or wrapSquare end example] present as a child element also has a distance from text, then this value shall be ignored.

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

<wp:anchor distR="228600"  >

</wp:anchor>

The distR attribute specifies that the padding distance must be 228600 EMUs or one-quarter 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 on Top Edge)

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).

If this object is an inline object (i.e. has a parent element of inline), then this value shall not have any effect when displaying the object in line with text, but can be maintained and used if the object is subsequently changed to floating. If the wrapping element [Example: wrapThrough or wrapSquare end example] present as a child element also has a distance from text, then this value shall be ignored.

[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 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).

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

Inline Members

DocumentFormat.OpenXml.Drawing.Wordprocessing Namespace