New to Telerik Document ProcessingStart a free 30-day trial

Manages the collection of lists in a document, assigning unique IDs and tracking list definitions referenced by paragraphs.

Definition

Namespace:Telerik.Windows.Documents.Flow.Model.Lists

Assembly:Telerik.Windows.Documents.Flow.dll

Syntax:

C#
public sealed class ListCollection : IEnumerable<List>, IEnumerable

Inheritance: objectListCollection

Implements: IEnumerableIEnumerable<List>

Methods

Adds the specified list to the collection, assigning it a unique ID and associating it with the document.

C#
public void Add(List list)
Parameters:listList

The list to add to the collection.

Creates a list from the specified predefined template, adds it to the collection, and returns the configured list.

C#
public List Add(ListTemplateType listTemplate)
Parameters:listTemplateListTemplateType

The list template.

Returns:

List

The added list.

Removes all lists from the collection and clears list references from all paragraphs and styles.

C#
public void Clear()

Determines whether the specified list is present in this collection.

C#
public bool Contains(List list)
Parameters:listList

The item to locate in the collection.

Returns:

bool

true if list is found in the collection; otherwise, false.

Returns an enumerator that iterates through the collection.

C#
public IEnumerator<List> GetEnumerator()
Returns:

IEnumerator<List>

A IEnumerator<T> that can be used to iterate through the collection.

Implements: IEnumerable<List>.GetEnumerator()

Retrieves the list with the specified ID, or null if no matching list exists.

C#
public List GetList(int id)
Parameters:idint

The id.

Returns:

List

Removes the list with the specified ID and clears list references from all paragraphs and styles using it.

C#
public bool Remove(int listId)
Parameters:listIdint

The list id.

Returns:

bool

true if listId was successfully removed from the collection; otherwise, false. This method also returns false if list with listId is not found in the collection.

Removes the specified list and clears its references from all paragraphs and styles that use it.

C#
public bool Remove(List list)
Parameters:listList

The list to remove from the collection.

Returns:

bool

true if list was successfully removed from the collection; otherwise, false. This method also returns false if list is not found in the collection.

Properties

Gets the number of list definitions in this collection.

C#
public int Count { get; }
Property Value:

The number of lists contained in the collection.