TX Text Control .NET for WPF

MeasureFromText 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 a value indicating whether the page border's distances are measured from the text. If this property is set to true, the page border's distances are measured from the text, otherwise they are measured from the edge of the page.

Syntax

public bool MeasureFromText { get; set; }

Examples

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

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

pageBorder.MeasureFromText = true;
if (pageBorder.MeasureFromText)
{
    Console.WriteLine("Page Border: Measure From Text 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.