TX Text Control .NET Server

FirstPageOnly Property

Property|Introduced in 17.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

Description

Gets or sets a value indicating whether the page border is drawn only on the first page of the section. If this property is set to true, the page border is drawn only on the first page, otherwise it is drawn on all pages of the section.

Syntax

public bool FirstPageOnly { get; set; }

Examples

The following example configures the page border of the first document section by using PageBorder.FirstPageOnly.

PageBorder pageBorder = textControl.Sections[1].Format.PageBorder;

pageBorder.FirstPageOnly = true;
if (pageBorder.FirstPageOnly)
{
    Console.WriteLine("Page Border: First Page Only is enabled.");
}

Remarks

The property's default value is false.

The property returns its default value when the text selection contains multiple sections with mixed setting. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.