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

Provides selection-driven availability for commands that require a non-empty document selection.

Definition

Constructors

Initializes selection tracking for the specified editor.

C#
public SelectionEnabledCommand(RadRichTextBox editor)
Parameters:editorRadRichTextBox

The editor whose selection determines whether the command can execute.

Methods

Returns whether the associated editor currently has a non-empty selection.

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

Not used; availability is determined by the editor's selection.

Returns:

bool

true when the selection contains document content.

Overrides: RichTextBoxCommandBase.CanExecuteOverride(object)