TX Text Control .NET for Windows Forms

ListFormat Constructor

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

Description

Creates a new instance of the ListFormat class.

Syntax

ListFormat()

Creates a new empty instance of the ListFormat class.

public ListFormat();

ListFormat(ListType)

Creates a new instance of the ListFormat class which has the specified list type.

public ListFormat(ListType type);
ParameterDescription
type

Specifies one of the ListType values. The following values are possible:

ValueMeaning
NoneThe text is neither a bulleted nor a numbered list.
BulletedThe list is a bulleted list.
NumberedThe list is a numbered list.
StructuredThe list is a structured list. All numbers of higher levels (lower level numbers) are displayed in front of the list number. The additional text of all levels in front and behind the list numbers is also displayed.

Examples

The following example creates a numbered-list format and applies it to three selected action items.

textControl.Text = "Research\nDraft\nReview";
textControl.Select(0, textControl.Text.Length);

ListFormat listFormat = new()
{
    Type = ListType.Numbered,
    NumberFormat = NumberFormat.ArabicNumbers
};
textControl.Selection.ListFormat = listFormat;