# ListFormat Class

> An instance of the ListFormat class represents the formatting attributes of a bulleted or numbered list.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Class
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > ListFormat Class
- **1885 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/llms-full.txt

---

### Description

An instance of the ListFormat class represents the formatting attributes of a bulleted or numbered list.

### Syntax

```csharp
public class ListFormat
```

```vbnet
Public Class ListFormat
```

### Examples

The following example shows how to create a new ListFormat and how to apply it at the current input position.

```csharp
TXTextControl.ListFormat lf = new TXTextControl.ListFormat();
lf.Type = TXTextControl.ListType.Numbered;
lf.FirstNumber = 5;

textControl1.Selection.ListFormat = lf;
```

```vbnet
Dim lf As TXTextControl.ListFormat = New TXTextControl.ListFormat()
lf.Type = TXTextControl.ListType.Numbered
lf.FirstNumber = 5

TextControl1.Selection.ListFormat = lf
```

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

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

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

```vbnet
textControl.Text = "Research" & vbCrLf & "Draft" & vbCrLf & "Review"
textControl.Select(0, textControl.Text.Length)

Dim listFormat As New ListFormat() With {
    .Type = ListType.Numbered,
    .NumberFormat = NumberFormat.ArabicNumbers
}
textControl.Selection.ListFormat = listFormat
```

---

## In This Section

- [ListFormat.Attribute Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/attribute-enumeration/llms-full.txt): Determines a certain list format attribute. This enumeration is used with the Selection.IsCommonValueSelected method.
- [ListFormat.BulletCharacter Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/bulletcharacter-property/llms-full.txt): Gets or sets the symbol character for a bulleted list. It must be a value from the Windows Symbol character set.
- [ListFormat.BulletSize Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/bulletsize-property/llms-full.txt): Gets or sets the size of the symbol character for a bulleted list. If this property is 0, the size of the font for the list text is used.
- [ListFormat.CharAfterNumber Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/charafternumber-property/llms-full.txt): Obsolete. Gets or sets a character that is displayed behind the number in a numbered list. If this property is zero, no additional character is diplayed behind the number character. This property is obsolete and only available for compatibility. A new application should use the TextAfterNumber property.
- [ListFormat.CharBeforeNumber Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/charbeforenumber-property/llms-full.txt): Obsolete. Gets or sets a character that is displayed in front of the number in a numbered list. If this property is zero, no additional character is diplayed in front of the number character. This property is obsolete and only available for compatibility. A new application should use the TextBeforeNumber property.
- [ListFormat Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/constructor/llms-full.txt): Creates a new instance of the ListFormat class.
- [ListFormat.FirstNumber Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/firstnumber-property/llms-full.txt): Gets or sets the starting number for a numbered list.
- [ListFormat.FontName Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/fontname-property/llms-full.txt): Gets or sets the font used for the bullet character. When a new bullet character is set without specifying a font, the Windows Symbol font is assumed.
- [ListFormat.FormatCharacter Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/formatcharacter-property/llms-full.txt): Gets or sets the formatting character for a bulleted or numbered list.
- [ListFormat.HangingIndent Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/hangingindent-property/llms-full.txt): Gets or sets the hanging indent of a numbered list.
- [ListFormat.LeftIndent Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/leftindent-property/llms-full.txt): Gets or sets the left indent for a numbered list.
- [ListFormat.Level Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/level-property/llms-full.txt): Gets or sets the level for a bulleted or numbered list.
- [ListFormat.MaxLevel Field](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/maxlevel-field/llms-full.txt): Represents the maximum of levels for bulleted and numbered lists. The value of this constant is 10.
- [ListFormat.MaxText Field](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/maxtext-field/llms-full.txt): Represents the maximum number of charcters for the additinal text in front and behind the number of a numbered list. The value of this constant is 20.
- [ListFormat.NumberFormat Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/numberformat-property/llms-full.txt): Gets or sets the number format for a numbered list. The property's value is a member of the NumberFormat enumeration.
- [ListFormat.RestartNumbering Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/restartnumbering-property/llms-full.txt): Gets or sets a value determining whether a new numbered list begins.
- [ListFormat.TextAfterNumber Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/textafternumber-property/llms-full.txt): Gets or sets the text that is displayed behind the number in a numbered list. If this property is an empty string, no additional text is diplayed behind the number. This property replaces the CharAfterNumber property of this class.
- [ListFormat.TextBeforeNumber Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/textbeforenumber-property/llms-full.txt): Gets or sets the text that is displayed in front of the number in a numbered list. If this property is an empty string, no additional text is diplayed in front of the number. This property replaces the CharBeforeNumber property of this class.
- [ListFormat.Type Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/type-property/llms-full.txt): 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.

---

## Nearby

- **Previous:** [LineCollection.Item Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/linecollection/item-property/llms-full.txt)
- **Next:** [ListFormat.Attribute Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/attribute-enumeration/llms-full.txt)
