TX Text Control .NET for WPF

PageNumberField Constructor

Constructor
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Creates a new instance of the PageNumberField class.

Syntax

PageNumberField()

Creates a new PageNumberField which displays Arabic numbers starting with 1.

public PageNumberField();

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);
ParameterDescription
startNumber

Specifies the page number for the first page.

numberFormat

Specifies the number format. It can be one of the following values:

ValueMeaning
ArabicNumbersThe page numbers are displayed with Arabic numbers (1, 2, 3...).
LettersThe page numbers are displayed with letters (a, b, c...).
CapitalLettersThe page numbers are displayed with capital letters (A, B, C...).
RomanNumbersThe page numbers are displayed with Roman numbers (I, II, III...).
SmallRomanNumbersThe page numbers are displayed with small Roman numbers (i, ii, iii...).

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);