TX Text Control .NET for Windows Forms

Distance Property

Property
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 distance, in twips, of a header or footer to the top or bottom of the page. For headers it is the distance between the top of the header and the top of the page. For footers it is the distance between the bottom of the footer and the bottom of the page. The default value is 567 twips = 1 cm.

Syntax

public int Distance { get; set; }

Examples

The following example places the header half an inch from the page edge.

HeaderFooterCollection headers = textControl.Sections[1].HeadersAndFooters;
headers.Add(HeaderFooterType.Header);
HeaderFooter headerFooter = headers.GetItem(HeaderFooterType.Header);
headerFooter.Distance = 720;