SyntaxEditor IsReadOnly via data binding?

SyntaxEditor for WPF Forum

Posted 3 years ago by Peter Jorgensen
Version: 17.1.0650
Avatar

It looks like on the EditorDocument, the IsReadOnly property is a standard property (so databinding to that property is not possible). On the SyntaxEditor control, the property is read-only (so I cannot set it). I am using SyntaxEditor in a very MVVM-centered application, is there any way to mark an EditorDocument ReadOnly using DataBinding to a ViewModel?

I am using version 2016.1, is this supported in newer versions?

Comments (1)

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

Hi Peter,

Unfortunately at the current time the IsReadOnly setting for a document is only available on the document itself, which has no UI framework dependencies.  I will log your request to make the SyntaxEditor.IsDocumentReadOnly have a setter, which would involve doing adding more syncing logic.

In the meantime, you might want to try using a custom attached property that would update the document.IsReadOnly property when changed.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) 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.