The following example shows how to add a page number field to a header.
textControl1.ViewMode = TXTextControl.ViewMode.PageView;
textControl1.Sections.GetItem().HeadersAndFooters.Add(
TXTextControl.HeaderFooterType.Header);
TXTextControl.HeaderFooter header =
textControl1.Sections.GetItem().HeadersAndFooters.GetItem(
TXTextControl.HeaderFooterType.Header);
header.Selection.Text = "Page ";
header.PageNumberFields.Add(new TXTextControl.PageNumberField(
1, TXTextControl.NumberFormat.ArabicNumbers));
TextControl1.ViewMode = TXTextControl.ViewMode.PageView
TextControl1.Sections.GetItem().HeadersAndFooters.Add( _
TXTextControl.HeaderFooterType.Header)
Dim Header As TXTextControl.HeaderFooter = _
TextControl1.Sections.GetItem().HeadersAndFooters.GetItem( _
TXTextControl.HeaderFooterType.Header)
Header.Selection.Text = "Page "
Header.PageNumberFields.Add(New TXTextControl.PageNumberField( _
1, TXTextControl.NumberFormat.ArabicNumbers))