Class
ListCollection

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:

cs-api-definition
public sealed class ListCollection : IEnumerable

Inheritance: objectListCollection

Implements: IEnumerable

Properties

Count

Gets the number of list definitions in this collection.

Declaration

cs-api-definition
public int Count { get; }

Property Value

int

The number of lists contained in the collection.

Methods

Add(List)

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

Declaration

cs-api-definition
public void Add(List list)

Parameters

list

List

The list to add to the collection.

Add(ListTemplateType)

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

Declaration

cs-api-definition
public List Add(ListTemplateType listTemplate)

Parameters

listTemplate

ListTemplateType

The list template.

Returns

List

The added list.

Clear()

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

Declaration

cs-api-definition
public void Clear()

Contains(List)

Determines whether the specified list is present in this collection.

Declaration

cs-api-definition
public bool Contains(List list)

Parameters

list

List

The item to locate in the collection.

Returns

bool

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

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration

cs-api-definition
public IEnumerator<List> GetEnumerator()

Returns

IEnumerator<List>

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

GetList(int)

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

Declaration

cs-api-definition
public List GetList(int id)

Parameters

id

int

The id.

Returns

List

Remove(List)

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

Declaration

cs-api-definition
public bool Remove(List list)

Parameters

list

List

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.

Remove(int)

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

Declaration

cs-api-definition
public bool Remove(int listId)

Parameters

listId

int

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.