TX Text Control .NET Server

Bounds Property

Property|Introduced in 10.1
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

Description

Gets the bounding rectangle of the character. The values are given in twips with an origin at the upper left corner of the document. The relationship between the upper left corner of the document and the upper left corner of the visible portion of the document can be obtained with the TextControl.ScrollLocation property.

Syntax

public Rectangle Bounds { get; }

Examples

The following example examines the first text char in a short document by using TextChar.Bounds.

textControl.Text = "Quarterly results\nRevenue increased by 12%.";
TextChar textChar = textControl.TextChars[1];

Console.WriteLine($"Bounds: {textChar.Bounds}");
Console.WriteLine("Text Char is ready for use.");

Limitations

Read only.