How to select a special line (MVVM)

SyntaxEditor for WPF Forum

Posted 7 years ago by Horst Noll
Version: 17.2.0660
Avatar

Hi,

how can I bind a variable of type int which holds a line number to my view so that this line gets highlighted?

Something like this...

SelectedLine={Binding Path=MyViewModel.CurrentLine}"

Thanks in advance.

Comments (1)

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

Hello,

Can you explain what kind of highlight you are hoping to show there?  Do you mean you just want to be notified of where the caret is?  We don't really have an MVVM-friendly way to get/set that.  The SyntaxEditor.Caret.Position property will give you a line/character (TextPosition) pair that you can get/set programmatically.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.