Gets or sets the level for a bulleted or numbered list.

Syntax

public int Level { get; set; }
Public Property Level() As Integer

Examples

The following example sets the 'Level' property to a user defined value. Here, it is set to '2' - the default value is '1'.

TXTextControl.ListFormat lf = new TXTextControl.ListFormat();
lf.Type = TXTextControl.ListType.Numbered;
lf.FirstNumber = 5;
lf.FontName = "Calibri";
lf.BulletCharacter = '>';
lf.BulletSize = 12;
lf.FormatCharacter = TXTextControl.ListFormatCharacter.Tab;
lf.HangingIndent = 370;
lf.LeftIndent = 10;
lf.Level = 2;

textControl1.Selection.ListFormat = lf;
Dim lf As TXTextControl.ListFormat = New TXTextControl.ListFormat()
lf.Type = TXTextControl.ListType.Numbered
lf.FirstNumber = 5
lf.FontName = "Calibri"
lf.BulletCharacter = ">"
lf.BulletSize = 12
lf.FormatCharacter = TXTextControl.ListFormatCharacter.Tab
lf.HangingIndent = 370
lf.LeftIndent = 10
lf.Level = 2

TextControl1.Selection.ListFormat = lf

Limitations

The level of a list must be between 1 and ListFormat.MaxLevel.

Remarks

The property's default value is 1.

The property returns its default value when the text selection contains multiple paragraphs with different levels 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.