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

Sets the list level for selected paragraphs when the caret is at the start of a paragraph already in a list.

Definition

Constructors

Initializes the command for the specified editor.

C#
public ChangeParagraphListLevelCommand(RadRichTextBox editor)
Parameters:editorRadRichTextBox

The rich text box whose paragraph list levels this command changes.

Methods

Allows execution only when the caret's paragraph is in a list and the caret is at the paragraph start.

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

Unused.

Returns:

bool

true when both list and caret-position conditions are satisfied.

Overrides: RichTextBoxCommandBase.CanExecuteOverride(object)

Sets the selected paragraphs to the list level supplied as the command parameter.

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

The target list level as an int.

Overrides: RichTextBoxCommandBase.ExecuteOverride(object)