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

Provides command availability and current-cell helpers based on the editor's caret and table-cell selection.

Definition

Namespace:Telerik.WinForms.Documents.RichTextBoxCommands

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public abstract class TableContextCommandBase : RichTextBoxCommandBase, ICommand

Inheritance: objectRichTextBoxCommandBaseTableContextCommandBase

Derived Classes: ChangeTableColumnsLayoutModeCommandDeleteTableColumnCommandDeleteTableCommandDeleteTableRowCommandInsertTableColumnCommandInsertTableColumnToTheLeftCommandInsertTableColumnToTheRightCommandInsertTableRowAboveCommandInsertTableRowBelowCommandInsertTableRowCommandSelectTableCellCommandSelectTableColumnCommandSelectTableCommandSelectTableEmptyCommandSelectTableRowCommandShowTableBordersDialogCommandShowTablePropertiesDialogCommandTableCellContentAlignmentCommandUnmergeTableCellsCommand...

Implements: ICommand

Inherited Members RichTextBoxCommandBase.CanExecute(object)RichTextBoxCommandBase.Execute()RichTextBoxCommandBase.Execute(object)RichTextBoxCommandBase.GetSelectedInlineOrSelectCurrent()RichTextBoxCommandBase.Execute(object, bool)RichTextBoxCommandBase.ExecuteOverride(object)RichTextBoxCommandBase.UpdateSpanStyle()RichTextBoxCommandBase.UpdateSectionStyle()RichTextBoxCommandBase.GetCurrentParagraphStyle()RichTextBoxCommandBase.GetCurrentSpanStyle()RichTextBoxCommandBase.GetCurrentSectionStyle()RichTextBoxCommandBase.OnCanExecuteChanged()RichTextBoxCommandBase.AssociatedRichTextBoxRichTextBoxCommandBase.CanExecuteInReadOnlyModeRichTextBoxCommandBase.CanExecuteInReadOnlyRangeRichTextBoxCommandBase.IsDeletingCommandRichTextBoxCommandBase.CanExecuteBehaviorInProtectedDocumentRichTextBoxCommandBase.ShouldFocusCaretAfterExecuteRichTextBoxCommandBase.SupportedTargetsRichTextBoxCommandBase.EnabledRichTextBoxCommandBase.CanExecuteChanged...

Constructors

Initializes a new instance of the TableContextCommandBase class.

C#
public TableContextCommandBase(RadRichTextBox editor)
Parameters:editorRadRichTextBox

The associated RadRichTextBox.

Properties

Gets a value indicating whether command must be enabled when there is selection in table. Default implementation returns false.

C#
protected virtual bool IsTableSelectionEnabledCommand { get; }
Property Value:

true if the command must be enabled; otherwise, false.

Methods

Enables the command when the caret is in a table and the selection is empty; when table selections are enabled, also allows selections containing only table cells.

C#
protected virtual bool CanExecuteOverride()
Returns:

bool

true when the current caret and selection satisfy the table-context rules.

Returns whether the current table context satisfies the base or derived command's availability check.

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

Not used by the default implementation.

Returns:

bool

true when the current table context allows the command.

Overrides: RichTextBoxCommandBase.CanExecuteOverride(object)

Gets the cell at the caret, or a new TableCell when the caret is outside a table.

C#
protected virtual TableCell GetCurrentCellStyle()
Returns:

TableCell

The current table cell, or a new default cell outside a table.