AbsoluteLineSpacing Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets or sets the line spacing of a paragraph in twips.
Syntax
public int AbsoluteLineSpacing { get; set; }Public Property AbsoluteLineSpacing As IntegerExamples
The following example applies paragraph layout to selected report text by using ParagraphFormat.AbsoluteLineSpacing.
textControl.Text = "First item\nSecond item\nThird item";
textControl.Select(0, textControl.Text.Length);
ParagraphFormat paragraphFormat = textControl.Selection.ParagraphFormat;
paragraphFormat.AbsoluteLineSpacing = 720;
Console.WriteLine($"Absolute Line Spacing used by Paragraph Format: {paragraphFormat.AbsoluteLineSpacing}");
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.AbsoluteLineSpacing = 720
Console.WriteLine($"Absolute Line Spacing used by Paragraph Format: {paragraphFormat.AbsoluteLineSpacing}")
textControl.Selection.ParagraphFormat = paragraphFormatLimitations
Runtime only.
The property's value must be between 20 twips (1 pt) and 32000 twips (1600 pt).
Remarks
The property's default value is 0, indicating that the line spacing depends on the font height.
The property returns its default value when the text selection contains multiple paragraphs with mixed line spacing. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.