Partager via


Run Class

Text Run.When the object is serialized out as xml, its qualified name is a:r.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Drawing.Run

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(RunProperties))> _
<ChildElementInfoAttribute(GetType(Text))> _
Public Class Run _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As Run
[ChildElementInfoAttribute(typeof(RunProperties))]
[ChildElementInfoAttribute(typeof(Text))]
public class Run : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • RunProperties <a:rPr>

  • Text <a:t>

[ISO/IEC 29500-1 1st Edition]

21.1.2.3.8 r (Text Run)

This element specifies the presence of a run of text within the containing text body. The run element is the lowest level text separation mechanism within a text body. A text run can contain text run properties associated with the run. If no properties are listed then properties specified in the defRPr element are used.

[Example: Consider the case where the user would like to describe a text body that contains two runs of text and would like one to be bold and the other not. The following DrawingML would specify such a text body.

<p:txBody>
…
<a:r>
<a:rPr b="1">
</a:rPr>
<a:t>Some text</a:t>
</a:r>
  …
<a:r>
<a:rPr/>
<a:t>Some text</a:t>
</a:r>
</p:txBody>

The above text body has the first run be formatted bold and the second normally. end example]

Parent Elements

p (§21.1.2.2.6)

Child Elements

Subclause

rPr (Text Run Properties)

§21.1.2.3.9

t (Text String)

§21.1.2.3.11

[Note: The W3C XML Schema definition of this element’s content model (CT_RegularTextRun) 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.

See Also

Reference

Run Members

DocumentFormat.OpenXml.Drawing Namespace