[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.ListTemplateCollection

Class ListTemplateCollection

Namespace
GrapeCity.Documents.Word
Assembly
GcDocs.Word.dll

Stores and manages formatting of bulleted and numbered lists used in a document.

public class ListTemplateCollection : IReadOnlyList<ListTemplate>, IReadOnlyCollection<ListTemplate>, IEnumerable<ListTemplate>, IEnumerable
Inheritance
object
ListTemplateCollection
Implements
System.Collections.Generic.IReadOnlyList<T><ListTemplate>
System.Collections.Generic.IReadOnlyCollection<T><ListTemplate>
System.Collections.Generic.IEnumerable<T><ListTemplate>
System.Collections.IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Properties

Count

Gets the count of numbered and bulleted list templates in the document.

public int Count { get; }

Property Value

int

Document

Gets the parent document.

public DocumentBase Document { get; }

Property Value

DocumentBase

this[int]

Gets a list template by its index.

public ListTemplate this[int index] { get; }

Parameters

index int

The index of a list template in the collection.

Property Value

ListTemplate

The ListTemplate with the specified index.

this[string]

Gets a list template by its name.

public ListTemplate this[string name] { get; }

Parameters

name string

The name of a list template.

Property Value

ListTemplate

The ListTemplate with the specified name.

PictureBullets

Gets the collection of picture bullets to be used in list templates.

public PictureBulletCollection PictureBullets { get; }

Property Value

PictureBulletCollection

Methods

Add(BuiltInListTemplateId, string)

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)

Parameters

templateId BuiltInListTemplateId

The id of a built in list template.

name string

The name for the list template.

Returns

ListTemplate

The newly created list template.

Add(Style, string)

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)

Parameters

style Style

A list style.

name string

The name for the list template.

Returns

ListTemplate

The newly created list template.

Add(bool, string)

Creates a new list template and adds it to the collection of list templates in the document.

public ListTemplate Add(bool isMultiLevel, string name)

Parameters

isMultiLevel bool

Indicates whether the new list template should be multilevel.

name string

The name for the list template.

Returns

ListTemplate

The newly created list template.

Add(bool)

Creates a new list template and adds it to the collection of list templates in the document.

public ListTemplate Add(bool isMultiLevel)

Parameters

isMultiLevel bool

Indicates whether the new list template should be multilevel.

Returns

ListTemplate

The newly created list template.

Contains(string)

Checks whether this collection contains a list template with a specified name.

public bool Contains(string name)

Parameters

name string

The name of a list template.

Returns

bool

True if the collection contains a list template with the specified name, false otherwise.

TryGetValue(string, out ListTemplate)

Tries to find a list template with a specified name.

public bool TryGetValue(string name, out ListTemplate listTemplate)

Parameters

name string

The name of a list template.

listTemplate ListTemplate

When this method returns, contains the list template with the specified name or null if the name was not found.

Returns

bool

True if the list template was found, false otherwise.