TX Text Control .NET for WPF

PointToDocument Method

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

Description

Converts a Point that represents the current coordinate system of the TextControl into a point in document coordinates, which are in twips relative to the top-left corner of the whole document.

Syntax

public Point PointToDocument(Point point);

Parameters

ParameterDescription
point

Specifies a point that represents the current coordinate system of the TextControl.

Return Value

The return value specifies the converted Point in document coordinates.

Examples

The following example uses Point To Document in a focused Text Control workflow.

var result = textControl.PointToDocument(new System.Windows.Point(20, 20));
Console.WriteLine($"Point To Document result: {result}");

Further Reading