Show / Hide Table of Contents

# Class List

A List is a content node that represents a list structure.

##### Inheritance

object
ContentElement
ContentNode
List

##### Implements

IDisposable

##### Inherited Members

ContentNode.GetContentNodeIterator()
ContentElement.GetTextStyledElement()
ContentElement.AsContentNode()
ContentElement.AsTextRun()
ContentElement.AsParagraph()
ContentElement.AsTableCell()
ContentElement.AsTableRow()
ContentElement.AsTable()
ContentElement.AsList()
ContentElement.AsListItem()
ContentElement.Dispose()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

###### Namespace: pdftron.Layout

###### Assembly: PDFNet.dll

##### Syntax

    public class List : ContentNode, IDisposable

### Methods

#### AddItem()

Add a new list item to the list.

##### Declaration

    public ListItem AddItem()

##### Returns

Type | Description
--- | ---
ListItem | The newly created ListItem object

#### ContinueList()

Continues the logical continuation of a list, even if other non-list content items have been created since the last call to AddItem(). Useful when splitting a sublist and wanting to continue new items in the original sublist hierarchy. Note: Without calling ContinueList(), new list items created after a split (e.g., a split paragraph) would be added to the main list structure (above the split) based on their natural positions in the list/sublist hierarchy.

Example: To continue a root-level list after a split, call ContinueList() on the root-level list.

##### Declaration

    public void ContinueList()

#### Dispose(bool)

##### Declaration

    [HandleProcessCorruptedStateExceptions]
    protected override void Dispose(bool A_0)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | A_0 |

##### Overrides

ContentNode.Dispose(bool)

#### ~List()

##### Declaration

    protected ~List()

#### GetIndentationLevel()

Get the indentation level of the list.

##### Declaration

    public int GetIndentationLevel()

##### Returns

Type | Description
--- | ---
int | The indentation level.

#### GetLabelStyle()

Get the label style for the list.

##### Declaration

    public TextStyledElement GetLabelStyle()

##### Returns

Type | Description
--- | ---
TextStyledElement | The TextStyledElement object representing the label style

#### GetListIdentifier()

Get the identifier of the list.

##### Declaration

    public int GetListIdentifier()

##### Returns

Type | Description
--- | ---
int | The list identifier.

#### SetNumberFormat(NumberFormat)

Set the number format for the list.

##### Declaration

    public void SetNumberFormat(List.NumberFormat format)

##### Parameters

Type | Name | Description
--- | --- | ---
List.NumberFormat | format | The number format to set

#### SetNumberFormat(NumberFormat, string, bool)

Set the number format for the list with a custom suffix.

##### Declaration

    public void SetNumberFormat(List.NumberFormat format, string suffix, bool cascade)

##### Parameters

Type | Name | Description
--- | --- | ---
List.NumberFormat | format | The number format to set
string | suffix | The custom suffix to append to each list item number
bool | cascade | True to apply the number format to nested sublists

#### SetStartIndex(int)

Set the start index for the list items.

##### Declaration

    public void SetStartIndex(int index)

##### Parameters

Type | Name | Description
--- | --- | ---
int | index | The start index to set

### Implements

IDisposable