Windows 7 Exception in WPF Fonts.SystemFontFamilies After Installing KB4055532

by Avatar Bill Henning (Actipro) - 6 comments
Thursday, January 11, 2018 at 12:30pm

The Microsoft .NET Framework January 2018 Security and Quality Rollup that was released on January 9, 2018 contains a big mistake that causes any calls to Fonts.SystemFontFamilies to immediately throw an exception. 

This affects some of our UI control products, many other third party apps, and possibly your own code as well since that API is a commonly-used .NET property.

The problem doesn't seem to occur on Windows 10, but does occur on Windows 7 systems that have installed the rollup.

Symptoms

The exception message that appears is something like:

No FontFamily element found in FontFamilyCollection that matches current OS or greater: Windows7SP1

With stack trace:

at System.Windows.Media.Fonts.get_SystemFontFamilies()

Workaround

The only workaround at the moment until it is fixed by Microsoft appears to be to uninstall the KB4055532 rollup on Windows 7 machines.

We expect this to be resolved by Microsoft quickly since posts about it are popping up all over the Internet:

Update:  Official thread from Microsoft acknowledging it and providing a temporary workaround (thanks Stéphane):

Update 2:  Microsoft appears to have released an updated patch that should resolve the fonts issue.

WPF, UWP, and Silverlight v2017.2 Maintenance Releases

by Avatar Bill Henning (Actipro)
Wednesday, January 10, 2018 at 11:37pm

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.

Charts

Display Optimizations

The line charts have had optimizations in them to try and align to pixel values to reduce anti-aliasing.  While this generally improved readability, when rendering a curve like a sine wave, this can result in some jaggedness of the curve.  We added an option that allows these display optimizations to be turned off for those scenarios.

Docking/MDI

Dock Host Changed Event

A new event is raised whenever a docking window's dock host changes, allowing for knowing when a docking window transitions to a floating state and back.

Dragging Enhancements

The dragging experience for a single tab has been improved.  When dragging a docking window over a nested linked dock site, the Shift key can be used to target the outer dock host.

Interop Improvements

Numerous improvements were made to how InteropFocusTracking handles mouse clicks and focus tracking for interop controls in docking windows.

Dock Guides

Dock guides (when in non-hosted node) can now render outside of the bounds of the target dock host when necessary.  This scenario can occur if the containers in the dock host are small.

Editors

MaskedTextBox Data Binding

A new MatchedText property has been added to MaskedTextBox to allow data binding without any prompt text.

Pointer Double-Clicks

Double-clicking an edit box part now selects the entire part's text.

Color Picker Alpha Component

The ColorPicker's alpha component has been changed to be percentage-based, which is more in line with most applications.

Grids

Key Handling

The ability to customize how Enter keys are handled for various property editor types has been added.

SyntaxEditor

Read-Only Regions

Read-only regions have been enhanced with properties that determine if editing is allowed on their first and/or last edges.

Code Outlining

The code outlining logic has been Improved to better handle mismatched outlining nodes.

JSON Parser

The JSON parser in the Web Languages Add-on has been enhanced with better error handling.

Theme Browser

We've updated the Theme Browser utility in the Sample Browser with a new textbox that allows filtering of resources.

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

SyntaxEditor vNext - Customizing Line Numbers

by Avatar Bill Henning (Actipro)
Tuesday, December 5, 2017 at 5:08pm

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 SyntaxEditor vNext post, we showed some massive improvements in SyntaxEditor touch interaction, including inertia-based touch scrolling and pinch-to-zoom features.  In today's post, we'll examine a new feature area that allows you to customize the line numbers displayed in each view's line number margin.

Default Behavior

By default, a view's line number margin displays the line number (document line index plus one) for each view line.  If a view line is a wrapped line, nothing appears for that view line in the margin.

SyntaxEditorLineNumbersDefault

In vNext, several new features are being added to support customization of the line number display.

Document Fragment Scenario

One scenario where line number customization is appropriate is when you have an enormous file and only want SyntaxEditor to show a fragment of it, such as several thousand lines.  In this scenario, you might make a document with lines 10,000-20,000 in it.  The first line in SyntaxEditor is really line 10,000 in the file, but it normally shows as line #1 in the line number margin.  This can be confusing to the end user.

SyntaxEditorLineNumbersOrigin

A new property on the document class allows you to change the line number origin, which defaults to 1.  For the scenario described above, you'd set it to 10,000 instead.  All line numbers after that origin number will continue to be relative to it.

Advanced Scenarios

What about cases where a language might have specific line numbers or labels that should show for certain view lines?  This is possible too via a new language service that allows for completely customizing the text to display for each view line in the line number margin.

SyntaxEditorLineNumbersCustom

In the screenshot above, we've set the line number margin to show the zero-based offset of each line.  For a couple lines, we've also indicated labels for the namespace and class lines.

Summary

The new custom line numbering features are very easy to use for changing default line number margin content.

Code Writer v3 Released

by Avatar Bill Henning (Actipro)
Friday, December 1, 2017 at 9:21pm

BlogPostBanner-CodeWriter-v3

Reimagined Windows 10 Design

ExplorerSideBar

NewDocumentPopup

CommandPalette

SideBarCollapsed

The app is minimalist in nature, and while it does feature a side bar, the side bar can be collapsed by pressing the unpin button.  This affords a distraction-free environment while you edit text/code.

Code Writer has find/replace functionality, print/share support, advanced editing commands, and a wide array of settings. 

Summary

If you have the Windows 10 Fall Creators Update or later, download Code Writer for free from the Windows Store today to check out v3.0 and all it has to offer.  The new redesign has been a labor of love that has been in development for many months.  We're very pleased to get it out into your hands as a showcase of what you can do with Actipro's Universal Windows Controls.  Enjoy!

Want to get the latest news about Code Writer?  Follow our @CodeWriterApp Twitter account.

Want to chat with us about Code Writer?  Please register to join our Slack workspace and join the #codewriter channel once added.

If you are a Universal Windows app developer, you can download a free evaluation of our Universal Windows Controls to use in your own apps.  Code Writer makes use of our SyntaxEditor, Docking/MDI, PropertyGrid, and Editors controls.  SyntaxEditor is of particular interest because it lets you add advanced code and text editing to your own apps.

TaskWideLearnMore TaskWideWindowsStore

SyntaxEditor vNext - Touch Panning and Zooming

by Avatar Bill Henning (Actipro)
Monday, November 20, 2017 at 9:41pm

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.