Page Field
The Page field inserts the current page number.
To update the field within the TOC field, set the FlowExtensibilityManager.NumberingFieldsProvider.
Field Syntax
The following table shows the syntax of a Page field:
| Syntax |
|---|
| { PAGE [\*Format Switch] } |
Switches
Switches allow the code fragment to specify formatting for the result of the field. More information is available in the Syntax and Switches section of the Fields article.
The possible switches for a Page field are:
| Switch | Description |
|---|---|
| \* Format Switch | Optional switch that specifies the format. |
Inserting
You can insert this field through the InsertField() method of RadFlowDocumentEditor. The method accepts code as the first argument and result as the second argument.
Example 1 demonstrates how to insert a Page field.
Example 1: Insert PAGE and NUMPAGES fields to display the current page inside a page count label
editor.InsertText("Page ");
editor.InsertField("PAGE", "");
editor.InsertText(" of ");
editor.InsertField("NUMPAGES", "");
After updating the field, the result is "Page 3 of 6" (see Updating Fields).