Share via


SpacingBetweenLines.Line Property

Spacing Between Lines in Paragraph.Represents the attribte in schema: w:line

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

Syntax

'Declaration
<SchemaAttrAttribute(, "line")> _
Public Property Line As StringValue
    Get
    Set
'Usage
Dim instance As SpacingBetweenLines
Dim value As StringValue

value = instance.Line

instance.Line = value
[SchemaAttrAttribute(, "line")]
public StringValue Line { get; set; }

Property Value

Type: DocumentFormat.OpenXml.StringValue
Returns Int32Value.

Remarks

The following information from the ECMA International Standard ECMA-376 can be useful when working with this class.

This attribute specifies the amount of vertical spacing between lines of text within this paragraph.

If this element is omitted on a given paragraph, its value is determined by the setting previously set at any level of the style hierarchy (in other words, that previous setting remains unchanged). If this setting is never specified in the style hierarchy, then no line spacing shall be applied to lines within this paragraph.

If the value of the lineRule attribute is either atLeast or exactly, then the value of this attribute shall be interpreted as twentieths of a point. When the value of the lineRule attribute is either atLeast or exactly, the text shall be positioned as follows within that line height:

  • When the line height is too small, the text shall be positioned at the bottom of the line (in other words, clipped from the top down).

  • When the line height is too large, the text shall be centered in the available space.

If the value of the lineRule attribute is auto, then the value of the line attribute shall be interpreted as 240ths of a line, in the manner described by the simple type's values.

Consider the following WordprocessingML paragraph which should have an inter-line spacing of 1.15 times the line height. This constraint would be specified using the following WordprocessingML:

<w:pPr>
  <w:spacing w:line="276" w:lineRule="auto" />
</w:pPr>

The lineRule attribute value of auto specifies that the value of the line attribute is to be interpreted in 240ths of a single line height, which means that the net spacing is 276/240 lines, or 1.15 lines, tall.

The possible values for this attribute are defined by the ST_SignedTwipsMeasure simple type.

See Also

Reference

SpacingBetweenLines Class

SpacingBetweenLines Members

DocumentFormat.OpenXml.Wordprocessing Namespace