TX Text Control .NET for WPF

FormattingBounds Property

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

Description

Gets the formatting rectangle of a text field. The formatting rectangle is the largest rectangle to which the area covered by the field can grow. The rectangle is given in twips with an origin at the upper left corner of the document.

Syntax

public Rectangle FormattingBounds { get; }

Examples

The following example inserts a Word-compatible text field into a template by using TextField.FormattingBounds.

TextField textField = new ApplicationField(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer name", new[] { "CustomerName" });
textControl.TextFields.Add(textField);

Console.WriteLine($"Formatting Bounds: {textField.FormattingBounds}");
Console.WriteLine("Text Field is ready for use.");

Limitations

Read only.