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

Coordinates keyboard shortcuts, caret navigation, and text input for the active rich-text editor.

Definition

Namespace:Telerik.WinForms.RichTextEditor

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class RichTextEditorInputBehavior

Inheritance: objectRichTextEditorInputBehavior

Constructors

Creates an input behavior associated with the specified rich-text box.

C#
public RichTextEditorInputBehavior(RadRichTextBox richTextBox)
Parameters:richTextBoxRadRichTextBox

The rich-text box whose active editor receives the input.

Properties

Gets the active editor that receives input handled by this behavior.

C#
public RadRichTextBox RichTextBox { get; }

Methods

Forwards IME text and its composition state to the active presenter's caret input handler.

C#
public virtual void InsertIMEText(string text, bool shouldPersist, bool shouldStartNewComposition)
Parameters:textstring

The text reported by the input method; an empty value can cancel an uncommitted composition.

shouldPersistbool

true to commit the current composition to document history.

shouldStartNewCompositionbool

true when the text starts a new IME composition.

Input is ignored when the editor is read-only or the active presenter has no caret input handler.

Inserts text through the active presenter's non-IME caret input handler.

C#
public virtual void InsertText(string text)
Parameters:textstring

The text to insert.

No text is inserted when the editor is read-only or the active presenter has no caret input handler.

Applies the alignment selected by the Ctrl+L, Ctrl+R, Ctrl+E, or Ctrl+J shortcut unless the editor is read-only.

C#
protected virtual void PerformAlignmentOperation(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event that selects left, right, centered, or justified alignment.

Toggles bold formatting and suppresses the shortcut keypress unless the editor is read-only.

C#
protected virtual void PerformBoldOperation(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event whose default keypress is suppressed after the command.

Handles the Space-key formatting shortcut by clearing character formatting unless the editor is read-only.

C#
protected virtual void PerformClearFormatting(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event for the Space key; this handler does not inspect it.

Captures formatting from the selection or caret for later format-painter use and suppresses the key event's default handling.

C#
protected virtual void PerformCopyFormattingOperation(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event that triggered the copy-formatting operation.

Executes the copy command and suppresses the shortcut keypress.

C#
protected virtual void PerformCopyOperation(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event whose default keypress is suppressed.

Executes the cut command and suppresses the shortcut keypress unless the editor is read-only.

C#
protected virtual void PerformCutOperation(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event whose default keypress is suppressed after the command.

Executes the font-size increment command unless the editor is read-only.

C#
protected virtual void PerformDecrementFontSize(KeyEventArgs e)
Parameters:eKeyEventArgs

The key event dispatched to this hook; the base implementation does not inspect it.

Toggles the display of formatting symbols in the document.

C#
protected virtual void PerformFormattingSymbols(KeyEventArgs e)
Parameters:eKeyEventArgs

The key event dispatched to this hook; the base implementation does not inspect it.

Executes the font-size decrement command unless the editor is read-only.

C#
protected virtual void PerformIncrementFontSize(KeyEventArgs e)
Parameters:eKeyEventArgs

The key event dispatched to this hook; the base implementation does not inspect it.

Toggles italic formatting and suppresses the shortcut keypress unless the editor is read-only.

C#
protected virtual void PerformItalicOperation(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event whose default keypress is suppressed after the command.

Applies the format painter's captured formatting and suppresses default key handling; if the editor is read-only, returns without either action.

C#
protected virtual void PerformPasteFormattingOperation(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event that triggered the paste-formatting operation.

Executes a paste command in the editor and suppresses the keypress when the editor is writable.

C#
protected virtual void PerformPasteOperation(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event whose default keypress is suppressed after a writable paste-command attempt.

Executes the redo command and suppresses the shortcut keypress unless the editor is read-only.

C#
protected virtual void PerformRedoOperation(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event whose default keypress is suppressed after the command.

Selects all document content and suppresses the shortcut keypress.

C#
protected virtual void PerformSelectAllOperation(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event whose default keypress is suppressed.

Executes the command that opens the Find and Replace dialog.

C#
protected virtual void PerformShowFindReplaceDialog(KeyEventArgs e)
Parameters:eKeyEventArgs

The key event dispatched to this hook; the base implementation does not inspect it.

Executes the command that opens the font-properties dialog.

C#
protected virtual void PerformShowFontPropertiesDialog(KeyEventArgs e)
Parameters:eKeyEventArgs

The key event dispatched to this hook; the base implementation does not inspect it.

Opens the hyperlink dialog through its command unless the editor is read-only; this handler does not suppress the key event.

C#
protected virtual void PerformShowInsertHyperlinkDialog(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event that triggered the operation.

Focuses an open paste-options popup and opens its option drop-down when that drop-down action has not been suppressed.

C#
protected virtual void PerformShowPasteOptionsPopup()

Executes the command that opens the spell-checking dialog.

C#
protected virtual void PerformShowSpellCheckingDialog(KeyEventArgs e)
Parameters:eKeyEventArgs

The key event dispatched to this hook; the base implementation does not inspect it.

Toggles subscript formatting unless the editor is read-only.

C#
protected virtual void PerformSubscript(KeyEventArgs e)
Parameters:eKeyEventArgs

The key event dispatched to this hook; the base implementation does not inspect it.

Toggles superscript formatting unless the editor is read-only.

C#
protected virtual void PerformSuperscript(KeyEventArgs e)
Parameters:eKeyEventArgs

The key event dispatched to this hook; the base implementation does not inspect it.

Toggles underline formatting and suppresses the shortcut keypress unless the editor is read-only.

C#
protected virtual void PerformUnderlineOperation(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event whose default keypress is suppressed after the command.

Executes the undo command and suppresses the shortcut keypress unless the editor is read-only.

C#
protected virtual void PerformUndoOperation(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event whose default keypress is suppressed after the command.

Executes the backward-delete command unless the editor is read-only.

C#
protected virtual void ProcessBackKey(KeyEventArgs e)
Parameters:eKeyEventArgs

The key event dispatched to this hook; the base implementation does not inspect it.

At a paragraph start, the command may remove list membership or paragraph indentation instead of deleting text.

Executes the forward-delete command unless the editor is read-only.

C#
protected virtual void ProcessDeleteKey(KeyEventArgs e)
Parameters:eKeyEventArgs

The key event dispatched to this hook; the base implementation does not inspect it.

Moves the caret down one line, or to the end of the paragraph when Ctrl is held.

C#
protected virtual void ProcessDownKey(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event whose Ctrl modifier selects the destination.

Moves the caret to the end of the line, or to the end of the document when Ctrl is held.

C#
protected virtual void ProcessEndKey(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event whose Ctrl modifier selects the destination.

Inserts a line break for Shift+Enter or a page break for Ctrl+Enter when the editor accepts returns.

C#
protected virtual void ProcessEnterKey(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event whose Shift and Ctrl modifiers select the break type.

Does nothing when the editor is read-only or does not accept returns.

Exits header/footer editing when active and cancels the format painter.

C#
protected virtual void ProcessEscapeKey(KeyEventArgs e)
Parameters:eKeyEventArgs

The key event dispatched to this hook; the base implementation does not inspect it.

Moves the caret to the start of the line, or to the start of the document when Ctrl is held.

C#
protected virtual void ProcessHomeKey(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event whose Ctrl modifier selects the destination.

Raises the editor's preview key-down event, then processes the key only if the preview permits default handling and the original event remains unhandled.

C#
public virtual void ProcessKeyDown(KeyEventArgs e)
Parameters:eKeyEventArgs

The key-down event to process.

Dispatches Ctrl-based editor shortcuts, including paste and formatting operations.

C#
protected virtual void ProcessKeyDownCore(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event containing the shortcut keys.

Ctrl+V suppresses the follow-up paste-options drop-down; Ctrl+Shift+V applies copied formatting instead of pasting content.

Inserts eligible character input, converting carriage returns to the document's newline sequence.

C#
public virtual void ProcessKeyPress(KeyPressEventArgs e)
Parameters:eKeyPressEventArgs

The character-key event to process.

Input is ignored when the editor is read-only, Control is the active modifier, or the character is a tab, backspace, vertical tab, or Escape.

Updates Ctrl-key cursor state and, when Control is released with the paste-options popup open, opens its drop-down unless that action is suppressed.

C#
public virtual void ProcessKeyUp(KeyEventArgs e)
Parameters:eKeyEventArgs

The key-up event to process.

Moves the caret left by one position, or to the previous word when Ctrl is held.

C#
protected virtual void ProcessLeftKey(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event whose Ctrl modifier selects the movement.

Moves the caret down by one page.

C#
protected virtual void ProcessPageDownKey(KeyEventArgs e)
Parameters:eKeyEventArgs

The key event dispatched to this hook; the base implementation does not inspect it.

Moves the caret up by one page.

C#
protected virtual void ProcessPageUpKey(KeyEventArgs e)
Parameters:eKeyEventArgs

The key event dispatched to this hook; the base implementation does not inspect it.

Moves the caret right by one position, or to the next word when Ctrl is held.

C#
protected virtual void ProcessRightKey(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event whose Ctrl modifier selects the movement.

Inserts a tab or moves between tab stops according to the editor's settings and the key modifiers.

C#
protected virtual void ProcessTabKey(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event whose Ctrl and Shift modifiers select the tab action.

The handler does nothing when the editor is read-only or does not accept tabs.

Moves the caret up one line, or to the start of the paragraph when Ctrl is held.

C#
protected virtual void ProcessUpKey(KeyEventArgs e)
Parameters:eKeyEventArgs

The keyboard event whose Ctrl modifier selects the destination.

In this article
DefinitionConstructorsRichTextEditorInputBehavior(RadRichTextBox)PropertiesRichTextBoxMethodsInsertIMEText(string, bool, bool)InsertText(string)PerformAlignmentOperation(KeyEventArgs)PerformBoldOperation(KeyEventArgs)PerformClearFormatting(KeyEventArgs)PerformCopyFormattingOperation(KeyEventArgs)PerformCopyOperation(KeyEventArgs)PerformCutOperation(KeyEventArgs)PerformDecrementFontSize(KeyEventArgs)PerformFormattingSymbols(KeyEventArgs)PerformIncrementFontSize(KeyEventArgs)PerformItalicOperation(KeyEventArgs)PerformPasteFormattingOperation(KeyEventArgs)PerformPasteOperation(KeyEventArgs)PerformRedoOperation(KeyEventArgs)PerformSelectAllOperation(KeyEventArgs)PerformShowFindReplaceDialog(KeyEventArgs)PerformShowFontPropertiesDialog(KeyEventArgs)PerformShowInsertHyperlinkDialog(KeyEventArgs)PerformShowPasteOptionsPopup()PerformShowSpellCheckingDialog(KeyEventArgs)PerformSubscript(KeyEventArgs)PerformSuperscript(KeyEventArgs)PerformUnderlineOperation(KeyEventArgs)PerformUndoOperation(KeyEventArgs)ProcessBackKey(KeyEventArgs)ProcessDeleteKey(KeyEventArgs)ProcessDownKey(KeyEventArgs)ProcessEndKey(KeyEventArgs)ProcessEnterKey(KeyEventArgs)ProcessEscapeKey(KeyEventArgs)ProcessHomeKey(KeyEventArgs)ProcessKeyDown(KeyEventArgs)ProcessKeyDownCore(KeyEventArgs)ProcessKeyPress(KeyPressEventArgs)ProcessKeyUp(KeyEventArgs)ProcessLeftKey(KeyEventArgs)ProcessPageDownKey(KeyEventArgs)ProcessPageUpKey(KeyEventArgs)ProcessRightKey(KeyEventArgs)ProcessTabKey(KeyEventArgs)ProcessUpKey(KeyEventArgs)
Not finding the help you need?
Contact Support