[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.Run

Class Run

Namespace
GrapeCity.Documents.Word
Assembly
GcDocs.Word.dll

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>
Inheritance
object
Run
Implements
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Examples

To get a string representing all text in a run:

string text = run.GetRange().Text;

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

Properties

Font

Provides access to font formatting of this run.

public Font Font { get; }

Property Value

Font

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

IsOMathRun

Gets whether the run belongs to an Office Math zone.

public bool IsOMathRun { get; }

Property Value

bool

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

Next

Gets the next run content.

public Run Next { get; }

Property Value

Run

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

OMathFormat

Gets Office Math formatting for the run if the IsOMathRun property is set to true.

public OMathFormat OMathFormat { get; }

Property Value

OMathFormat

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

Previous

Gets the previous run content.

public Run Previous { get; }

Property Value

Run

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

RevisionId

Gets unique identifiers used to track the run editing session.

public RunRevisionId RevisionId { get; }

Property Value

RunRevisionId

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

Style

Gets or sets character or linked paragraph style which shall be used to format the contents of this run.

public Style Style { get; set; }

Property Value

Style

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

Methods

AddBreak()

Adds a Break to the end of the run.

public Break AddBreak()

Returns

Break

The added Break.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddBreak(BreakType, BreakClear)

Adds a Break to the end of the run.

public Break AddBreak(BreakType type, BreakClear clear)

Parameters

type BreakType

The break type.

clear BreakClear

The location that shall be used as the next available line when the type has a value of TextWrapping.

Returns

Break

The added Break.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddBreak(BreakType)

Adds a Break to the end of the run.

public Break AddBreak(BreakType type)

Parameters

type BreakType

The break type.

Returns

Break

The added Break.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddCanvasShape()

Adds a CanvasShape to the end of the run.

public CanvasShape AddCanvasShape()

Returns

CanvasShape

The added CanvasShape.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddCanvasShape(float, float)

Adds a CanvasShape to the end of the run.

public CanvasShape AddCanvasShape(float width, float height)

Parameters

width float

The canvas width, in points.

height float

The canvas height, in points.

Returns

CanvasShape

The added CanvasShape.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddGroupShape()

Adds a GroupShape to the end of the run.

public GroupShape AddGroupShape()

Returns

GroupShape

The added GroupShape.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddGroupShape(float, float)

Adds a GroupShape to the end of the run.

public GroupShape AddGroupShape(float width, float height)

Parameters

width float

The group shape width, in points.

height float

The group shape height, in points.

Returns

GroupShape

The added GroupShape.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddInkShape(XmlDocument, float, float)

Adds an InkShape to the end of the run.

public InkShape AddInkShape(XmlDocument content, float width, float height)

Parameters

content System.Xml.XmlDocument

The System.Xml.XmlDocument ink content.

width float

The ink width, in points.

height float

The ink height, in points.

Returns

InkShape

The added InkShape.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddInkShape(XmlDocument)

Adds an InkShape> to the end of the run.

public InkShape AddInkShape(XmlDocument content)

Parameters

content System.Xml.XmlDocument

The System.Xml.XmlDocument ink content.

Returns

InkShape

The added InkShape.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddLastRenderedPageBreak()

Adds a LastRenderedPageBreak to the end of the run.

public LastRenderedPageBreak AddLastRenderedPageBreak()

Returns

LastRenderedPageBreak

The added LastRenderedPageBreak.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddPicture()

Adds a new Picture to the end of the run.

public Picture AddPicture()

Returns

Picture

The added Picture.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddPicture(Image)

Adds a new Picture to the end of the run.

public Picture AddPicture(Image image)

Parameters

image GrapeCity.Documents.Drawing.Image

Returns

Picture

The added Picture. The size of the picture is set to the size of the source image.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddPicture(byte[], string, float, float)

Adds a new Picture to the end of the run.

public Picture AddPicture(byte[] imageBytes, string contentType, float width, float height)

Parameters

imageBytes byte[]

Image data representing the picture.

contentType string

The content type of the image data.

width float

The picture's width, in points.

height float

The picture's height, in points.

Returns

Picture

The added Picture.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddPicture(byte[], string)

Adds a new Picture to the end of the run.

public Picture AddPicture(byte[] imageBytes, string contentType)

Parameters

imageBytes byte[]

Image data representing the picture.

contentType string

The content type of the image data.

Returns

Picture

The added Picture.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddShape()

Adds a new Rectangle Shape (100 x 100 points) to the end of the run.

public Shape AddShape()

Returns

Shape

The added Shape.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddShape(float, float, GeometryType)

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)

Parameters

width float

The shape width, in points.

height float

The shape height, in points.

type GeometryType

The geometry type of the shape.

Returns

Shape

The added Shape.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddShape(float, float, string, GeometryType)

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)

Parameters

width float

The shape width, in points.

height float

The shape height, in points.

text string

If 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 GeometryType

The geometry type of the shape.

Returns

Shape

The added Shape.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddShape(float, float, string)

Adds a new Rectangle Shape with a specified size and text to the end of the run.

public Shape AddShape(float width, float height, string text = null)

Parameters

width float

The shape width, in points.

height float

The shape height, in points.

text string

If not null, a TextFrame with this text is added to the shape.

Returns

Shape

The added Shape.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddSymbol(char, string)

Adds a Symbol to the end of the run.

public Symbol AddSymbol(char character, string fontName)

Parameters

character char

The symbol character.

fontName string

The character font name.

Returns

Symbol

The added Symbol.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddTab()

Adds a Tab to the end of the run.

public Tab AddTab()

Returns

Tab

The added Tab.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddTab(TabAlignment, TabLeader, TabRelativeTo)

Adds a Tab to the end of the run.

public Tab AddTab(TabAlignment alignment, TabLeader leader, TabRelativeTo relativeTo)

Parameters

alignment TabAlignment

The tab alignment.

leader TabLeader

The tab leader character.

relativeTo TabRelativeTo

The extent to calculate the position of the tab.

Returns

Tab

The added Tab.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddTab(TabAlignment, TabLeader)

Adds a Tab to the end of the run.

public Tab AddTab(TabAlignment alignment, TabLeader leader)

Parameters

alignment TabAlignment

The tab alignment.

leader TabLeader

The tab leader character.

Returns

Tab

The added Tab.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddTab(TabAlignment)

Adds a Tab to the end of the run.

public Tab AddTab(TabAlignment alignment)

Parameters

alignment TabAlignment

The tab alignment.

Returns

Tab

The added Tab.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

AddText(string)

Adds a Text to the end of the run.

public Text AddText(string value)

Parameters

value string

The text value to add.

Returns

Text

The added Text.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

Split(ContentObject, InsertLocation)

Splits the run at a specified location relative to a specified child content.

public virtual Run Split(ContentObject child, InsertLocation location)

Parameters

child ContentObject

The child content where to split.

location InsertLocation

The position relative to child where to split.

Returns

Run

The second part of the split run content.

Remarks

A run most commonly contains a single Text object, but it can also contain no or more than one texts and/or other objects.

See Also

See Also