New to Telerik UI for WinFormsStart a free 30-day trial

Represents information about a text range.

Definition

Namespace:Telerik.WinForms.Documents.TextSearch

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class TextRange

Inheritance: objectTextRange

Constructors

Initializes a new instance of the TextRange class.

C#
public TextRange(DocumentPosition startPosition, DocumentPosition endPosition)
Parameters:startPositionDocumentPosition

The start position of the text.

endPositionDocumentPosition

The end position of the text.

Properties

Gets the end position of the range.

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

The end position.

Gets the start position of the range.

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

The start position.

Methods

Adds the current text range to the selection ranges of the document.

C#
public void AddToSelection(RadDocument radDocument)
Parameters:radDocumentRadDocument

Sets the selection of the document to the current text range.

C#
public void SetSelection(RadDocument radDocument)
Parameters:radDocumentRadDocument