SyntaxEditor Quote Delimiter Auto-Completion

by Avatar Bill Henning (Actipro)
Wednesday, October 15, 2014 at 3:18pm

PostBannerSyntaxEditorDevNotes

In today's post I'd like to show off another new feature that was added to SyntaxEditor (WPF, Silverlight, and WinRT/XAML platforms) in its 2014.2 version: quote delimiter auto-completion.

Quote Delimiter Auto-Completion

SyntaxEditor already had some great delimiter-related features like delimiter highlighting and delimiter auto-completion for curly braces, square braces, and parentheses.  These have been in the product for a while. 

We had a number of customers also request that support for quote auto-completion be added to assist with working with strings, and that's what's been added.  Quote auto-completion support is now built into the DelimiterAutoCompleter class, with double quote completion enabled by default.  Single quote completion can be activated as well but is not enabled by default since some languages use single quotes as single line comment delimiters.

Let's see it in action!  Here we are using our new Python add-on language to start typing an author designation:

QuoteCompletion1

Next I type a double quote character:

QuoteCompletion2

The end double quote is auto-inserted, but after the caret.  This allows me to type the string content directly in without having to use arrow keys.

QuoteCompletion3

Now that I've typed in the string content, I type the double quote again.  SyntaxEditor knows that it's the quote that was recently auto-completed, so it effectively overwrites the existing quote instead of adding another double quote.  The caret ends up after the string, as expected.

QuoteCompletion4

Summary

The quote delimiter auto-completion features were added in the 2014.2 version of our WPF, Silverlight, and WinRT/XAML controls.

They also have been pre-configured to automatically work in these premium SyntaxEditor add-on languages: C#, VB, Python, JavaScript, and JSON.  They can easily be added to your own custom languages as well.

TaskDownload TaskLiveDemo TaskBuyNow

Actipro's WPF Controls

Over 100 UI controls for building beautiful Windows Presentation Foundation desktop apps.

Learn More

Over 100 UI controls for building beautiful Windows Presentation Foundation desktop apps.

Includes editors, docking windows, MDI, property grids, charts, tree controls, ribbons, gauges, themes, and much more.

Learn More Download Free Trial

Add Comment

Please log in to a validated account to post comments.