The Actipro Blog

All the latest UI control development news from Actipro

SyntaxEditor - Move Selected Lines Up/Down

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

Pingbacks and trackbacks (1)+

Comments are closed