Class ListCollection
Manages the collection of lists in a document, assigning unique IDs and tracking list definitions referenced by paragraphs.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Documents.Flow.Model.Lists
Assembly: Telerik.Windows.Documents.Flow.dll
Syntax
public sealed class ListCollection : IEnumerable<List>, IEnumerable
Properties
Count
Gets the number of list definitions in this collection.
Declaration
public int Count { get; }
Property Value
|
System.Int32
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
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
public List Add(ListTemplateType listTemplate)
Parameters
|
ListTemplateType
listTemplate
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
public void Clear()
Contains(List)
Determines whether the specified list is present in this collection.
Declaration
public bool Contains(List list)
Parameters
|
List
list
The item to locate in the collection. |
Returns
|
System.Boolean
|
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<List> GetEnumerator()
Returns
|
System.Collections.Generic.IEnumerator<List>
A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the collection. |
Implements
GetList(Int32)
Retrieves the list with the specified ID, or null if no matching list exists.
Declaration
public List GetList(int id)
Parameters
|
System.Int32
id
The id. |
Returns
|
List
|
Remove(Int32)
Removes the list with the specified ID and clears list references from all paragraphs and styles using it.
Declaration
public bool Remove(int listId)
Parameters
|
System.Int32
listId
The list id. |
Returns
|
System.Boolean
|
Remove(List)
Removes the specified list and clears its references from all paragraphs and styles that use it.
Declaration
public bool Remove(List list)
Parameters
|
List
list
The list to remove from the collection. |
Returns
|
System.Boolean
|
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
|
System.Collections.IEnumerator
An System.Collections.IEnumerator object that can be used to iterate through the collection. |