Class KeyboardSelectionHandler
This class handles the selection from the keyboard.
Inheritance
Namespace: Telerik.Windows.Documents.Selection
Assembly: Telerik.Windows.Controls.RichTextBox.dll
Syntax
public class KeyboardSelectionHandler : Object
Constructors
KeyboardSelectionHandler(RadDocument)
Initializes a new instance of the KeyboardSelectionHandler class.
Declaration
public KeyboardSelectionHandler(RadDocument document)
Parameters
RadDocument
document
The current document. |
Properties
Document
Gets the current document.
Declaration
protected RadDocument Document { get; }
Property Value
RadDocument
|
LastCaretPosition
Gets the caret position when starting the selection.
Declaration
protected DocumentPosition LastCaretPosition { get; }
Property Value
DocumentPosition
|
Methods
ExpandDownLeft(DocumentPosition)
Expands the selection downwards and to the left from the specified document position.
Declaration
public virtual DocumentPosition ExpandDownLeft(DocumentPosition currentPosition)
Parameters
DocumentPosition
currentPosition
The starting position from which to expand the selection. |
Returns
DocumentPosition
Returns the new selection position after expanding. |
ExpandTopRight(DocumentPosition)
Expands the selection to the top right from the specified document position.
Declaration
public virtual DocumentPosition ExpandTopRight(DocumentPosition currentPosition)
Parameters
DocumentPosition
currentPosition
The starting document position from which to expand the selection. |
Returns
DocumentPosition
Returns a boolean indicating whether the selection was successfully expanded. |
UpdateSelection(MoveCaretDirections)
This method updates the selected range when the caret is moved by pressing shift and the arrow keys.
Declaration
public virtual void UpdateSelection(MoveCaretDirections direction)
Parameters
MoveCaretDirections
direction
The current movement direction of the caret. |