Justification Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
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; }Public Property Justification As JustificationMembers
| Value | Description |
|---|---|
| Spaces | To justify a line additional space is added to the spaces between the words. |
| Kashida | To justify a line Kashida lines are inserted. |
| SpacesAndKashida | To 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;textControl.Text = "First item" & vbCrLf & "Second item" & vbCrLf & "Third item"
textControl.Select(0, textControl.Text.Length)
Dim paragraphFormat As ParagraphFormat = textControl.Selection.ParagraphFormat
paragraphFormat.Justification = Justification.Spaces
Console.WriteLine($"Justification used by Paragraph Format: {paragraphFormat.Justification}")
textControl.Selection.ParagraphFormat = paragraphFormatRemarks
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.