This is a migrated thread and some comments may be shown as answers.

Clarification about Position coordinates

1 Answer 71 Views
Miscellaneous
This is a migrated thread and some comments may be shown as answers.
Sajid
Top achievements
Rank 1
Sajid asked on 19 Nov 2020, 11:59 AM

Hello Everyone,

 

We are using Telerik.Windows.Documents.Model.RadDocumentEditor.Document.CaretPosition.Location.X to determine the location of specific text in the document. We need to share this information with an external system therefore we want to know about the unit of X and Y coordinates.

 

like either these are in pixels or points w-r-t page margins or some other units are used to determine the location. Thanks in advance.

 

Regards,

Ali Bhatti

1 Answer, 1 is accepted

Sort by
0
Accepted
Martin
Telerik team
answered on 24 Nov 2020, 09:10 AM

Hi Sajid,

The CaretPosition.Location returns an instance of PointF struct that holds the X and Y coordinates measured in DIPs (Device-independent pixel) which is the RichTextBox` default measuring unit. If you need to convert these DIPs to other measurement units, you can use the Unit helper class.

I hope this helps.

Regards,
Martin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Miscellaneous
Asked by
Sajid
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or