Gets or sets the writing direction. A paragraph's writing direction can be either left to right or right to left.

Introduced: X10.

Syntax

public Direction Direction { get; set; }
Public Property Direction() As Direction

Members

Member Description
LeftToRight The writing direction is left to right, which means that blocks of text with left to right and right to left characters are ordered from left to right.
RightToLeft The writing direction is right to left, which means that blocks of text with left to right and right to left characters are ordered from right to left.

Examples

The following example uses the Direction property to set the direction of the paragraph format to LeftToRight. This means that blocks of text will be ordered from left to right.

TXTextControl.ParagraphFormat format = new TXTextControl.ParagraphFormat();

format.Alignment  = TXTextControl.HorizontalAlignment.Center;
format.Frame      = TXTextControl.Frame.Box;
format.FrameStyle = TXTextControl.FrameStyle.Double;
format.Direction  = TXTextControl.Direction.LeftToRight;

textControl1.Selection.ParagraphFormat = format;
Dim format As TXTextControl.ParagraphFormat = New TXTextControl.ParagraphFormat()

format.Alignment  = TXTextControl.HorizontalAlignment.Center
format.Frame      = TXTextControl.Frame.Box
format.FrameStyle = TXTextControl.FrameStyle.Double
format.Direction  = TXTextControl.Direction.LeftToRight

TextControl1.Selection.ParagraphFormat = format

Remarks

The property's default value is Direction.LeftToRight.

The property returns its default value, if the text selection contains multiple paragraphs with mixed direction. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.