Class
ChangeTextAlignmentCommand

Represents a command to change the text alignment within a RichTextBox.

Definition

Namespace:Telerik.Windows.Documents.RichTextBoxCommands

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

cs-api-definition
public class ChangeTextAlignmentCommand : RichTextBoxCommandBase, ICommand

Inheritance: objectRichTextBoxCommandBaseChangeTextAlignmentCommand

Implements: ICommand

Inherited Members RichTextBoxCommandBase.CanExecute(object)RichTextBoxCommandBase.CanExecuteOverride(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

ChangeTextAlignmentCommand(RadRichTextBox)

Declaration

cs-api-definition
public ChangeTextAlignmentCommand(RadRichTextBox radRichTextBox)

Parameters

radRichTextBox

RadRichTextBox

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 text alignment change command.

Declaration

cs-api-definition
public StylePropertyChangedEventArgs<RadTextAlignment?> GetEventArgs()

Returns

StylePropertyChangedEventArgs<RadTextAlignment?>

An instance of EventArgs that contains the event data for the text alignment change event.

OnTextAlignmentChanged(StylePropertyChangedEventArgs<RadTextAlignment?>)

Declaration

cs-api-definition
protected virtual void OnTextAlignmentChanged(StylePropertyChangedEventArgs<RadTextAlignment?> e)

Parameters

e

StylePropertyChangedEventArgs<RadTextAlignment?>

TryConvertCommandParameter(object, out RadTextAlignment)

Attempts to convert the specified command parameter to a RadTextAlignment value.

Declaration

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

Parameters

commandParameter

object

The command parameter to convert.

textAlignment

RadTextAlignment

When this method returns, contains the converted RadTextAlignment value if the conversion succeeded; otherwise, the default value of RadTextAlignment.

Returns

bool

True if the conversion succeeded; otherwise, false.

UpdateSpanStyle()

Declaration

cs-api-definition
protected override void UpdateSpanStyle()

Overrides RichTextBoxCommandBase.UpdateSpanStyle()

Events

TextAlignmentChanged

Declaration

cs-api-definition
public event EventHandler<StylePropertyChangedEventArgs<RadTextAlignment?>> TextAlignmentChanged

Event Value

EventHandler<StylePropertyChangedEventArgs<RadTextAlignment?>>