FormatCharacter Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets or sets the formatting character for a bulleted or numbered list.
Syntax
public ListFormatCharacter FormatCharacter { get; set; }Public Property FormatCharacter As ListFormatCharacterMembers
| Value | Description |
|---|---|
| Tab | The text of the list follows the bullet or number character at the next tab position. |
| Space | The text of the list follows the bullet or number character separated through a space character. |
| None | The text of the list immediately follows the bullet or number character. |
Examples
The following example applies FormatCharacter 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,
FormatCharacter = ListFormatCharacter.Space
};
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,
.FormatCharacter = ListFormatCharacter.Space
}
textControl.Selection.ListFormat = listFormatRemarks
The property's default value is ListFormatCharacter.Tab.
The property returns its default value when the text selection contains multiple paragraphs with mixed formatting characters 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.