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

Provides shared availability checks for commands that operate on an image selected in the document or under the caret.

Definition

Constructors

Initializes image-context tracking for the specified editor.

C#
public ImageContextCommandBase(RadRichTextBox editor)
Parameters:editorRadRichTextBox

The editor whose selection and caret determine image availability.

Methods

Determines whether the document has one image selected, or an image at the caret with no selection.

C#
public static bool CanExecuteImageContextCommand(RadDocument doc)
Parameters:docRadDocument

The document whose selection and caret are checked.

Returns:

bool

true when the selected or current inline is an ImageInline or FloatingImageBlock.

Returns whether an image is selected or the caret is positioned on an image.

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

Not used; availability is determined by the editor context.

Returns:

bool

true when the current context identifies an image.

Overrides: RichTextBoxCommandBase.CanExecuteOverride(object)