New to Telerik Document ProcessingStart a free 30-day trial

Immutable pairing of a start and end TextPosition defining a contiguous span of text within a fixed document.

Definition

Namespace:Telerik.Windows.Documents.Fixed.Text

Assembly:Telerik.Windows.Documents.Fixed.dll

Syntax:

C#
public class TextRange

Inheritance: objectTextRange

Methods

Determines whether another object represents a range with identical start and end positions.

C#
public override bool Equals(object obj)
Parameters:objobject

An object to compare with this instance.

Returns:

bool

true if obj equals the value of this instance; otherwise, false.

Overrides: object.Equals(object)

Generates a hash code combining the start and end positions.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current object.

Overrides: object.GetHashCode()

Properties

Gets an empty range with no defined start or end positions.

C#
public static TextRange Empty { get; }
Property Value:

The empty text range.

Gets the ending TextPosition of the range.

C#
public TextPosition EndPosition { get; }
Property Value:

The end position.

Indicates whether the range is empty (both start and end are undefined).

C#
public bool IsEmpty { get; }
Property Value:

Is empty.

Gets the starting TextPosition of the range.

C#
public TextPosition StartPosition { get; }
Property Value:

The start position.