TX Text Control .NET for WPF

LeftDistance Property

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

Description

Gets or sets the distance, in twips, of the left border line either from the edge of the page or from the text, depending on the MeasureFromText property.

Syntax

public int LeftDistance { get; set; }

Examples

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

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

pageBorder.LeftDistance = 720;
Console.WriteLine($"Left Distance used by Page Border: {pageBorder.LeftDistance}");

Remarks

The property's default value is PageBorder.DefaultDistance.

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.