BodyProperties.UseParagraphSpacing Property

Paragraph Spacing.Represents the attribte in schema: spcFirstLastPara

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

Syntax

'Declaration
<SchemaAttrAttribute(, "spcFirstLastPara")> _
Public Property UseParagraphSpacing As BooleanValue
    Get
    Set
'Usage
Dim instance As BodyProperties
Dim value As BooleanValue

value = instance.UseParagraphSpacing

instance.UseParagraphSpacing = value
[SchemaAttrAttribute(, "spcFirstLastPara")]
public BooleanValue UseParagraphSpacing { get; set; }

Property Value

Type: DocumentFormat.OpenXml.BooleanValue
Returns BooleanValue.

Remarks

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

Specifies whether the before and after paragraph spacing defined by the user is to be respected. While the spacing between paragraphs is helpful, it is additionally useful to be able to set a flag as to whether this spacing is to be followed at the edges of the text body, in other words the first and last paragraphs in the text body. More precisely since this is a text body level property it should only effect the before paragraph spacing of the first paragraph and the after paragraph spacing of the last paragraph for a given text body. If this attribute is omitted, then a value of 0, meaning false, is implied.

Consider the case where spacing has been defined between multiple paragraphs within a text body using the spcBef and spcAft paragraph spacing attributes. For this text body however the user would like to not have this followed for the edge paragraphs and thus we have the following DrawingML.

<p:txBody>
  <a:bodyPr spcFirstLastPara="0" … />
  …
  <a:p>
      <a:pPr>
        <a:spcBef>
        <a:spcPts val="1800"/>
      </a:spcBef>
      <a:spcAft>
        <a:spcPts val="600"/>
      </a:spcAft>
      </a:pPr>
    …
    (Some text)
    …
  </a:p>
  <a:p>
      <a:pPr>
        <a:spcBef>
        <a:spcPts val="1800"/>
      </a:spcBef>
      <a:spcAft>
        <a:spcPts val="600"/>
      </a:spcAft>
      </a:pPr>
    …
    (Some text)
    …
  </a:p>
  …
</p:txBody>

The possible values for this attribute are defined by the XML Schema boolean data type.

See Also

Reference

BodyProperties Class

BodyProperties Members

DocumentFormat.OpenXml.Drawing Namespace