TX Text Control .NET for WPF

Justification Property

Property|Introduced in 20.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets the kind of justification in documents containing Arabic or Hebrew characters. If a paragraph is justified, the additional space to justify the line is added to the spaces between the words. If the line contains Arabic or Hebrew characters the line can also be justified though the insertion of Kashida lines.

Syntax

public Justification Justification { get; set; }

Members

ValueDescription
SpacesTo justify a line additional space is added to the spaces between the words.
KashidaTo justify a line Kashida lines are inserted.
SpacesAndKashidaTo justify a line both kinds of justification are used.

Examples

The following example applies paragraph layout to selected report text by using ParagraphFormat.Justification.

textControl.Text = "First item\nSecond item\nThird item";
textControl.Select(0, textControl.Text.Length);
ParagraphFormat paragraphFormat = textControl.Selection.ParagraphFormat;

paragraphFormat.Justification = Justification.Spaces;
Console.WriteLine($"Justification used by Paragraph Format: {paragraphFormat.Justification}");

textControl.Selection.ParagraphFormat = paragraphFormat;

Remarks

The property's default value is Justification.Spaces.

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