TX Text Control .NET for Windows Forms

PageSize Property

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

Description

Gets or sets the section's page size. The width and height are always the values in portrait orientation.

Syntax

public PageSize PageSize { get; set; }

Examples

The following example configures the layout of the first document section by using SectionFormat.PageSize.

SectionFormat sectionFormat = textControl.Sections[1].Format;

sectionFormat.PageSize = new PageSize();
if (sectionFormat.PageSize != null)
{
    Console.WriteLine("Section Format: Page Size is available.");
}

Remarks

The property returns a width and a height of zero when the text selection contains multiple sections with mixed sizes. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.