[]
Represents a contiguous fragment of a body content with uniform formatting.
Use GetRange() to access the range of objects inside a run.
public class Run : FormattedContentObject, IBrowsable<Run>
To get a string representing all text in a run:
string text = run.GetRange().Text;
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Provides access to font formatting of this run.
public Font Font { get; }
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Gets whether the run belongs to an Office Math zone.
public bool IsOMathRun { get; }
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Gets the next run content.
public Run Next { get; }
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Gets Office Math formatting for the run if the IsOMathRun property is set to true.
public OMathFormat OMathFormat { get; }
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Gets the previous run content.
public Run Previous { get; }
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Gets unique identifiers used to track the run editing session.
public RunRevisionId RevisionId { get; }
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Gets or sets character or linked paragraph style which shall be used to format the contents of this run.
public Style Style { get; set; }
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds a Break to the end of the run.
public Break AddBreak()
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds a Break to the end of the run.
public Break AddBreak(BreakType type, BreakClear clear)
type
BreakTypeThe break type.
clear
BreakClearThe location that shall be used as the next available line when the type
has a value of TextWrapping.
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds a Break to the end of the run.
public Break AddBreak(BreakType type)
type
BreakTypeThe break type.
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds a CanvasShape to the end of the run.
public CanvasShape AddCanvasShape()
The added CanvasShape.
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds a CanvasShape to the end of the run.
public CanvasShape AddCanvasShape(float width, float height)
width
floatThe canvas width, in points.
height
floatThe canvas height, in points.
The added CanvasShape.
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds a GroupShape to the end of the run.
public GroupShape AddGroupShape()
The added GroupShape.
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds a GroupShape to the end of the run.
public GroupShape AddGroupShape(float width, float height)
width
floatThe group shape width, in points.
height
floatThe group shape height, in points.
The added GroupShape.
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds an InkShape to the end of the run.
public InkShape AddInkShape(XmlDocument content, float width, float height)
content
System.Xml.XmlDocumentThe System.Xml.XmlDocument ink content.
width
floatThe ink width, in points.
height
floatThe ink height, in points.
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds an InkShape> to the end of the run.
public InkShape AddInkShape(XmlDocument content)
content
System.Xml.XmlDocumentThe System.Xml.XmlDocument ink content.
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds a LastRenderedPageBreak to the end of the run.
public LastRenderedPageBreak AddLastRenderedPageBreak()
The added LastRenderedPageBreak.
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds a new Picture to the end of the run.
public Picture AddPicture()
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds a new Picture to the end of the run.
public Picture AddPicture(Image image)
image
GrapeCity.Documents.Drawing.ImageA run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds a new Picture to the end of the run.
public Picture AddPicture(byte[] imageBytes, string contentType, float width, float height)
imageBytes
byte[]Image data representing the picture.
contentType
stringThe content type of the image data.
width
floatThe picture's width, in points.
height
floatThe picture's height, in points.
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds a new Picture to the end of the run.
public Picture AddPicture(byte[] imageBytes, string contentType)
imageBytes
byte[]Image data representing the picture.
contentType
stringThe content type of the image data.
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
public Shape AddShape()
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds a new Shape with a specified size and text to the end of the run.
public Shape AddShape(float width, float height, GeometryType type)
width
floatThe shape width, in points.
height
floatThe shape height, in points.
type
GeometryTypeThe geometry type of the shape.
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds a new Shape with a specified size, text and geometry to the end of the run.
public Shape AddShape(float width, float height, string text, GeometryType type)
width
floatThe shape width, in points.
height
floatThe shape height, in points.
text
stringIf not null, a TextFrame with this text is added to the shape.
Note that some geometries do not allow text frames (see TextFrameSupported(GeometryType)).
If this parameter is not null and type
specifies one of those geometries, an exception will be thrown.
type
GeometryTypeThe geometry type of the shape.
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
public Shape AddShape(float width, float height, string text = null)
width
floatThe shape width, in points.
height
floatThe shape height, in points.
text
stringIf not null, a TextFrame with this text is added to the shape.
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds a Symbol to the end of the run.
public Symbol AddSymbol(char character, string fontName)
character
charThe symbol character.
fontName
stringThe character font name.
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds a Tab to the end of the run.
public Tab AddTab()
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds a Tab to the end of the run.
public Tab AddTab(TabAlignment alignment, TabLeader leader, TabRelativeTo relativeTo)
alignment
TabAlignmentThe tab alignment.
leader
TabLeaderThe tab leader character.
relativeTo
TabRelativeToThe extent to calculate the position of the tab.
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds a Tab to the end of the run.
public Tab AddTab(TabAlignment alignment, TabLeader leader)
alignment
TabAlignmentThe tab alignment.
leader
TabLeaderThe tab leader character.
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds a Tab to the end of the run.
public Tab AddTab(TabAlignment alignment)
alignment
TabAlignmentThe tab alignment.
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Adds a Text to the end of the run.
public Text AddText(string value)
value
stringThe text value to add.
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.
Splits the run at a specified location relative to a specified child content.
public virtual Run Split(ContentObject child, InsertLocation location)
child
ContentObjectThe child content where to split.
location
InsertLocationThe position relative to child
where to split.
The second part of the split run content.
A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.