RightIndent Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets or sets the distance, in twips, between the right edge of a Text Control document and the right edge of the text.
Syntax
public int RightIndent { get; set; }Public Property RightIndent As IntegerExamples
The following example applies paragraph layout to selected report text by using ParagraphFormat.RightIndent.
textControl.Text = "First item\nSecond item\nThird item";
textControl.Select(0, textControl.Text.Length);
ParagraphFormat paragraphFormat = textControl.Selection.ParagraphFormat;
paragraphFormat.RightIndent = 720;
Console.WriteLine($"Right Indent used by Paragraph Format: {paragraphFormat.RightIndent}");
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.RightIndent = 720
Console.WriteLine($"Right Indent used by Paragraph Format: {paragraphFormat.RightIndent}")
textControl.Selection.ParagraphFormat = paragraphFormatRemarks
The property's default value is 0.
The property returns its default value when the text selection contains multiple paragraphs with mixed right indents. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.