Get caret position

SyntaxEditor for WPF Forum

Posted 4 years ago by Miguel A.
Version: 18.1.0672


I would like to show a popup below caret position. For this I would need to get the actual position within the application. How can I do that?

Comments (2)

Answer - Posted 4 years ago by Miguel A.

I've already figured it out. In case someone else looks for this, here is my solution:


var rect = editor.ActiveView.TransformFromTextArea(editor.ActiveView.CurrentViewLine.GetCharacterBounds(editor.ActiveView.Selection.EndOffset).Rect);
Posted 4 years ago by Actipro Software Support - Cleveland, OH, USA


You can call also call the editor.ActiveView.GetCharacterBounds() method to get that.

Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.