BodyProperties.UseParagraphSpacing Property

Definition

Paragraph Spacing

Represents the following attribute in the schema: spcFirstLastPara

[DocumentFormat.OpenXml.SchemaAttr(0, "spcFirstLastPara")]
public DocumentFormat.OpenXml.BooleanValue UseParagraphSpacing { get; set; }
public DocumentFormat.OpenXml.BooleanValue UseParagraphSpacing { get; set; }
[DocumentFormat.OpenXml.SchemaAttr(0, "spcFirstLastPara")]
public DocumentFormat.OpenXml.BooleanValue? UseParagraphSpacing { get; set; }
[DocumentFormat.OpenXml.SchemaAttr("spcFirstLastPara")]
public DocumentFormat.OpenXml.BooleanValue? UseParagraphSpacing { get; set; }
public DocumentFormat.OpenXml.BooleanValue? UseParagraphSpacing { get; set; }
member this.UseParagraphSpacing : DocumentFormat.OpenXml.BooleanValue with get, set
[<DocumentFormat.OpenXml.SchemaAttr(0, "spcFirstLastPara")>]
member this.UseParagraphSpacing : DocumentFormat.OpenXml.BooleanValue with get, set
[<DocumentFormat.OpenXml.SchemaAttr("spcFirstLastPara")>]
member this.UseParagraphSpacing : DocumentFormat.OpenXml.BooleanValue with get, set
Public Property UseParagraphSpacing As BooleanValue

Property Value

Returns BooleanValue.

Attributes

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.

Applies to