Bounds Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets the bounding rectangle of a text field. The bounding rectangle is the smallest rectangle which contains all characters of the field's text. The rectangle is given in twips with an origin at the upper left corner of the document.
Syntax
public Rectangle Bounds { get; }Public ReadOnly Property Bounds As RectangleExamples
The following example inserts a Word-compatible text field into a template by using TextField.Bounds.
TextField textField = new ApplicationField(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer name", new[] { "CustomerName" });
textControl.TextFields.Add(textField);
Console.WriteLine($"Bounds: {textField.Bounds}");
Console.WriteLine("Text Field is ready for use.");Dim textField As TextField = New ApplicationField(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer name", New String() { "CustomerName" })
textControl.TextFields.Add(textField)
Console.WriteLine($"Bounds: {textField.Bounds}")
Console.WriteLine("Text Field is ready for use.")Limitations
Read only.