SyntaxEditor - Move Selected Lines Up/Down

by Avatar Bill Henning (Actipro)
Monday, April 6, 2015 at 7:00pm

PostBannerSyntaxEditorDevNotes

In today's post I'd like to show a new feature that was recently added to SyntaxEditor (WPF, Silverlight, and WinRT/XAML platforms): move selected lines up or down.

Feature Description

Moving a range of selected lines from one place to another is a very common task in any text editor.  Of course this can be accomplished by cutting and pasting the selection around.  But for small adjustments to the location of several lines, the ability to simply move the lines is a valued feature.

We've added the ability to move selected lines up and down via the Alt+Up and Alt+Down keys respectively.  Let's see a couple examples of it in action.

MoveSelectedLinesUpDown

In this sample, I selected the lines that contain the AnotherMethod method.  Then I pressed Alt+Up several times to move the method above the Bar method.  I then pressed Alt+Down to move the lines back down to their original position.

MoveSelectedLinesUpDown2

In this second sample, I had a comment that wasn't in the right place and I wanted to move it up.  I just put the caret on the line and pressed Alt+Up a couple times to move it back to the right spot above the color property declaration.

Summary

The ability to move selected lines up and down is a real productivity enhancer when doing text editing.

The features described above are available in our latest WPF, Silverlight, and WinRT/XAML control versions and are available for use.

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.