Class
TableCellContentAlignmentCommand

Represents a command that aligns the content within a table cell in a RichTextBox.

Definition

Namespace:Telerik.Windows.Documents.RichTextBoxCommands

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

cs-api-definition
public class TableCellContentAlignmentCommand : TableContextCommandBase, ICommand

Inheritance: objectRichTextBoxCommandBaseTableContextCommandBaseTableCellContentAlignmentCommand

Implements: ICommand

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

Constructors

TableCellContentAlignmentCommand(RadRichTextBox)

Declaration

cs-api-definition
public TableCellContentAlignmentCommand(RadRichTextBox editor)

Parameters

editor

RadRichTextBox

Properties

IsTableSelectionEnabledCommand

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

Declaration

cs-api-definition
protected override bool IsTableSelectionEnabledCommand { get; }

Property Value

bool

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

Overrides TableContextCommandBase.IsTableSelectionEnabledCommand

Methods

ExecuteOverride(object)

Performs the execute action specific to the command.

Declaration

cs-api-definition
protected override void ExecuteOverride(object parameter)

Parameters

parameter

object

The command parameter.

Overrides RichTextBoxCommandBase.ExecuteOverride(object)

GetEventArgs()

Retrieves the event arguments associated with the execution of the TableCellContentAlignmentCommand.

Declaration

cs-api-definition
public StylePropertyChangedEventArgs<TableCellContentAlignmentCommandParameter> GetEventArgs()

Returns

StylePropertyChangedEventArgs<TableCellContentAlignmentCommandParameter>

An instance of EventArgs containing the relevant information about the command execution.

OnCellContentAlignmentChanged(StylePropertyChangedEventArgs<TableCellContentAlignmentCommandParameter>)

Declaration

cs-api-definition
protected virtual void OnCellContentAlignmentChanged(StylePropertyChangedEventArgs<TableCellContentAlignmentCommandParameter> e)

Parameters

e

StylePropertyChangedEventArgs<TableCellContentAlignmentCommandParameter>

TryConvertCommandParameter(object, out RadTextAlignment, out RadVerticalAlignment)

Attempts to convert the specified command parameter into text and vertical alignment values.

Declaration

cs-api-definition
public static bool TryConvertCommandParameter(object commandParameter, out RadTextAlignment textAlignment, out RadVerticalAlignment verticalAlignment)

Parameters

commandParameter

object

The object representing the command parameter to convert.

textAlignment

RadTextAlignment

The output parameter that will hold the horizontal text alignment if conversion is successful.

verticalAlignment

RadVerticalAlignment

The output parameter that will hold the vertical text alignment if conversion is successful.

Returns

bool

True if the conversion was successful; otherwise, false.

UpdateSpanStyle()

Declaration

cs-api-definition
protected override void UpdateSpanStyle()

Overrides RichTextBoxCommandBase.UpdateSpanStyle()

Events

CellContentAlignmentChanged

Declaration

cs-api-definition
public event EventHandler<StylePropertyChangedEventArgs<TableCellContentAlignmentCommandParameter>> CellContentAlignmentChanged

Event Value

EventHandler<StylePropertyChangedEventArgs<TableCellContentAlignmentCommandParameter>>