TX Text Control .NET for Windows Forms

Type 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 type of the list, bulleted, numbered or none. The property's value is one of the values of the ListType enumeration.

Syntax

public ListType Type { get; set; }

Members

ValueDescription
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 applies Type while converting three selected paragraphs into a usable bulleted list.

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

ListFormat listFormat = new()
{
    Type = ListType.Bulleted
};
textControl.Selection.ListFormat = listFormat;

Remarks

The property's default value is ListType.None.

The property returns its default value when the text selection contains multiple paragraphs with mixed types. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.

Further Reading

  • Grouping Undo Steps with TX Text Control –