Class
SelectionRange

Represents one continuous range of selected document elements, part of DocumentSelection.

Definition

Namespace:Telerik.Windows.Documents.Selection

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

cs-api-definition
public class SelectionRange

Inheritance: objectSelectionRange

Constructors

SelectionRange()

Initializes a new instance of the SelectionRange class.

Declaration

cs-api-definition
public SelectionRange()

Properties

EndPosition

Gets or sets the position at which the range ends.

Declaration

cs-api-definition
public DocumentPosition EndPosition { get; set; }

Property Value

DocumentPosition

The end position.

IsEmpty

Gets a value indicating whether the range is empty.

Declaration

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

Property Value

bool

true if the range is empty; otherwise, false.

IsReversed

Gets a value indicating whether the selection range is reversed. A reversed selection range means that the start position is after the end position in the document.

Declaration

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

Property Value

bool

IsValid

Gets a value indicating whether the selection range is valid.

Declaration

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

Property Value

bool

RangeType

Gets the type of the range.

Declaration

cs-api-definition
public SelectionRangeType RangeType { get; }

Property Value

SelectionRangeType

The type of the range.

StartPosition

Gets or sets the position from which the range starts.

Declaration

cs-api-definition
public DocumentPosition StartPosition { get; set; }

Property Value

DocumentPosition

The start position.

Methods

ContainsPosition(DocumentPosition)

Determines whether the range contains a specified DocumentPosition.

Declaration

cs-api-definition
public bool ContainsPosition(DocumentPosition position)

Parameters

position

DocumentPosition

The position to check.

Returns

bool

true if the specified range contains the position; otherwise, false.