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

Opens a file picker and inserts the selected image when its extension is supported by a built-in or custom decoder.

Definition

Constructors

Creates a command that inserts images into the specified editor.

C#
public InsertPictureCommand(RadRichTextBox editor)
Parameters:editorRadRichTextBox

The editor where the selected image is inserted.

Properties

Treats insertion as a possible replacement of selected content for protected-range permission checks.

C#
protected override bool IsDeletingCommand { get; }

Overrides: RichTextBoxCommandBase.IsDeletingCommand

Methods

Uses the current selection state to reject insertion when a single ComboBox, Date, DropDownList, or Text content control is selected.

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

Not used; availability is based on the current selection.

Returns:

bool

false for the listed selected content controls; otherwise, the cached selection result.

Overrides: RichTextBoxCommandBase.CanExecuteOverride(object)

Opens the file picker and inserts a selected image whose extension is supported.

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

An optional file filter string containing |; other values use the default image filter.

Overrides: RichTextBoxCommandBase.ExecuteOverride(object)