The Actipro Blog

All the latest UI control development news from Actipro

SyntaxEditor vNext - Touch Panning and Zooming

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.

In the previous post, we discussed how a new text rendering engine was being built that improved rendering speed, and how numerous scrolling improvements have been made.  In today's post, we'll take a look at how some new touch-input features are being added to vNext that take advantage of the rendering engine and scrolling enhancements.

Touch Interaction

In the current version, the UWP SyntaxEditor is the only one that supports touch-based scrolling, and its implementation scrolls in a line-based fashion, making the scroll experience choppy.

In vNext, we wanted to improve this.  As seen in the animation below, we've added touch scrolling support to the WPF, UWP, and WinForms SyntaxEditors, and the scrolling is pixel-smooth.  The scrolling even uses inertia, allowing for flick scrolling!

SyntaxEditorTouch

The WPF and UWP platforms support touch zooming as well, which can also be seen in the animation above.  Simply take two fingers and pinch to zoom.  It all uses smooth animated transitions too.

Summary

Adding improved touch input support is something we've wanted to do for a long time.  We're very pleased with how these features have turned out so far.

SyntaxEditor vNext Is Progressing

BlogPostBanner-SyntaxEditor-DevNotes

We've spent the past three months mostly working on redesigning some of the core implementation of our SyntaxEditor control and wanted to give an update today on where things stand.  From this point forward, we'll call this development effort "SyntaxEditor vNext".

Unified Text Rendering Engine

The first phase of this was described in our previous Building a Better SyntaxEditor Text Rendering Engine post.  What we've done is come up with a common API that can be used for text rendering and is the same across WPF, UWP, and WinForms.  It allows consumers of this text rendering API (namely SyntaxEditor) to have a single way to perform all its core text formatting/rendering, etc. 

This is important because when we have a common API wrapper for performing those difficult and very platform-specific tasks, we are able to consolidate all the code that calls into that API to be more or less platform agnostic.  And that means the WinForms SyntaxEditor will see some huge benefits.  More on that below.

Universal Windows

The new UWP text rendering engine implementation is much, much faster than the current way we render text in the UWP SyntaxEditor.  In fact it might even be rendering faster than the WPF version now!  The new UWP text rendering engine also allows for more culture-sensitive logic involving caret movement, right-to-left text, etc.

Windows Forms

The new WinForms text rendering engine implementation is also faster than before and now supports culture-sensitive logic involving caret movement, right-to-left text, etc. 

WPF

The WPF text rendering engine implementation has always been the most advanced one, and it's getting even better.  It features improved efficiency and handles extremely long lines better.

Getting the WinForms SyntaxEditor on the Common Codebase

Per above, a key benefit of having a common API for text formatting/rendering is to finally make progress on migrating the WinForms SyntaxEditor to share code with the other newer platforms that already share a majority of code.  This would mean that the WinForms version would get all the benefits of the more advanced add-ons found in the WPF version, etc. 

This is huge for WinForms SyntaxEditor customers, and parity with the WPF version is something many customers have asked for.

Refactoring the SyntaxEditor Internals

In more recent weeks, we've been refactoring a lot of SyntaxEditor's internals that are related to views, including view management, splitting, scrolling, etc.  We're building a new internal codebase for those features that works the same across WPF, UWP, and WinForms.  And best of all, we're doing our best to keep the same public API as the current WPF version so that there will be minimal breaking changes.

The refactoring is going well thus far, but it is a long process since we're adding feature areas back in one by one with more efficient code and in numerous cases, with additional features.  Here's some examples of improvements in the scrolling area…

Scrolling Improvements

Scrolling has been improved so that you can easily scroll an editor view to any line and even designate if that line should appear near the top/center/bottom of the view, and how far to pixel offset from that location.  This will be wonderful for features like go to line.

When resizing an editor view that is scrolled to the right, if you now resize it even wider, the view lines will anchor to the right when appropriate to make sure not too much whitespace appears at the right side of the view.  In the current SyntaxEditor implementations, the horizontal scrollbar wouldn't scroll at all in that scenario, leading to a lot of extra blank space on the right side of the view.

When vertically scrolling through documents with various view line widths, the current SyntaxEditor implementations will adjust the horizontal scrollbar maximum mostly based on the visible view lines' maximum width.  The newer implementation tries to remember longer line max widths it's seen in the past and prevents a lot of the horizontal scrollbar maximum jumpiness that can happen when scrolling vertically.

Summary

We're really excited about where things are heading.  Not only are we getting a better internal codebase for managing a lot of view-related features, we're adding features as we go, and are consolidating the WPF, UWP, and WinForms codebases such that they will share 95%+ of the code.  This will allow for language add-on codebases to be shared across all platforms.  And the public SyntaxEditor API changes for the WPF/UWP platforms will be kept to a minimum.

If you have any specific view-oriented features that you'd like to see in SyntaxEditor, now is the time to get your suggestions in. 

We're chatting daily about progress in our Slack workspace and would love for you to discuss SyntaxEditor with us there.

WPF, UWP, and Silverlight v2017.2 Maintenance Releases

BlogPostBanner-2017.2-Maint

Our v2017.2 WPF, Universal Windows, and Silverlight controls have all been updated with new maintenance releases that are now ready for download.  It is highly recommended that you get these new builds since many products received numerous minor enhancements and bug fixes. 

Let's take a quick look at some of the more notable features that were added.

Docking/MDI

The mouse wheel can now scroll document tabs when in an overflow situation and using certain tab overflow behaviors.

Editors

Updated the color pickers such that the end user can tap and drag anywhere in a hue ring or saturation/brightness square to change color attributes, and not just on the thumb.

BrushEditBoxOpened

Added a new drop-down to ColorPicker that allows switching between RGB and HSB text input modes.

ColorEditBoxHsb

Added new features for adding custom inline UI elements within edit boxes, like the "Now" button in the TimeEditBox below.

TimeEditBoxInline

Improved the DateEditBox and TimeEditBox default formats to better support parsing of entered text values that lack part delimiters.

Grids

Added the TreeListViewColumn.SortDirection property and related ColumnSortDirection enumeration that can be used to indicate that a sort glyph should appear in the column header when paired with a custom sorting mechanism.

TreeListViewSortIndicators

Improved TreeListBox to better handle property updates from view-models on other threads.

Improved TreeListBox selection tracking performance.

SyntaxEditor

Improved numerous edit actions to retain their final selection after the action goes through an undo/redo process.

Improved how Tab indenting is handled when there is a block selection.

Improved the Cut Line to Clipboard edit action to support multiple lines.

Improved the .NET Languages Add-on's logic for selecting the best IntelliPrompt parameter info member overload when typing a comma at the end of an argument list.

SyntaxEditorXmlLineCommenter

Improved the XML line commenter in the Web Languages Add-on to comment the entire line text when there is no selection.

Summary

There were also a large number of smaller improvements made throughout the products.  See the announcement posts for the detailed list of enhancements and updates:

TaskDownload TaskBuyNow

Building a Better SyntaxEditor Text Rendering Engine

BlogPostBanner-SyntaxEditor-DevNotes

The past several weeks, we've been prototyping a new core text rendering engine for future use with SyntaxEditor (and possibly other products) that can be used across multiple platforms.  This text rendering API is the same across all supported platforms, which currently are WPF, UWP, and WinForms.  The implementation of that common API is platform-specific behind the scenes since each UI platform supports rendering text in very different ways.

SyntaxEditor would be a consumer of that text rendering API.  By using that text rendering API that is common across platforms, we could consolidate all the SyntaxEditor logic related to text formatting, rendering, and hit testing to be the same.

Platform Benefits

First the UWP version's text rendering implementation in this new engine is lightning fast, and would yield a massive rendering speed increase when merged into the UWP SyntaxEditor, compared to our current way of rendering text in the UWP SyntaxEditor.  It also would be more culture-sensitive with better logic on caret movement, right-to-left text, etc.

The WinForms version's implementation is also fast and compared to the current WinForms SyntaxEditor's way of rendering text, would gain culture sensitivity for caret movement, right-to-left text, etc.  Having a common text rendering API with other platforms would also be a big step in moving the WinForms SyntaxEditor down a path towards using the same general SyntaxEditor API as the other newer UI platforms use.  A future goal is to make this happen so that changes we make to features, add-ons, etc. can flow freely between all the SyntaxEditor platforms.

Finally the WPF version's text rendering is already very fast and culture-sensitive, but there are several logic enhancements we're making to improve speed when rendering long lines.

What's Next

We're still working on everything, but so far, tests in separate projects are very promising for the future of this text rendering API experiment.

Once things are finalized a bit more, we may plug it into one of the platforms like UWP to begin actual usage testing with SyntaxEditor.  This process will take some time since we will have to pull out all the plumbing for the current SyntaxEditor text rendering implementation, and adjust things to work with this new API.  We will give some updates once we make progress on that end.

Filed under: Actipro, In development

WPF, UWP, and Silverlight Controls 2017.2 Released

BlogPostBanner.17.2

We're happy to announce that the 2017.2 versions of our WPF, Universal Windows, and Silverlight controls have been released.  These versions include some new controls, new features, and a lot of minor updates and bug fixes.

See all the details on the 2017.2 releases in the various announcement posts:

SyntaxEditor

Intra-Line Adornments

Full support for intra-line adornments is now included.  These allow whitespace to be reserved above and/or below view lines, and adornments rendered in that space.

CodeLens

A first new sample shows implementation of a Visual Studio-like Code Lens adornment with info display and hyperlink. 

PeekDefinition

A second sample shows a Visual Studio-like Peek Definition (embedded editor) display.  This is accomplished using a second SyntaxEditor within an adornment of the outer SyntaxEditor.

Vertical Scrolling

Vertical scrolling logic has been refactored to better handle view lines of various sizes.

Code Outlining

A couple new code outlining commands have been added: apply default outlining expansion and expand all outlining.

.NET Languages Add-on Roslyn Extensions

A new optional assembly is available that has Roslyn extensions for loading IBinaryAssembly instances that can be referenced by a project assembly, instead of using normal .NET reflection.

.NET Languages Add-on IntelliPrompt

IntelliPrompt completion is now available for object creation expression initializer member names.

ObjectInit

Docking/MDI (WPF/UWP)

Floating Windows

A new property can be data-bound to your VM to float or restore a docking window.  The default location request event allows for specifying that a docking window should open in a floating dock host.  Docking windows that were closed while floating now support more precise restoration later.  Dragging standalone floating docking windows by their tabs now has a better experience.

Contextual Indicators

The read-only contextual indicator for documents now uses a separate display mechanism from the custom contextual indicators, allowing both to show at the same time.

Editors (WPF/UWP)

AutoCompleteBox

A new AutoCompleteBox control has been added that allows text entry and provides suggestions for auto-completion.

AutoCompleteBox

This kind of control is ideal for use in search query and quick launch kinds of scenarios.

DateEditBox

DateEditBoxOpened

Clicking a date on the popup calendar now closes the popup.

Grids (WPF/UWP)

Drag/Drop

The TreeListBox item adapter has been updated with a method that fires when hovering over an item during a drag, allowing you to determine whether it should be expanded.

TreeListBoxDragDrop

New adapter methods have also been added that are called immediately before and after a drag, allowing for custom adornments to be displayed while dragging.

Shared Library (WPF/UWP)

AdvancedTextBlock

A new AdvancedTextBlock control has been added that can show a tooltip when overflowed and can highlight spans of text based on captured text ranges (i.e. filter match results).

TaskDownload TaskBuyNow

WPF Controls v2017.1 Maintenance Release

WPF17.1.0651.BlogPostBanner

The WPF Controls 2017.1 build 651 maintenance release is now available.  This build has a large number of updates and new features for various WPF control products (Docking/MDI, Editors, Grids, Ribbon, SyntaxEditor, Shared Library), and includes bug fixes for all issues that have been found since the original 2017.1 release. 

In addition, the SyntaxEditor .NET Languages Add-on now supports C# 6 and VB 14 syntax, with full automated IntelliPrompt.  The screenshot below shows automated IntelliPrompt working properly with a null-conditional operator.

SyntaxEditorNullConditional

The rather large list of full update details are contained in this forum thread.

TaskDownload TaskBuyNow

Filed under: Actipro, WPF

SyntaxEditor Line Modification Mark Enhancements

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

WPF, UWP, and Silverlight v2016.1 Maintenance Releases

Maintenance16.1.BlogPostBanner

Maintenance releases of our v2016.1 WPF, Universal Windows, and Silverlight controls have been released and are now available for download.

Docking/MDI for WPF and UWP has several new options that give you more control over UI appearance.  Tab text on tabbed MDI tabs will now trim long text with ellipses in the middle, instead of the end, allowing for filenames to be more readable.

SyntaxEditor's completion and parameter info providers in all language add-ons now allow you to intercept OnSessionOpening, even when no items were pre-populated, so that you can add your own custom items/info.  Cut, copy, paste, drag, and drop all now support the block and full line flags that are compatible with Visual Studio.  The Python Language Add-on added a text range property to all type and function definitions, allowing you to implement features like go to definition easier.

The Shared Library added a new RingSpinner control that is an animated ring where the two ring segment ends chase each other around the circle.  It's great for display while performing a lengthy operation.

All products received numerous other minor enhancements and bug fixes.  See the announcement posts for the detailed list of enhancements and updates:

TaskDownload TaskBuyNow

Universal Controls 2016.1 Build 303 Released

Universal-2016.1.0303-BlogPostBanner

Universal Controls 2016.1 build 303 has been released and is now available for download.  This version adds a beta of our Docking/MDI product, making it possible to include docking tool windows and/or a multiple-document interface in your apps for Universal Windows apps. SyntaxEditor also includes two new Metro-themed image sets that can be used.

UniversalDocking640

The Docking/MDI beta included in this version includes nearly all the docking window functionality found in the WPF version of our Docking/MDI controls.  Be sure to check it out and let us know what you think.

See the announcement post for the detailed list of enhancements and updates in this build.

Do you want to chat with us about what we're working on next?  Register to join our Slack team and help guide our future development efforts!

TaskLearnMore TaskDownload TaskBuyNow

WPF Controls 2016.1 Build 631 Released

WPF-16.1.0631-BlogPostBanner

WPF Controls 2016.1 build 631 has been released and is now available for download.  This build contains numerous minor features, updates, and bug fixes across the various WPF control product range. 

It is highly recommended that v2016.1 customers upgrade to this build since it fixes all issues that have been discovered in the major Docking/MDI control updates that were part of the first 2016.1 release.

The first 2016.1 release added new Metro themes that have accent colors, like in the screenshot below.

RibbonQATButtons

The QAT buttons on the upper left of the window were originally wider in Office 2016, matching the width of the system minimize, maximize, and close title bar buttons.  However in the most recent Office 2016 update, the QAT button width was reduced and we've updated their size in this build to match.

See the announcement post for the detailed list of enhancements and updates in this build.

Do you want to chat with us about what we're working on next?  Register to join our Slack team and help guide our future development efforts!

TaskLearnMore TaskDownload TaskBuyNow

Filed under: Actipro, New features, WPF