WPF Controls v22.1.1 Maintenance Release

by Avatar Bill Henning (Actipro)
Tuesday, March 15, 2022 at 6:30pm

This version adds several exciting new features for SyntaxEditor, along with making numerous improvements to the control and its add-ons.  Other minor updates are made to Docking/MDI, Editors, Grids, Ribbon, Shell, and Themes.  Finally, Visual Studio 2022 designer support has been improved.

See the related announcement post for the detailed list of enhancements and updates.

Download Buy Now

Here's a look at some of the new features.

SyntaxEditor

File Comparison Sample

Many customers have asked how two SyntaxEditor instances could be configured to work side-by-side for comparing files. We've included a new QuickStart that demonstrates comparing two files and highlighting differences in both editors. 

The new sample showing how to use SyntaxEditor to implement file comparisons

Differences are updated in real-time as a file is edited. Our sample is built using simple interfaces to represent the file differences so that any difference engine could easily be adapted to work with the sample.

Column Guides

Use the new column guides feature to designate where line breaks should occur within a file to stay within any readability guidelines your company may have.  For instance, a column guide might be set at column 80 or 120.

An example of editing COBOL code

Other syntax languages like COBOL may also require that certain data is at certain character positions and column guides provide a visual way to ensure code is positioned properly.

IntelliPrompt Completion Performance

We've done some more tuning in the completion item matching logic to squeeze out some additional performance gains.

WinForms Controls v22.1.1 Maintenance Release

by Avatar Bill Henning (Actipro)
Monday, March 14, 2022 at 7:54pm

This version adds several exciting new features for SyntaxEditor, along with making numerous improvements to the control and its add-ons.

See the related announcement post for the detailed list of enhancements and updates.

Download Buy Now

Here's a look at some of the new features.

SyntaxEditor

File Comparison Sample

Many customers have asked how two SyntaxEditor instances could be configured to work side-by-side for comparing files. We've included a new QuickStart that demonstrates comparing two files and highlighting differences in both editors. 

The new sample showing how to use SyntaxEditor to implement file comparisons

Differences are updated in real-time as a file is edited. Our sample is built using simple interfaces to represent the file differences so that any difference engine could easily be adapted to work with the sample.

Column Guides

Use the new column guides feature to designate where line breaks should occur within a file to stay within any readability guidelines your company may have.  For instance, a column guide might be set at column 80 or 120.

An example of editing COBOL code

Other syntax languages like COBOL may also require that certain data is at certain character positions and column guides provide a visual way to ensure code is positioned properly.

IntelliPrompt Completion Performance

We've done some more tuning in the completion item matching logic to squeeze out some additional performance gains.

UWP Controls 2019.1 Released

by Avatar Bill Henning (Actipro)
Thursday, August 22, 2019 at 12:09pm

We are pleased to announce the release of the 2019.1 version of our UWP Controls.  This version includes the massive SyntaxEditor enhancements and updates we’ve been working on that have previously been described as “SyntaxEditor vNext” in the blog.

This announcement post contains the detailed list of updates in the 2019.1 version.  Please be aware that Windows 10 Fall Creators Update (version 1709) or later and usage of the Microsoft's free 'Win2D.uwp' NuGet package are now required.

We also have published a maintenance release for the 2018.1 version.  All of the updates are listed in this announcement post, and are included in the 2019.1 version codebase as well.

Download Buy Now

Let’s dig in and see a handful of the larger SyntaxEditor updates.

Cross-Platform Design

The internals of SyntaxEditor have been heavily refactored to support a cross-platform API across the WPF, UWP, and WinForms platforms. This allows SyntaxEditor features for the three platforms to be kept in sync moving forward.  The 2019.1 WPF version of SyntaxEditor is already out and the WinForms version will follow later this year.

Text Rendering

Text rendering is many times faster than in the previous versions, making an enormous leap forward in performance.

Text rendering now properly handles cultural editing concepts like complex glyphs, bi-directional text, etc.

Carets and Selection

Multiple Selections

Editing with multiple carets

Multiple selections, each with their own caret, are now supported. A new selection can be added by holding the Ctrl key when clicking in the text area or clicking on the selection or line number margins.  Most edit actions have been refactored to fully support multiple selections. For instance, pressing Shift+Right Arrow will extend all of the selections by one character. 

Typing and copy/paste with multiple selections

Copying text from multiple selections unions the selected text, joining each range's text with a line terminator.  Pasting multi-line text into a view with the same number of selections as text lines being pasted will replace each selection with a related line from the pasted text.

Caret Movement

Carets now support movement at both the start and end of word wrapped lines.

The caret in virtual space past the end of a line

Virtual space is now supported at the end of lines when a new option is enabled.  Block selections can be made in virtual space at the end of lines, even without line end virtual space being enabled. This prevents the caret from snapping to an offset when making a block selection, which can sometimes be problematic.

Drag/Drop

Text drag and drop support has been added, allowing text to be quickly moved around the editor.

Search Overlay Pane

A new search overlay pane displays over the upper-right of the active editor view when Ctrl+F (find mode) or Ctrl+H (replace mode) are pressed in a multi-line editor.  A toggle mode button on the search overlay pane switches between find and replace modes, and all common search options are supported via toggle buttons and other controls.  The search overlay pane can be closed by clicking the X button or by pressing Esc.

Basic find and replace operations are available in the search overlay pane

Ctrl+F3 will open the search overlay pane without focusing it, and will search forward for the currently-selected text. Ctrl+Shift+F3 will do the same but will search backwards.

F3 will search for the next match of the previously-used search options. Shift+F3 will search for the previous match of the previously-used search options.

If the SyntaxEditor.IsSearchResultHighlightingEnabled property is true, the search results can be highlighted while the search overlay pane is open. Closing the search overlay pane, clears the search result highlights.

IntelliPrompt

Vector Images

All Metro images are vector-based and show crisply in high DPI

The Metro Light and Metro Dark common image sets are now in vector form and render beautifully in high DPI.

Completion Filters

Completion filter buttons can narrow down the items in the list, such as all .NET types

Completion filters have been updated so when there are multiple active filters with the same ICompletionFilter.GroupName, any one of those filters can includes an item.  Toggle button completion filters were changed to appear unchecked when they aren't active, which is more natural.

Ctrl Key Opacity Changes

The logic for making IntelliPrompt popups and the new search overlay pane semi-transparent when the Ctrl key is held has been refactored and improved.  A brief delay was added before the opacity change occurs.

Splitting

Splitting the editor to show two stacked views is now possible.

Splitting a view, and the new option to drag to the bottom to keep the top view

The view splitter can be dragged to the bottom of the view to remove the split and keep the top view.

Scrolling and Zooming

Touch Scrolling

Smooth inertia-based touch scrolling has been added.

Auto ScrollBar Visibility

The horizontal and vertical scrollbars now support an Auto visibility option that will only display then when necessary.

Horizontal Scrolling

Editor views can be scrolled horizontally with Shift+MouseWheel

Better logic was implemented for managing horizontal scroll maximums, especially when scrolling vertically.

ScrollBar Acceleration

The vertical scrollbar accelerates its scrolling speed the longer you hold the up or down button.

Scroll API

New programmatic scroll methods were added that allow for aligning an anchor line to the top/center/bottom of a view with a specified pixel displacement, or scrolling by pixels.

Margins

Line Number Customization

A new line number provider language service was added that allows for complete customization of how line numbers are rendered in the line number margin.  In addition, a property was added to the document that sets the line number for the first line in the document, defaulting to one.

Ruler Margin

A new optional ruler margin has been added.

Indicator Glyphs

The rendering of built-in indicator glyphs was improved.

TextStylePreview Control

The TextStylePreview control has been added that renders a highlighting style.

.NET Languages Add-on

IntelliPrompt completion list toggle button filters were added for the various kinds of items displayed in the list.  The IntelliPrompt completion filter UI (toggle buttons and tabs) only shows based on the available items in the unfiltered list. For instance, if there are no types in the list, no 'Types' toggle button filter is visible.

Python Language Add-on

IntelliPrompt completion list toggle button filters were added for the various kinds of items displayed in the list.  The IntelliPrompt completion filter UI (toggle buttons and tabs) only shows based on the available items in the unfiltered list. For instance, if there are no classes in the list, no 'Classes' toggle button filter is visible.

Web Languages Add-on

Full XML schema support, including validation and automated IntelliPrompt, has been added to the XML syntax language.

WPF Controls 2019.1 Released

by Avatar Bill Henning (Actipro)
Wednesday, May 29, 2019 at 4:25pm

We are pleased to announce the release of the 2019.1 version of our WPF Controls.  This version includes the massive SyntaxEditor enhancements and updates we’ve been working on that have previously been described as “SyntaxEditor vNext” in the blog.

This announcement post contains the detailed list of updates.

Download Buy Now

Let’s dig in and see a handful of the larger SyntaxEditor updates.

Cross-Platform Design

The internals of SyntaxEditor have been heavily refactored to support a cross-platform API across the WPF, UWP, and WinForms platforms. This allows SyntaxEditor features for the three platforms to be kept in sync moving forward.  The 2019.1 UWP and WinForms versions of SyntaxEditor will follow later this year.

Carets and Selection

Multiple Selections

Editing with multiple carets

Multiple selections, each with their own caret, are now supported. A new selection can be added by holding the Ctrl key when clicking in the text area or clicking on the selection or line number margins.  Most edit actions have been refactored to fully support multiple selections. For instance, pressing Shift+Right Arrow will extend all of the selections by one character. 

Typing and copy/paste with multiple selections

Copying text from multiple selections unions the selected text, joining each range's text with a line terminator.  Pasting multi-line text into a view with the same number of selections as text lines being pasted will replace each selection with a related line from the pasted text.

Touch Selection Grippers

Selection grippers displayed for touch-based selection

Selection grippers will show for the primary selection when touch input is used.

Caret Movement

Carets now support movement at both the start and end of word wrapped lines.

The caret in virtual space past the end of a line

Virtual space is now supported at the end of lines when a new option is enabled.  Block selections can be made in virtual space at the end of lines, even without line end virtual space being enabled. This prevents the caret from snapping to an offset when making a block selection, which can sometimes be problematic.

Search Overlay Pane

A new search overlay pane displays over the upper-right of the active editor view when Ctrl+F (find mode) or Ctrl+H (replace mode) are pressed in a multi-line editor.  A toggle mode button on the search overlay pane switches between find and replace modes, and all common search options are supported via toggle buttons and other controls.  The search overlay pane can be closed by clicking the X button or by pressing Esc.

Basic find and replace operations are available in the search overlay pane

Ctrl+F3 will open the search overlay pane without focusing it, and will search forward for the currently-selected text. Ctrl+Shift+F3 will do the same but will search backwards.

F3 will search for the next match of the previously-used search options. Shift+F3 will search for the previous match of the previously-used search options.

If the SyntaxEditor.IsSearchResultHighlightingEnabled property is true, the search results can be highlighted while the search overlay pane is open. Closing the search overlay pane, clears the search result highlights.

IntelliPrompt

Vector Images

All Metro images are vector-based and show crisply in high DPI

The Metro Light and Metro Dark common image sets are now in vector form and render beautifully in high DPI.

Completion Filters

Completion filter buttons can narrow down the items in the list, such as all .NET types

Completion filters have been updated so when there are multiple active filters with the same ICompletionFilter.GroupName, any one of those filters can includes an item.  Toggle button completion filters were changed to appear unchecked when they aren't active, which is more natural.

Ctrl Key Opacity Changes

The logic for making IntelliPrompt popups and the new search overlay pane semi-transparent when the Ctrl key is held has been refactored and improved.  A brief delay was added before the opacity change occurs.

Splitting

The scrollbar splitter button now has a larger appearance.

Splitting a view, and the new option to drag to the bottom to keep the top view

The view splitter can be dragged to the bottom of the view to remove the split and keep the top view.

Scrolling and Zooming

Touch Scrolling

Smooth inertia-based touch scrolling has been added.

Auto ScrollBar Visibility

In Auto mode, the horizontal scrollbar is hidden since no horizontal scrolling is possible

The horizontal and vertical scrollbars now support an Auto visibility option that will only display then when necessary.

Horizontal Scrolling

Editor views can be scrolled horizontally with Shift+MouseWheel

Better logic was implemented for managing horizontal scroll maximums, especially when scrolling vertically.

Scroll API

New programmatic scroll methods were added that allow for aligning an anchor line to the top/center/bottom of a view with a specified pixel displacement, or scrolling by pixels.

Margins

Line Number Customization

The first view line renders with line number 121 due to a custom origin number set on the document

A new line number provider language service was added that allows for complete customization of how line numbers are rendered in the line number margin.  In addition, a property was added to the document that sets the line number for the first line in the document, defaulting to one.

Indicator Glyphs

The rendering of built-in indicator glyphs was improved.

Text Rendering

The text rendering of long lines was improved.

.NET Languages Add-on

IntelliPrompt completion list toggle button filters were added for the various kinds of items displayed in the list.  The IntelliPrompt completion filter UI (toggle buttons and tabs) only shows based on the available items in the unfiltered list. For instance, if there are no types in the list, no 'Types' toggle button filter is visible.

Roslyn Add-on

The optional Roslyn add-on was updated to use Roslyn v3.0.0.

Python Language Add-on

IntelliPrompt completion list toggle button filters were added for the various kinds of items displayed in the list.  The IntelliPrompt completion filter UI (toggle buttons and tabs) only shows based on the available items in the unfiltered list. For instance, if there are no classes in the list, no 'Classes' toggle button filter is visible.

ANTLR Add-on

The ANTLR add-on was updated to use ANTLR v3.5.1.

Irony Add-on

The Irony add-on was updated to use Irony v1.1.

SyntaxEditor - ASP-Style Server Tags with IntelliPrompt

by Avatar Bill Henning (Actipro)
Friday, February 13, 2015 at 1:25pm

PostBannerSyntaxEditorDevNotes

We've had a lot of customers throughout the years ask us for a sample that could show how to harness our SyntaxEditor .NET Languages Add-on and its automated IntelliPrompt within an ASP-style server tag context.  This is especially useful for any sort of template generating scenario.

We had an internal sample that we would send customers upon request, but several months back, we cleaned it up, enhanced it, and added it as a new QuickStart sample.  In this post, let's have a look at the QuickStart sample that was added to the SyntaxEditor for (WPF, Silverlight, and WinRT/XAML platforms) in the 2014.2 version showing how to achieve automated IntelliPrompt within ASP-style server tags.

Usage Example

In the animated presentation below, you can see how there is a basic parent language whose lexer only knows to tokenize and color the word "date" as a keyword.  In real-world usage, the lexer could be made to fully colorize the text like normal.  The lexer has hooks that cause a transition to the C# language found in our .NET Languages Add-on when ASP-style delimiters are encountered.

SyntaxEditorServerTags

Both <% %> and <%= %> style tags are shown in this example.  What happens behind the scenes is that the parent language's parser will code generate C# code.  It will make a C# class named "__Generated" and a method named "__WriteOutput".  All the text of the parent language is output within "Response.Write" method calls.  C# code in the server tags is injected directly.  The resulting full C# code is placed in a separate in-memory document and parsed.  Finally the resulting parse data is returned, along with mapping data to know how offsets between the server tag range in the source document and those in the parsed C# document align.

Then there are several customized C# IntelliPrompt providers that know how to use that mapping data and translate offsets so that automated IntelliPrompt is fully functional within the server tag regions of the main source document, yet based on the generated C# code.

Tricky stuff, but it works great!

Summary

The full source sample described above was added in the first v2014.2 release of our WPF, Silverlight, and WinRT/XAML controls and is available for you to check out.

TaskDownload TaskLiveDemo TaskBuyNow