TX Text Control .NET for WPF

PointFromDocument 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 in document coordinates, which are in twips relative to the top-left corner of the whole document, into a Point that represents the current coordinate system of the TextControl.

Syntax

public Point PointFromDocument(Point point);

Parameters

ParameterDescription
point

Specifies a point in document coordinates.

Return Value

The return value specifies the converted Point that represents the current coordinate system of the TextControl.

Examples

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

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