Caret's coordinate

SyntaxEditor for WPF Forum

Posted 5 years ago by Daisuke Nakada
Version: 17.2.0664


Please tell me how to get the caret's coordinate (x and y).


Thank you.

Comments (2)

Answer - Posted 5 years ago by Actipro Software Support - Cleveland, OH, USA


I believe this is what you are looking for (X/Y relative to the SyntaxEditor control):

var bounds = editor.ActiveView.TransformFromTextArea(editor.ActiveView.GetCharacterBounds(editor.Caret.Offset).Rect);

Actipro Software Support

Posted 5 years ago by Daisuke Nakada

Thank you very much!

The latest build of this product (v22.1.3) was released 29 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.