TX Text Control .NET for WPF

TextChar Class

Class|Introduced in 10.1
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.dll
Install
dotnet add package TXTextControl.TextControl.WPF.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.dll from the setup.

Description

An instance of the TextChar class represents a single character in a Text Control document.

Syntax

public class TextChar

Examples

The following example examines the first text char in a short document.

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

Members

Properties

PropertyDescription
BoundsGets 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.
CharGets the value of the character.
NumberGets the character's number. The first character has the number 1.

Further Reading

  • Drag and Drop Files into the Current Input Position –
  • Getting the Input Position from the Mouse Position –