Changes horizontal and vertical alignment for table-cell content and reports the current alignment state.
Definition
Namespace:Telerik.WinForms.Documents.RichTextBoxCommands
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class TableCellContentAlignmentCommand : TableContextCommandBase, ICommand
Inheritance: objectRichTextBoxCommandBaseTableContextCommandBaseTableCellContentAlignmentCommand
Implements:
Inherited Members
Constructors
Initializes the command for the specified editor.
public TableCellContentAlignmentCommand(RadRichTextBox editor)
The rich text box containing the table cells.
Properties
Allows the command to remain enabled when the selection contains only table cells.
protected override bool IsTableSelectionEnabledCommand { get; }
Overrides:
Methods
Applies the horizontal and vertical alignments specified by a supported parameter.
protected override void ExecuteOverride(object parameter)
An alignment parameter object or a parser-accepted pair of alignment names.
Overrides:
Creates event data from the last cached alignment and the current cell's stored alignments.
public StylePropertyChangedEventArgs<TableCellContentAlignmentCommandParameter> GetEventArgs()
StylePropertyChangedEventArgs<TableCellContentAlignmentCommandParameter>
The cached and current alignment values.
Raises the CellContentAlignmentChanged event.
protected virtual void OnCellContentAlignmentChanged(StylePropertyChangedEventArgs<TableCellContentAlignmentCommandParameter> e)
The old and new alignment values.
Attempts to read horizontal and vertical alignment values from a parameter object or string.
public static bool TryConvertCommandParameter(object commandParameter, out RadTextAlignment textAlignment, out RadVerticalAlignment verticalAlignment)
A TableCellContentAlignmentCommandParameter or two parser-accepted enum names separated by a space or comma.
textAlignmentRadTextAlignmentReceives the horizontal text alignment.
verticalAlignmentRadVerticalAlignmentReceives the vertical content alignment.
Returns:Does nothing because cell-context notifications update this command's alignment state.
protected override void UpdateSpanStyle()
Overrides:
Events
Occurs when the observed cell alignment changes. Reapplying the current alignment also raises the event so bound controls can resynchronize.
public event EventHandler<StylePropertyChangedEventArgs<TableCellContentAlignmentCommandParameter>> CellContentAlignmentChanged