Position Class

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

Inheritance Hierarchy

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

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

Syntax

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

Remarks

[ISO/IEC 29500-1 1st Edition]

17.3.2.24 position (Vertically Raised or Lowered Text)

This element specifies the amount by which text shall be raised or lowered for this run in relation to the default baseline of the surrounding non-positioned text. This allows the text to be repositioned without altering the font size of the contents.

If the val attribute is positive, then the parent run shall be raised above the baseline of the surrounding text by the specified number of half-points. If the val attribute is negative, then the parent run shall be lowered below the baseline of the surrounding text by the specified number of half-points.

If this element is not present, the default value is to leave the formatting applied at previous level in the style hierarchy. If this element is never applied in the style hierarchy, then the text shall not be raised or lowered relative to the default baseline location for the contents of this run.

[Example: Consider a run which must be positioned 12 points above the default baseline location when displaying its contents. This requirement would be specified using the following WordprocessingML:

<w:rPr>
  <w:position w:val="24" />
</w:rPr>

The resulting run is positioned 24 half-points above the default baseline location because the contents of the val attribute are positive. end example]

Parent Elements

rPr (§17.3.1.29); rPr (§17.3.1.30); rPr (§17.5.2.28); rPr (§17.9.25); rPr (§17.7.9.1); rPr (§17.7.5.4); rPr (§17.3.2.28); rPr (§17.5.2.27); rPr (§17.7.6.2); rPr (§17.3.2.27)

Attributes

Description

val (Signed Half-Point Measurement)

Specifies a positive or negative measurement in half-points (1/144 of an inch).

The contents of this attribute value are interpreted based on the context of the parent XML element.

[Example: Consider the following WordprocessingML fragment:

<w:rPr>
  <w:position w:val="-12" /> 
</w:rPr>

In this case, the value in the val attribute is amount by which the specified run must be raised or lowered compared to the baseline of the surrounding text.

In all cases, the value is interpreted in the context of the parent element. end example]

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

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

Position Members

DocumentFormat.OpenXml.Wordprocessing Namespace