Cursor navigation support

SyntaxEditor for WPF Forum

Posted 3 years ago by Vadim Tsedrik
Version: 21.1.2

Hello, do you have the possibility to store cursor position history and navigate to previous/next position using Ctrl+- and Ctrl+Shift+- keyboard shortcut like in Visual Studio?

Also maybe you can suggest how to implement Ctrl + Click feature to navigate functions implementation/declaration in custom Syntax Language.

Thank you.

[Modified 3 years ago]

Comments (1)

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

Hi Vadim,

We don't currently have anything built in that will track cursor position history.  I will log a suggestion for that feature.  You might be able to do that yourself if you handle the ViewSelectionChanged and DocumentTextChanged events and track caret moves there.

Ctrl+Click will add a caret by default if the SyntaxEditor.AreMultipleSelectionRangesEnabled property is true.  If that property is false, Ctrl+Click will select by word.  In order to add some other processing for Ctrl+Click, you'd have to add a IEditorViewPointerInputEventSink service to your syntax language.  That event sink service allows you to intercept mouse events before our default processing occurs.  You'd add code in the event sink's NotifyPointerPressed method to look for Ctrl key down and hit test the location that was clicked.  Then if you detect that is over an identifier, look up where that might be declared in your code and move the caret to it.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.