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

Changes paragraph flow direction; requesting the last observed direction toggles to its opposite.

Definition

Constructors

Initializes the command for the specified editor.

C#
public ChangeParagraphFlowDirectionCommand(RadRichTextBox editor)
Parameters:editorRadRichTextBox

The rich text box whose paragraph direction this command changes.

Methods

Applies a parsed direction, toggling to the opposite direction when it matches the last observed value.

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

A FlowDirection value or a string parseable as one.

Overrides: RichTextBoxCommandBase.ExecuteOverride(object)

Creates event data from the cached and current paragraph flow directions.

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

StylePropertyChangedEventArgs<FlowDirection?>

The cached and current direction values.

Raises the FlowDirectionChanged event.

C#
protected virtual void OnFlowDirectionChanged(StylePropertyChangedEventArgs<FlowDirection?> e)
Parameters:eStylePropertyChangedEventArgs<FlowDirection?>

The cached and newly observed flow-direction values.

Attempts to convert a command parameter to a flow direction.

C#
public static bool TryConvertCommandParameter(object commandParameter, out FlowDirection flowDirection)
Parameters:commandParameterobject

A defined FlowDirection value or a string accepted by the enum parser.

flowDirectionFlowDirection

Receives the parsed direction, or the enum's default value when conversion fails.

Returns:

bool

true when the parameter is converted; otherwise, false.

Reads the current paragraph direction and raises an event when the cached value is null or differs. An unset default remains null, so repeated style updates can raise repeated events.

C#
protected override void UpdateSpanStyle()

Overrides: RichTextBoxCommandBase.UpdateSpanStyle()

Events

Occurs when the command reads the current paragraph flow direction and its cached value is null or differs. An unset default remains null, so repeated style updates can raise repeated events.

C#
public event EventHandler<StylePropertyChangedEventArgs<FlowDirection?>> FlowDirectionChanged