Can I get a certain indent behavior in the editor?

SyntaxEditor for WPF Forum

Posted 9 years ago by Craig - Varigence, Inc.
Version: 11.1.0542
Avatar
As we've been completing our transition from the WinForms editor to the WPF Syntax Editor, we're seeing what we consider a regression in indent behavior.

If you open the actipro sample browser, go to the syntax editor area, and select the XML editor (web lang. add-on) sample, you'll naturally see xml in the syntax editor. Within the hair xml element, let's say I type <colors>. The editor will correctly add an end colors tag, so I get <colors></colors>, with my cursor in between the two elements. Now, if I press Enter on my keyboard, I expect a newline to be added between the elements with my cursor indented, like so:

<hair>
    <colors>
        <- cursor should be there
    </colors>
</hair>
However, all I get is:

<hair>
    <colors>
    </colors>
</hair>
Is there a way to get the newline and indent behavior, like we used to get with the WinForms editor?

Thanks,

-Craig

Comments (2)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Craig,

We still have smart indent features on the TODO list for the WPF/Silverlight versions of the Web Languages Add-on. Right now our top priority is getting the .NET Languages Add-on automated IntelliPrompt features working. Once those are done we'll be revisiting open items like this.

If you need it in the meantime, our syntax languages are completely extensible. The "Getting Started 11" QuickStart shows how to create an indent provider service that can be set on a language. You could make one for XML and just register it on the XmlSyntaxLanguage.


Actipro Software Support

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

Hi Craig,

Just wanted to follow up and let you know this is in for the next build per this blog post.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.