TX Text Control .NET for Windows Forms

LeftIndent Property

Property
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets the left indent for a numbered list.

Syntax

public int LeftIndent { get; set; }

Examples

The following example applies LeftIndent 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,
    LeftIndent = 720
};
textControl.Selection.ListFormat = listFormat;

Remarks

The property's default value is 0.

The property returns its default value when the text selection contains multiple paragraphs with mixed left 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.