Type Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets the type of the header or footer. It is a value of the HeaderFooterType enumeration.
Syntax
public HeaderFooterType Type { get; }Public ReadOnly Property Type As HeaderFooterTypeMembers
| Value | Description |
|---|---|
| Header | The object represents a header. When an even header exists the object represents the odd header. Otherwise it represents the header of all pages. |
| FirstPageHeader | The object represents a special header of the document's or section's first page. |
| Footer | The object represents a footer. When an even footer exists the object represents the odd footer. Otherwise it represents the footer of all pages. |
| FirstPageFooter | The object represents a special footer of the document's or section's first page. |
| EvenHeader | The object represents an even header. |
| EvenFooter | The object represents an even footer. |
Examples
The following example verifies that the retrieved text part is the default header before updating it.
HeaderFooterCollection headers = textControl.Sections[1].HeadersAndFooters;
headers.Add(HeaderFooterType.Header);
HeaderFooter headerFooter = headers.GetItem(HeaderFooterType.Header);
if (headerFooter.Type == HeaderFooterType.Header)
{
headerFooter.Selection.Text = "Quarterly report";
}Dim headers As HeaderFooterCollection = textControl.Sections(1).HeadersAndFooters
headers.Add(HeaderFooterType.Header)
Dim headerFooter As HeaderFooter = headers.GetItem(HeaderFooterType.Header)
If headerFooter.Type = HeaderFooterType.Header Then
headerFooter.Selection.Text = "Quarterly report"
End IfLimitations
Read only.