SyntaxEditor vNext Multiple Caret/Selection Progress

by Avatar Bill Henning (Actipro) - 3 comments
Wednesday, July 18, 2018 at 3:56pm

BlogPostBanner-SyntaxEditor-DevNotes

As mentioned in a previous post, we have been working on refactoring the core internal implementation of our SyntaxEditor code editor control on the WPF, UWP, and WinForms platforms.  This effort is being made to bring all three platforms onto the same codebase for easier updating moving forward, and to enhance features wherever possible.

We are continuing development on our SyntaxEditor control, adding many modern features under a unified API design.  One enormous feature area getting added is multiple carets/selections.  We briefly proposed adding this feature several months ago in this blog post to gather feedback.

Now that we've had time to iterate on development of it, I wanted to share a demo so you can see how it works.

Multiple Carets/Selections Demo

In this screen capture animation, we show how SyntaxEditor vNext will support multiple carets/selections.

2018-07-18_11-41-52

I first select a word using my mouse and click/dragging like normal.  Then I select text under it while holding the Ctrl key and click/dragging.  Afterward I notice I accidentally selected too many characters.  I hold Ctrl and click the second selection to collapse it.  Then I hold Ctrl and click/drag to make the correct selection.

Next I hold Ctrl and click in another word to add a third caret.  I remove that same third caret by Ctrl+clicking on it again.  This is a nice feature for when you accidentally add a caret/selection you didn't mean to add.

Finally, edit actions like typing will affect all selections.  You can see in the animation how typing "Foo" affects the two selections.  Pressing Ctrl+Z for undo applies to all the selections.

Summary

Adding multiple caret/selection support is a massive feature area that touches many portions of the product.  While it's taken a while to implement, we're very pleased with the progress thus far and think it will really be exciting for end users.

Let us know what you think of this feature area in the comments.

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

Comments (3)

Posted 6 years ago by (Anonymous)
Avatar
Outstanding! Can't wait to try it out myself. First question I had in mind is how is this supposed to work with keyboard selection where the user uses CTRL+arrow keys
Posted 6 years ago by Bill Henning (Actipro) - Actipro Software LLC
Avatar
Hi Sebastian, Ctrl+Left/Right moves the caret to the previous/next word start, and even works with multiple selection! It will retain the multiple selections and move them to their next previous/word start. The selections will merge if there is a collision.
Posted 6 years ago by Stisen - Denmark
Avatar
Nice feature! And thanks for sharing insights on the development. Looking forward to the release :)

Add Comment

Please log in to a validated account to post comments.