ListFormat Class
- Namespace
TXTextControl
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. Core. SDK
- Assembly
TXTextControl.Core. dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. Core. SDK TXTextControl.from the setup.dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
Description
An instance of the ListFormat class represents the formatting attributes of a bulleted or numbered list.
Syntax
public class ListFormatPublic Class ListFormatExamples
The following example shows how to create a new ListFormat and how to apply it at the current input position.
TXTextControl.ListFormat lf = new TXTextControl.ListFormat();
lf.Type = TXTextControl.ListType.Numbered;
lf.FirstNumber = 5;
textControl1.Selection.ListFormat = lf;Dim lf As TXTextControl.ListFormat = New TXTextControl.ListFormat()
lf.Type = TXTextControl.ListType.Numbered
lf.FirstNumber = 5
TextControl1.Selection.ListFormat = lfThe 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;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 = listFormatMembers
Constructors
| Constructor | Description |
|---|---|
| ListFormat | Creates a new instance of the ListFormat class. |
Properties
| Property | Description |
|---|---|
| BulletCharacter | Gets or sets the symbol character for a bulleted list. It must be a value from the Windows Symbol character set. |
| BulletSize | 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. |
| CharAfterNumber | 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. |
| CharBeforeNumber | 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. |
| FirstNumber | Gets or sets the starting number for a numbered list. |
| FontName | 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. |
| FormatCharacter | Gets or sets the formatting character for a bulleted or numbered list. |
| HangingIndent | Gets or sets the hanging indent of a numbered list. |
| LeftIndent | Gets or sets the left indent for a numbered list. |
| Level | Gets or sets the level for a bulleted or numbered list. |
| NumberFormat | Gets or sets the number format for a numbered list. The property's value is a member of the NumberFormat enumeration. |
| RestartNumbering | Gets or sets a value determining whether a new numbered list begins. |
| TextAfterNumber | 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. |
| TextBeforeNumber | 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. |
| Type | 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. |
Fields
| Field | Description |
|---|---|
| MaxLevel | Represents the maximum of levels for bulleted and numbered lists. The value of this constant is 10. |
| MaxText | 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. |
Enumerations
| Enumeration | Description |
|---|---|
| Attribute | Determines a certain list format attribute. This enumeration is used with the Selection.IsCommonValueSelected method. |