PageNumberField Constructor
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Creates a new instance of the PageNumberField class.
Syntax
PageNumberField()
Creates a new PageNumberField which displays Arabic numbers starting with 1.
public PageNumberField();Public Sub New()PageNumberField(int, NumberFormat)
Creates a new PageNumberField which displays page numbers with the specified number format starting with the specified start number.
public PageNumberField(int startNumber, NumberFormat numberFormat);Public Sub New(startNumber As Integer, numberFormat As NumberFormat)| Parameter | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| startNumber | Specifies the page number for the first page. | ||||||||||||
| numberFormat | Specifies the number format. It can be one of the following values:
|
Examples
The following example creates a current-page field and inserts it into the document footer.
textControl.HeadersAndFooters.Add(HeaderFooterType.Footer);
HeaderFooter footer = textControl.HeadersAndFooters.GetItem(HeaderFooterType.Footer);
PageNumberField pageNumberField = new(1, NumberFormat.ArabicNumbers);
footer.PageNumberFields.Add(pageNumberField);textControl.HeadersAndFooters.Add(HeaderFooterType.Footer)
Dim footer As HeaderFooter = textControl.HeadersAndFooters.GetItem(HeaderFooterType.Footer)
Dim pageNumberField As New PageNumberField(1, NumberFormat.ArabicNumbers)
footer.PageNumberFields.Add(pageNumberField)