SyntaxEditor .NET Languages Add-on - VB Text Formatter

by Avatar Bill Henning (Actipro)
Wednesday, January 30, 2013 at 8:24pm

BlogPostBanner

Today I'd like to show off another new feature coming to the WPF and Silverlight .NET Languages Add-on:  Visual Basic text formatting!

As mentioned in our previous post, a similar feature is being added for the C# language.  Text formatters beautify code, making it more readable by adjusting whitespace.

Visual Basic Text Formatting Example

Let's see an example of some messy VB code loaded up in SyntaxEditor:

VB1

After formatting the document, the result is:

VB2

That's much nicer!

Intelligent Modifications

As described in a previous post, the best part about the text formatting feature is that SyntaxEditor only adjusts ranges it needs to.  It doesn't do a mass replace of the whole document.  For instance on line 23, it tweaks the leading whitespace on the line and removes the space before the end parenthesis, but doesn't touch the rest of the line.

All of the various text change operations involved in the formatting are merged into a single atomic text change that is added as a single undo stack item.  This makes it easy for the end user to quickly undo any formatting changes that were made.

Summary

These features will be in the 2013.1 versions of the WPF and Silverlight SyntaxEditor .NET Languages Add-on.

TaskDownload TaskLiveDemo TaskBuyNow

SyntaxEditor .NET Languages Add-on - C# Text Formatter

by Avatar Bill Henning (Actipro)
Wednesday, January 23, 2013 at 11:07am

BlogPostBanner

Today I'd like to show off a new feature coming to the WPF and Silverlight .NET Languages Add-on:  C# text formatting!

Text formatters beautify code, making it more readable by adjusting whitespace.

C# Text Formatting Example

Let's see an example.  Here is some messy C# code loaded up in SyntaxEditor:

CSharpFormatter1

When we format the document, the result is:

CSharpFormatter2

That's a lot more readable!  The text formatter also has an option for whether open curly braces appear on the same or next line.

Intelligent Modifications

The best part about this feature is that SyntaxEditor only adjusts ranges it needs to.  It doesn't do a mass replace of the whole document.  For instance on line 7, it does a tweak of the leading whitespace on the line but doesn't touch the rest of the line.

All of the various text change operations involved in the formatting are merged into a single atomic text change that is added as a single undo stack item.  This makes it easy for the end user to quickly undo any formatting changes that were made.

Summary

These features will be in the 2013.1 versions of the WPF and Silverlight SyntaxEditor .NET Languages Add-on.

TaskDownload TaskLiveDemo TaskBuyNow

New Maintenance Releases of WPF/Silverlight Controls

by Avatar Bill Henning (Actipro)
Monday, January 14, 2013 at 1:15pm

We just published new maintenance release of both the WPF and Silverlight controls.  These new builds fix a SyntaxEditor problem that we introduced in the previous maintenance release, and also have several other minor SyntaxEditor tweaks and fixes in them.

Update details are described here:

We recommend that you get these latest v2012.2 maintenance releases.

SyntaxEditor .NET Languages Add-on Var and Dim Quick Info

by Avatar Bill Henning (Actipro)
Tuesday, January 8, 2013 at 2:00pm

BlogPostBanner

We're working on new features for our 2013.1 control releases and today I'd like to show off a new feature coming to the WPF and Silverlight .NET Languages Add-on in that version.

C# Var Quick Info

As seen in the screenshot below, hovering over var keywords will now show the resolved type.

CSharp

In this case, the resolved type for the randomNumbers variable is List<int>, which we aliased to Int32List above in the usings.

Visual Basic Dim Quick Info

Similar features have been added for the Dim keyword in VB.

VB

In this screenshot, the j variable is being assigned an Int32.

Summary

These features will be in the 2013.1 versions of the WPF and Silverlight SyntaxEditor .NET Languages Add-on.

TaskDownload TaskLiveDemo TaskBuyNow

Our Code Writer App Is Live In The Windows Store

by Avatar Bill Henning (Actipro) - 1 comment
Wednesday, December 12, 2012 at 10:16am

BlogPostBanner

In a previous post we took a look at our SyntaxEditor syntax-highlighting code editor control being run in a WinRT/XAML app on a Surface RT.  This port of SyntaxEditor from our WPF/Silverlight versions is still work in progress and isn't available for sale yet, but rest assured it's coming.  That being said, let's dig into the new Code Writer app that was just released on the Windows Store, which shows the future SyntaxEditor for WinRT/XAML control in action.

What is Code Writer?

Code Writer is a free text and code editing application designed specifically for Windows 8 devices.  It runs on any device, including desktops and ARM devices like Surface RT.

We've built it from the ground up to be fast, fluid, and powerful. Active syntax highlighting updates as you edit files, with 20 file types supported.

TabbedDocumentInterface

Multiple documents may be opened at a time. Use an intuitive tabbed document interface from a slide-down app bar to switch between documents. Browse to open any accessible document, or reopen recently-opened documents with a tap.

AddDocument

Color is used pervasively throughout the app to create a bond between you and various file types.

Summary

This is just a first glimpse.  Jump over to the Windows Store and try it for yourself.  If you have any suggestions or problems, please post them in the dedicated forum for the app.

We'll dig into more features soon.  And if you would like to add similar code editing features to your own apps, please check out our SyntaxEditor control, currently available for WPF, Silverlight, and WinForms.  As mentioned above, it will be available for WinRT/XAML in the future too.

Happy coding!

TaskWideLearnMore TaskWideWindowsStore