Paragraph Class
Text Paragraphs.When the object is serialized out as xml, its qualified name is a:p.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlCompositeElement
DocumentFormat.OpenXml.Drawing.Paragraph
Namespace: DocumentFormat.OpenXml.Drawing
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
<ChildElementInfoAttribute(GetType(Field))> _
<ChildElementInfoAttribute(GetType(Break))> _
<ChildElementInfoAttribute(GetType(EndParagraphRunProperties))> _
<ChildElementInfoAttribute(GetType(ParagraphProperties))> _
<ChildElementInfoAttribute(GetType(Run))> _
<ChildElementInfoAttribute(GetType(TextMath), FileFormatVersions.Office2010)> _
Public Class Paragraph _
Inherits OpenXmlCompositeElement
'Usage
Dim instance As Paragraph
[ChildElementInfoAttribute(typeof(Field))]
[ChildElementInfoAttribute(typeof(Break))]
[ChildElementInfoAttribute(typeof(EndParagraphRunProperties))]
[ChildElementInfoAttribute(typeof(ParagraphProperties))]
[ChildElementInfoAttribute(typeof(Run))]
[ChildElementInfoAttribute(typeof(TextMath), FileFormatVersions.Office2010)]
public class Paragraph : OpenXmlCompositeElement
Remarks
The following table lists the possible child types:
ParagraphProperties <a:pPr>
Run <a:r>
Break <a:br>
Field <a:fld>
DocumentFormat.OpenXml.Office2010.Drawing.TextMath <a14:m>
EndParagraphRunProperties <a:endParaRPr>
[ISO/IEC 29500-1 1st Edition]
21.1.2.2.6 p (Text Paragraphs)
This element specifies the presence of a paragraph of text within the containing text body. The paragraph is the highest level text separation mechanism within a text body. A paragraph can contain text paragraph properties associated with the paragraph. If no properties are listed then properties specified in the defPPr element are used.
[Example: Consider the case where the user would like to describe a text body that contains two paragraphs. The requirement for these paragraphs is that one be right aligned and the other left aligned. The following DrawingML would specify a text body such as this.
<p:txBody> … <a:p> <a:pPr algn="r"> </a:pPr> … <a:t>Some text</a:t> … </a:p> <a:p> <a:pPr algn="l"> </a:pPr> … <a:t>Some text</a:t> … </a:p> </p:txBody>
end example]
Parent Elements |
---|
rich (§21.2.2.156); t (§21.4.3.8); txBody (§21.3.2.26); txBody (§20.1.2.2.40); txBody (§20.5.2.34); txBody (§19.3.1.51); txPr (§21.2.2.216) |
Child Elements |
Subclause |
---|---|
br (Text Line Break) |
§21.1.2.2.1 |
endParaRPr (End Paragraph Run Properties) |
§21.1.2.2.3 |
fld (Text Field) |
§21.1.2.2.4 |
pPr (Text Paragraph Properties) |
§21.1.2.2.7 |
r (Text Run) |
§21.1.2.3.8 |
[Note: The W3C XML Schema definition of this element’s content model (CT_TextParagraph) is located in §A.4.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.