HeaderFooterCollection Class
- Namespace
TXTextControl
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. WinForms. SDK
- Assembly
TXTextControl.dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. WinForms. SDK TXTextControl.from the setup.dll
- Implements
- ICollection, IEnumerable
Description
An instance of the HeaderFooterCollection class contains the headers and footers in a Text Control document represented through objects of the type HeaderFooter. An instance of this class can be either obtained through the TextControl.HeadersAndFooters or through the Section.HeadersAndFooters property. The first collection represents headers and footers common to all sections of the document and the second collection represents the headers and footers of a certain section. The HeaderFooterCollection class implements the IEnumerable and the ICollection interface.
Syntax
public class HeaderFooterCollection : ICollection, IEnumerablePublic Class HeaderFooterCollection
Implements ICollection, IEnumerableExamples
The following example works with headers and footers in the current document.
HeaderFooterCollection headerFooterCollection = textControl.HeadersAndFooters;
headerFooterCollection.Add(HeaderFooterType.Header);Dim headerFooterCollection As HeaderFooterCollection = textControl.HeadersAndFooters
headerFooterCollection.Add(HeaderFooterType.Header)Members
Properties
| Property | Description |
|---|---|
| Count | Gets the number of elements contained in the collection. |
Methods
| Method | Description |
|---|---|
| Add | Adds a new header or footer to a Text Control document or to a certain section of the document. If a header or footer is added to the complete document the first section receives the header or footer and all other sections receive headers or footers which are connected to their previous section. To add more than one header or footer a combination of the HeaderFooterType enumeration values can be used. |
| 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 header or footer from the collection. If the specified header or footer does not exist in the collection an ArgumentException is thrown. |
| Remove | Removes a header or footer from a Text Control document or from a certain section. To remove more than one header or footer a combination of the HeaderFooterType enumeration can be used. |