SpacingBetweenLines.BeforeAutoSpacing Property

Automatically Determine Spacing Above Paragraph.Represents the attribte in schema: w:beforeAutospacing

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

Syntax

'Declaration
<SchemaAttrAttribute(, "beforeAutospacing")> _
Public Property BeforeAutoSpacing As OnOffValue
    Get
    Set
'Usage
Dim instance As SpacingBetweenLines
Dim value As OnOffValue

value = instance.BeforeAutoSpacing

instance.BeforeAutoSpacing = value
[SchemaAttrAttribute(, "beforeAutospacing")]
public OnOffValue BeforeAutoSpacing { get; set; }

Property Value

Type: DocumentFormat.OpenXml.OnOffValue
Returns EnumValue<T>.

Remarks

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

Specifies whether a consumer shall automatically determine the spacing before this paragraph based on its contents.

This automatic spacing shall match the spacing which would be applied to the paragraph in an HTML document where no explicit spacing before/after is specified.

If this attribute is specified, then any value in before or beforeLines is ignored, and the spacing is automatically determined by the consumer.

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 automatic spacing is turned off (not applied).

Consider a paragraph in a document whose spacing above shall automatically be determined by the consumer based on the paragraph's contents. This constraint would be specified by the following WordprocessingML:

<w:pPr>
  <w:spacing … w:beforeAutospacing="on" />
</w:pPr>

The resulting paragraph shall have the spacing above its first line determined automatically by the consumer to match an HTML document as specified.

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

See Also

Reference

SpacingBetweenLines Class

SpacingBetweenLines Members

DocumentFormat.OpenXml.Wordprocessing Namespace