GetItem Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
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.
Syntax
public HeaderFooter GetItem(HeaderFooterType headerFooterType);Public Function GetItem(headerFooterType As HeaderFooterType) As HeaderFooterParameters
| Parameter | Description | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| headerFooterType | Specifies the header or footer to return. It can be a value of the HeaderFooterType enumeration:
|
Examples
The following example retrieves the section footer and updates its text.
HeaderFooterCollection headersAndFooters = textControl.Sections[1].HeadersAndFooters;
headersAndFooters.Add(HeaderFooterType.Footer);
HeaderFooter footer = headersAndFooters.GetItem(HeaderFooterType.Footer);
footer.Selection.Text = "Confidential — Finance Department";Dim headersAndFooters As HeaderFooterCollection = textControl.Sections(1).HeadersAndFooters
headersAndFooters.Add(HeaderFooterType.Footer)
Dim footer As HeaderFooter = headersAndFooters.GetItem(HeaderFooterType.Footer)
footer.Selection.Text = "Confidential — Finance Department"