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

Deletes the comment identified by the caret or selection.

Definition

Constructors

Creates the command and tracks selection and caret changes to update its availability.

C#
public DeleteCommentCommand(RadRichTextBox editor)
Parameters:editorRadRichTextBox

The editor whose current comment can be deleted.

Methods

Checks whether the caret or a single-range selection identifies an inline inside a comment.

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

bool

true when at most one selection range exists and the caret or selection boundary is inside a comment; otherwise, false.

Overrides: RichTextBoxCommandBase.CanExecuteOverride(object)

Deletes the comment containing the inline resolved from the caret or selection, if its annotation range permits editing.

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

Overrides: RichTextBoxCommandBase.ExecuteOverride(object)