New to Telerik UI for WPFStart a free 30-day trial

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

Definition

Constructors

C#
public ChangeTextAlignmentCommand(RadRichTextBox radRichTextBox)
Parameters:radRichTextBoxRadRichTextBox

Methods

Performs the execute action specific to the command.

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

The command parameter.

Overrides: RichTextBoxCommandBase.ExecuteOverride(object)

Retrieves the event arguments associated with the text alignment change command.

C#
public StylePropertyChangedEventArgs<RadTextAlignment?> GetEventArgs()
Returns:

StylePropertyChangedEventArgs<RadTextAlignment?>

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

C#
protected virtual void OnTextAlignmentChanged(StylePropertyChangedEventArgs<RadTextAlignment?> e)
Parameters:eStylePropertyChangedEventArgs<RadTextAlignment?>

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

C#
public static bool TryConvertCommandParameter(object commandParameter, out RadTextAlignment textAlignment)
Parameters:commandParameterobject

The command parameter to convert.

textAlignmentRadTextAlignment

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.

C#
protected override void UpdateSpanStyle()

Overrides: RichTextBoxCommandBase.UpdateSpanStyle()

Events

C#
public event EventHandler<StylePropertyChangedEventArgs<RadTextAlignment?>> TextAlignmentChanged