New to Telerik UI for WinForms? Start a free 30-day trial

Moves the caret in the requested direction, accounting for right-to-left paragraphs and the current Shift modifier.

Definition

Constructors

Initializes a new instance of the MoveCaretCommand class.

C#
public MoveCaretCommand(RadRichTextBox editor)
Parameters:editorRadRichTextBox

The associated RadRichTextBox.

Properties

Allows caret navigation regardless of protected-document permission ranges.

C#
protected override CanExecuteBehaviorInProtectedDocument CanExecuteBehaviorInProtectedDocument { get; }

Overrides: RichTextBoxCommandBase.CanExecuteBehaviorInProtectedDocument

Allows caret navigation when the editor is read-only.

C#
protected override bool CanExecuteInReadOnlyMode { get; }

Overrides: RichTextBoxCommandBase.CanExecuteInReadOnlyMode

Allows caret navigation while the caret is in a read-only range.

C#
protected override bool CanExecuteInReadOnlyRange { get; }

Overrides: RichTextBoxCommandBase.CanExecuteInReadOnlyRange

Methods

Requires an available editor document and a parameter whose exact type is MoveCaretDirections.

C#
protected override bool CanExecuteOverride(object parameter)
Parameters:parameterobject

The requested caret direction.

Returns:

bool

true when the editor, document, and direction are available.

Overrides: RichTextBoxCommandBase.CanExecuteOverride(object)

Applies the direction, adjusting horizontal movement for right-to-left paragraphs and using Shift state to maintain selection.

C#
protected override void ExecuteOverride(object parameter)
Parameters:parameterobject

A MoveCaretDirections value.

Overrides: RichTextBoxCommandBase.ExecuteOverride(object)