ParagraphCollection Class
- Namespace
TXTextControl
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. Core. SDK
- Assembly
TXTextControl.Core. dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. Core. SDK TXTextControl.from the setup.dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
- Implements
- ICollection, IEnumerable
Description
An instance of the ParagraphCollection class contains all paragraphs in a Text Control document or part of the document represented through objects of the type Paragraph. An instance of this class can be obtained with the TextControl.Paragraphs, HeaderFooter.Paragraphs or TextFrame.Paragraphs property. The ParagraphCollection class implements the IEnumerable and the ICollection interfaces.
Syntax
public class ParagraphCollection : ICollection, IEnumerablePublic Class ParagraphCollection
Implements ICollection, IEnumerableExamples
The following example works with paragraphs in the current document.
ParagraphCollection paragraphCollection = textControl.Paragraphs;
textControl.Text = "Quarterly results\nRevenue increased by 12%.";Dim paragraphCollection As ParagraphCollection = textControl.Paragraphs
textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."Members
Properties
| Property | Description |
|---|---|
| Count | Gets the number of elements contained in the collection. |
| Item | Gets a paragraph from the collection. In C# this property is the indexer for the ParagraphCollection class. |
Methods
| Method | Description |
|---|---|
| CopyTo | Copies the elements of the collection to an array, starting at a particular index. |
| GetEnumerator | Returns an enumerator that can be used to iterate through the collection. |
| GetItem | Gets a particular paragraph from the collection. |