Run

Overview

Run is a class in Aspose.Words FOSS for .NET. Inherits from: Inline.

Represents a run of characters with the same font formatting.

This class provides 12 methods for working with Run objects in .NET programs. Available methods include: Accept, Clone, GetAncestor, GetAncestorOf, GetText, NextPreOrder, NodeTypeToString, PreviousPreOrder, Remove, Run, ToString. All public members are accessible to any .NET application after installing the Aspose.Words FOSS for .NET package. Properties: CustomNodeId, Document, Font, IsComposite, IsDeleteRevision, IsFormatRevision, and 12 more.

Properties

NameTypeAccessDescription
NodeTypeNodeTypeReadReturns Run.
TextstringRead/WriteGets or sets the text of the run.
IsPhoneticGuideboolReadGets a boolean value indicating either the run is a phonetic guide.
PhoneticGuidePhoneticGuideReadGets a PhoneticGuide object.
ParentParagraphParagraphReadRetrieves the parent Paragraph of this node.
FontFontReadProvides access to the font formatting of this object.
IsInsertRevisionboolReadGets the is insert revision.
IsDeleteRevisionboolReadGets the is delete revision.
IsMoveFromRevisionboolReadGets the is move from revision.
IsMoveToRevisionboolReadGets the is move to revision.
IsFormatRevisionboolReadGets the is format revision.
ParentNodeCompositeNodeReadGets the immediate parent of this node.
DocumentDocumentBaseReadGets the document to which this node belongs.
PreviousSiblingNodeReadGets the node immediately preceding this node.
NextSiblingNodeReadGets the node immediately following this node.
IsCompositeboolReadReturns true if this node can contain other nodes.
RangeRangeReadReturns a Range object that represents the portion of a document that is contained in this node.
CustomNodeIdintRead/WriteSpecifies custom node identifier.

Methods

SignatureDescription
Run(doc: DocumentBase)Initializes a new instance of the Run class.
Run(doc: DocumentBase, text: string)Initializes a new instance of the Run class.
Accept(visitor: DocumentVisitor)Accepts a visitor.
GetText()Gets the text of the run.
Clone(isCloneChildren: bool)You should use the Clone(bool, INodeCloningListener) overload when the node cloning is a part of another (usually composite) node cloning process.
GetAncestor(ancestorType: Type)Gets the first ancestor of the specified object type.
GetAncestorOf()Calls GetAncestorOf on this Run instance.
Remove()Removes itself from the parent.
NextPreOrder(rootNode: Node)Gets next node according to the pre-order tree traversal algorithm.
PreviousPreOrder(rootNode: Node)Gets the previous node according to the pre-order tree traversal algorithm.
ToString(saveFormat: SaveFormat)Exports the content of the node into a string in the specified format.
NodeTypeToString(nodeType: NodeType)A utility method that converts a node type enum value into a user friendly string.

See Also