HangingIndent Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets or sets the hanging indent of a numbered list.
Syntax
public int HangingIndent { get; set; }Public Property HangingIndent As IntegerExamples
The following example applies HangingIndent while converting three selected paragraphs into a usable numbered list.
textControl.Text = "Research\nDraft\nReview";
textControl.Select(0, textControl.Text.Length);
ListFormat listFormat = new()
{
Type = ListType.Numbered,
HangingIndent = 360
};
textControl.Selection.ListFormat = listFormat;textControl.Text = "Research" & vbCrLf & "Draft" & vbCrLf & "Review"
textControl.Select(0, textControl.Text.Length)
Dim listFormat As New ListFormat() With {
.Type = ListType.Numbered,
.HangingIndent = 360
}
textControl.Selection.ListFormat = listFormatRemarks
The property's default value is 360 twips.
The property returns 0 when the text selection contains multiple paragraphs with mixed hanging indents or when the text selection does not contain a bulleted or a numbered list. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.