Sections and Pages

A document can be split into several sections to enable different page sizes and margins and different headers and footers in the same document. An end-user can use the Page Setup dialog box available through the TextControl.SectionFormatDialog method. All section attributes and headers and footers can be set either for a single section or for the complete document. A SectionCollection available through the TextControl.Sections property enables a programmer to alter the formatting attributes of a section from programming code. The sections of a document are numbered beginning with 1. The StatusBar shows the section number at the text input position. Additionally, it shows the number of pages and the number of sections contained in the document. Because a document can have pages with different sizes a PageCollection informs about the alignment of the page and the page's text contents. Furthermore, a Page object has properties to inform about its character index, number of characters, section number and the number of the page in the section. The PageCollection is available through the TextControl.GetPages method.

Classes

Class Description
TXTextControl.Page An object of the Page class represents a formatted page of a document.
TXTextControl.PageBorder An instance of the PageBorder class represents the attributes of a border, which is drawn in the margin area of a page.
TXTextControl.PageCollection An instance of the PageCollection class contains all pages of a document.
TXTextControl.PageMargins An instance of the PageMargins class represents the page margins of a TX Text Control document or document section.
TXTextControl.PageSize An instance of the PageSize class represents the page size of a TX Text Control document or document section.
TXTextControl.PaperSize The PaperSize class is used with the TextControl.GetSupportedPaperSizes and WPF.TextControl.GetSupportedPaperSizes methods, which return the names and the sizes of all currently supported paper sizes.
TXTextControl.Section An object of the Section class represents a section of a document.
TXTextControl.SectionCollection An instance of the SectionCollection class contains all sections of a document.
TXTextControl.SectionFormat An instance of the SectionFormat class represents the formatting attributes of a section.

Properties

Property Description
TXTextControl.ServerTextControl.GetPages Gets a collection of all pages in the document.
TXTextControl.ServerTextControl.Landscape Gets or sets a value indicating whether the page orientation is landscape or portrait.
TXTextControl.ServerTextControl.PageMargins Gets or sets the margins for the pages of the current document.
TXTextControl.ServerTextControl.Pages Gets the number of pages contained in the current document.
TXTextControl.ServerTextControl.PageSize Specifies the width and height of the pages for the current document.
TXTextControl.ServerTextControl.PageUnit Gets or sets the measure used for page sizes and page margins.
TXTextControl.ServerTextControl.Sections Gets a collection of all sections in the document.
TXTextControl.TextControl.GetPages Gets a collection of all pages in the document.
TXTextControl.TextControl.Landscape Gets or sets a value indicating whether the page orientation is landscape or portrait.
TXTextControl.TextControl.PageMargins Gets or sets the margins for the pages of the current document.
TXTextControl.TextControl.Pages Gets the number of pages contained in the current document.
TXTextControl.TextControl.PageSize Specifies the width and height of the pages for the current document.
TXTextControl.TextControl.PageUnit Gets or sets the measure used for page sizes and page margins.
TXTextControl.TextControl.Sections Gets a collection of all sections in the document.
TXTextControl.WPF.TextControl.GetPages Gets a collection of all pages in the document.
TXTextControl.WPF.TextControl.Landscape Gets or sets a value indicating whether the page orientation is landscape or portrait.
TXTextControl.WPF.TextControl.PageMargins Gets or sets the margins for the pages of the current document.
TXTextControl.WPF.TextControl.Pages Gets the number of pages contained in the current document.
TXTextControl.WPF.TextControl.PageSize Specifies the width and height of the pages for the current document.
TXTextControl.WPF.TextControl.PageUnit Gets or sets the measure used for page sizes and page margins.
TXTextControl.WPF.TextControl.Sections Gets a collection of all sections in the document.

Methods

Method Description
TXTextControl.ServerTextControl.GetSupportedPaperSizes Gets an array of PaperSize structures specifying the names and the size of all currently supported paper sizes.
TXTextControl.ServerTextControl.OnDocumentLoaded Raises the DocumentLoaded event.
TXTextControl.ServerTextControl.ResetPageMargins Resets the PageMargins property to its default value.
TXTextControl.ServerTextControl.ResetPageSize Resets the PageSize property to its default value.
TXTextControl.TextControl.GetSupportedPaperSizes Gets an array of PaperSize structures specifying the names and the size of all currently supported paper sizes.
TXTextControl.TextControl.OnDocumentLoaded Raises the DocumentLoaded event.
TXTextControl.TextControl.OnPageChanged Raises the PageChanged event.
TXTextControl.TextControl.OnPageFormatChanged Raises the PageFormatChanged event.
TXTextControl.TextControl.OnSectionChanged Raises the SectionChanged event.
TXTextControl.TextControl.PageColorDialog Invokes the built-in dialog box for setting the page color.
TXTextControl.TextControl.ResetPageMargins Resets the PageMargins property to its default value.
TXTextControl.TextControl.ResetPageSize Resets the PageSize property to its default value.
TXTextControl.TextControl.SectionFormatDialog Invokes the built-in tabbed dialog box for setting section attributes.
TXTextControl.WPF.TextControl.GetSupportedPaperSizes Gets an array of PaperSize structures specifying the names and the size of all currently supported paper sizes.
TXTextControl.WPF.TextControl.OnDocumentLoaded Raises the DocumentLoaded event.
TXTextControl.WPF.TextControl.OnPageChanged Raises the PageChanged event.
TXTextControl.WPF.TextControl.OnPageFormatChanged Raises the PageFormatChanged event.
TXTextControl.WPF.TextControl.OnSectionChanged Raises the SectionChanged event.
TXTextControl.WPF.TextControl.PageColorDialog Invokes the built-in dialog box for setting the page color.
TXTextControl.WPF.TextControl.SectionFormatDialog Invokes the built-in tabbed dialog box for setting section attributes.

Events

Event Description
TXTextControl.ServerTextControl.DocumentLoaded Occurs when a new document has been loaded.
TXTextControl.TextControl.DocumentLoaded Occurs when a new document has been loaded.
TXTextControl.TextControl.PageChanged Occurs when the text input position has been moved to another page.
TXTextControl.TextControl.PageFormatChanged Occurs when the page format settings have been changed.
TXTextControl.TextControl.SectionChanged Occurs when the text input position has been moved to another section.
TXTextControl.WPF.TextControl.DocumentLoaded Occurs when a new document has been loaded.
TXTextControl.WPF.TextControl.PageChanged Occurs when the text input position has been moved to another page.
TXTextControl.WPF.TextControl.PageFormatChanged Occurs when the page format settings have been changed.
TXTextControl.WPF.TextControl.SectionChanged Occurs when the text input position has been moved to another section.