ClassKeyboardSelectionHandler
This class handles the selection from the keyboard.
Definition
Namespace:Telerik.Windows.Documents.Selection
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Syntax:
public class KeyboardSelectionHandler
Inheritance: objectKeyboardSelectionHandler
Constructors
KeyboardSelectionHandler(RadDocument)
Initializes a new instance of the KeyboardSelectionHandler class.
Declaration
public KeyboardSelectionHandler(RadDocument document)
Parameters
document
The current document.
Properties
Document
Gets the current document.
LastCaretPosition
Gets the caret position when starting the selection.
Declaration
protected DocumentPosition LastCaretPosition { get; }
Property Value
Methods
ExpandDownLeft(DocumentPosition)
Expands the selection downwards and to the left from the specified document position.
Declaration
public virtual DocumentPosition ExpandDownLeft(DocumentPosition currentPosition)
Parameters
currentPosition
The starting position from which to expand the selection.
Returns
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
currentPosition
The starting document position from which to expand the selection.
Returns
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 = MoveCaretDirections.Unknown)
Parameters
direction
The current movement direction of the caret.