TX Text Control .NET for Windows Forms

GetPages Property

Property|Introduced in 14.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.Windows.Forms.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets a collection of all pages in the document. The property's value is an object of the type PageCollection. This collection is only available, if the TextControl.ViewMode property has been set to ViewMode.PageView. Otherwise, the method returns null.

Syntax

public PageCollection GetPages();

Examples

The following example includes the pages value in application diagnostics. The created object is then available to the surrounding document workflow.

Console.WriteLine($"Pages: {textControl.Pages}");
Console.WriteLine("Text Control is ready for use.");