[]
Stores and manages formatting of bulleted and numbered lists used in a document.
public class ListTemplateCollection : IReadOnlyList<ListTemplate>, IReadOnlyCollection<ListTemplate>, IEnumerable<ListTemplate>, IEnumerable
Gets the count of numbered and bulleted list templates in the document.
public int Count { get; }
Gets the parent document.
public DocumentBase Document { get; }
Gets a list template by its index.
public ListTemplate this[int index] { get; }
index
intThe index of a list template in the collection.
The ListTemplate with the specified index.
Gets a list template by its name.
public ListTemplate this[string name] { get; }
name
stringThe name of a list template.
The ListTemplate with the specified name.
Gets the collection of picture bullets to be used in list templates.
public PictureBulletCollection PictureBullets { get; }
Creates a new list template based on a predefined template and adds it to the collection of lists templates in the document.
public ListTemplate Add(BuiltInListTemplateId templateId, string name)
templateId
BuiltInListTemplateIdThe id of a built in list template.
name
stringThe name for the list template.
The newly created list template.
Creates a new list template that references a list style and adds it to the collection of list templates in the document.
public ListTemplate Add(Style style, string name)
style
StyleA list style.
name
stringThe name for the list template.
The newly created list template.
Creates a new list template and adds it to the collection of list templates in the document.
public ListTemplate Add(bool isMultiLevel, string name)
isMultiLevel
boolIndicates whether the new list template should be multilevel.
name
stringThe name for the list template.
The newly created list template.
Creates a new list template and adds it to the collection of list templates in the document.
public ListTemplate Add(bool isMultiLevel)
isMultiLevel
boolIndicates whether the new list template should be multilevel.
The newly created list template.
Checks whether this collection contains a list template with a specified name.
public bool Contains(string name)
name
stringThe name of a list template.
True if the collection contains a list template with the specified name, false otherwise.
Tries to find a list template with a specified name.
public bool TryGetValue(string name, out ListTemplate listTemplate)
name
stringThe name of a list template.
listTemplate
ListTemplateWhen this method returns, contains the list template with the specified name or null if the name was not found.
True if the list template was found, false otherwise.