Class
TextRange

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:

cs-api-definition
public class TextRange

Inheritance: objectTextRange

Properties

Empty

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

Declaration

cs-api-definition
public static TextRange Empty { get; }

Property Value

TextRange

The empty text range.

EndPosition

Gets the ending TextPosition of the range.

Declaration

cs-api-definition
public TextPosition EndPosition { get; }

Property Value

TextPosition

The end position.

IsEmpty

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

Declaration

cs-api-definition
public bool IsEmpty { get; }

Property Value

bool

Is empty.

StartPosition

Gets the starting TextPosition of the range.

Declaration

cs-api-definition
public TextPosition StartPosition { get; }

Property Value

TextPosition

The start position.

Methods

Equals(object)

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

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

An object to compare with this instance.

Returns

bool

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

Overrides object.Equals(object)

GetHashCode()

Generates a hash code combining the start and end positions.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for the current object.

Overrides object.GetHashCode()