SyntaxEditor Line Modification Mark Enhancements

by Avatar Bill Henning (Actipro) - 4 comments
Thursday, August 25, 2016 at 6:57pm

PostBannerSyntaxEditorDevNotes

The latest maintenance releases of our v2016.1 WPF, Universal Windows, and Silverlight controls had some major work done on SyntaxEditor's line modification marks feature.  In fact, its internal logic was completely rewritten and improved.

Overview

Line modification marks use colored bars in the selection margin to tell the end user whether changes have occurred on the line, and whether those changes have been saved.

This animation shows this feature in action:

SyntaxEditorLineModificationMarks

New changes will turn the marks yellow to reflect that those lines are “dirty” (unsaved).  If you then "save" the document (which I do above after typing on two lines), the marks turn green to indicate they are now saved.

While the yellow and green marks were present in older versions, there were some bugs that could occur with their tracking over the course of multiple text changes.  Those bugs have been fixed in this latest maintenance release.

In addition we also have added orange marks, that occur when you undo past the save point.  They show anything that is different from what was saved but is not different from the document when it was originally opened.

Summary

These great new features match exactly with what is in Visual Studio and are wonderful for end users.  Grab the latest 2016.1 builds to add them to your own apps!

TaskDownload 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

Comments (4)

Posted 3 years ago by Daniil Monin
Avatar
Nice. Is MVVM supported?
Posted 3 years ago by Bill Henning (Actipro) - Actipro Software LLC
Avatar
Hi Daniil, Could you clarify your question? I'm not sure how MVVM would be involved with line modification marks.
Posted 3 years ago by Daniil Monin
Avatar
I mean those marks will be work if IsTextDataBindingEnabled equals true? IsTextDataBindingEnabled="True" Text="{Binding Path=Text, Mode=TwoWay}"
Posted 3 years ago by Bill Henning (Actipro) - Actipro Software LLC
Avatar
While they will likely work as long as you only edit on the SyntaxEditor side of the binding, as soon as the binding pushes a value back through to SyntaxEditor from the VM side, it will make SyntaxEditor think that a new document was set and all the marks will disappear. That is because binding values coming back to SyntaxEditor replace the entire document text and don't tell us individual changed ranges. Unfortunately there's not really anything we can do in that scenario.

Add Comment

Please log in to a validated account to post comments.