TX Text Control .NET Documentation

ParagraphStyleCollection Class

An instance of the ParagraphStyleCollection class contains all paragraph formatting styles in the current document represented through objects of the type ParagraphStyle. A paragraph style is a formatting style that can be used to format blocks of text. The ParagraphStyleCollection class implements the IEnumerable and the ICollection interfaces. An instance of this class can be obtained with the TextControl.ParagraphStyles property.

Syntax:
[C#] public sealed class ParagraphStyleCollection : ICollection, IEnumerable
[Visual Basic] Public NotInheritable Class ParagraphStyleCollection Implements ICollection Implements IEnumerable
Introduced:10.1

Properties

PropertyDescription
CountGets the number of elements contained in the collection.

Methods

MethodDescription
AddAdds to new formatting style to the current document.

CopyToCopies the elements of the collection to an array, starting at a particular index.

GetEnumeratorReturns an enumerator that can be used to iterate through the collection.

GetItemGets a particular style from the collection.

RemoveRemoves a formatting style from a Text Control document.

See also:Stylesheet Programming, Graphical Overview.