Indenting string property bound to syntaxEditor

SyntaxEditor Web Languages Add-on for WPF Forum

Posted 12 years ago by oliver baylis
Version: 12.1.0562

I am evaluating the syntax editor along with the web languages add-on. My goal is to provide an easy to use XML editor in my application. On the whole this works well. I don have a question with regards to xml indenting.

Looking at the documentation it mentions indent providers. My understanding of these is that they indent when the user presses ENTER. This is fine but I also want to load up a chunk of XML and display it nicely indented before people begin editing.

The chunk of XML is bound to the syntaxEditor via a string property. Currently the XML is displayed but without indentation. Is this something a can achieve with the control or do I have to fomat the string myself before binding?

Many thanks.

Comments (1)

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

Hi Oliver,

Yes, that is called text formatting and the XML language does have an implementation of that language service.  The "XML Text Formatter Options" QuickStart down at the bottom of the sample list shows various options for the formatter.  So be sure to check that out, as well as the add-on's documentation topic on text formatting.

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.