ClientToDocument Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesWindows. Forms. dll
Description
Computes client coordinates into document coordinates which are in twips relative to the top-left corner of the whole document.
Syntax
ClientToDocument(Point)
Computes the specified client point into document coordinates.
public Point ClientToDocument(Point point);Public Function ClientToDocument(point As Point) As Point| Parameter | Description |
|---|---|
| point | Specifies a client point which document coordinates are computed. |
ClientToDocument(Rectangle)
Computes the specified client rectangle into document coordinates.
public Rectangle ClientToDocument(Rectangle rectangle);Public Function ClientToDocument(rectangle As Rectangle) As Rectangle| Parameter | Description |
|---|---|
| rectangle | Specifies a client rectangle which document coordinates are computed. |
Return Value
The return value specifies the computed document point or rectangle.
Examples
The following example converts a client-coordinate point to document coordinates.
var result = textControl.ClientToDocument(new System.Drawing.Point(20, 20));
Console.WriteLine($"Client To Document result: {result}");Dim result = textControl.ClientToDocument(New System.Drawing.Point(20, 20))
Console.WriteLine($"Client To Document result: {result}")