Editor binding in MVVM

SyntaxEditor for WPF Forum

Posted 8 years ago by Frederik St-Onge
Version: 16.1.0631

Hello, I'm currently facing an issue to bind my Editor in my viewmodel. I made a property "public SyntaxEditor Editor" that i want to bind in my XAML, but it doesn't seem to let me do that. I'm already bound on the Document and Text attributes, but i wanted to put some text readonly and it looks like i cannot select text/range from the document element. So here's my questions :


1. Is there a way to bind a SyntaxEditor from a viewmodel to the editor:SyntaxEditor element in my xaml?

2. Is there a way to select a certain range of text from the EditorDocument instead of the Editor?


Thank you :)

Comments (1)

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

Hi Frederik,

1) Yes, please look at the "SyntaxEditor / User Interface Features / Input/Output Features / Data Binding" topic in the documentation for how to enable data binding.

2) The document is UI-less and selection is only available on an editor view.  So you will need an editor or view reference.

Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.