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


VerticalTextAlignment Class

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

Inheritance Hierarchy

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

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

Syntax

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

Remarks

[ISO/IEC 29500-1 1st Edition]

17.3.2.42 vertAlign (Subscript/Superscript Text)

This element specifies the alignment which shall be applied to the contents of this run in relation to the default appearance of the run's text. This allows the text to be repositioned as subscript or superscript without altering the font size of the run properties.

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 subscript or superscript relative to the default baseline location for the contents of this run.

[Example: Consider a run which must be positioning as superscript when displaying its contents. This requirement would be specified using the following WordprocessingML:

<w:rPr>
  <w:vertAlign w:val="superscript" />
</w:rPr>

The resulting run is positioned as superscript, therefore it is rendered in a smaller size above the default baseline location for the contents of the run. 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 (Subscript/Superscript Value)

Specifies the type of vertical alignment applied to the contents of the current run.

[Example: Consider a run which must be positioning as superscript when displaying its contents. This requirement would be specified using the following WordprocessingML:

<w:rPr>
  <w:vertAlign w:val="superscript" />
</w:rPr>

The value of the val attribute is superscript, therefore the run's contents are rendered in a smaller size above the default baseline location for the contents of the run. end example]

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

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

VerticalTextAlignment Members

DocumentFormat.OpenXml.Wordprocessing Namespace