News

New Release: .NET Framework 4.7

With the impending release of Windows 10 Creators Update, there's a new version 4.7 of the .NET Framework that has High DPI support for Windows Forms applications, touch support for WPF applications, and enhanced cryptography support.

Precipitated by the release of the upcoming Windows 10 Creators Update on April 11, the .NET Engineering team has released a new version of the .NET Framework, dubbed version 4.7. Besides performance and reliability improvements, this version takes advantage of Windows 10, with High DPI support for Windows Forms applications, touch support for WPF applications, and enhanced cryptography support.

Windows 10's support for high DPI devices means that .NET Framework has to be reconfigured to so that it can render Windows Forms apps at higher DPI, from icons to glyphs and from layouts and even when moving apps across a variety of DPIs of monitors and devices. The changes in this version aren't complete, as noted in a blog from Microsoft Program Manager Rich Lander. "We intend to make Windows Forms more High DPI friendly in future releases," he said. "The current changes do not cover every single control and provide a good experience up to 300% scaling factor."

Besides being High DPI aware, .NET Framework has to also be System DPI-aware. So several controls can be made System DPI aware: calendar, exception dialog box, checked list box, menu tool strip and anchor layout. Lander notes that these controls need to be configured to be update to .NET Framework 4.7 in order to be System DPI aware.

Lander also said that .NET Framework 4.7 also has support for Dynamic DPI. After an app is launched on one device, for example, an app might have to respond dynamically if it's moved to another monitor that sports a different DPI. Lander said that to do this, three new events have been exposed to help: Control.OnDpiChangedBeforeParent, Control.OnDpiChangedAfterParent, and Form.DpiChanged.

The changes aren't automatic, and those who want to take advantage of the DPI features will have to explicitly target .NET Framework 4.7. "You must target and (re)compile your application with .NET Framework 4.7, not just run on it>' said Lander. "Applications that run on the .NET Framework 4.7 but target .NET Framework 4.5 or 4.6, for example, will not get the new improvements. Updating an the app.config file of an existing application will not work (re-compilation is necessary)." His blog provides a sample app.config file for trying out the new DPI support features.

About the Author

Michael Domingo is a long-time software publishing veteran, having started up and managed several developer publications for the Clipper compiler, Microsoft Access, and Visual Basic. He's also managed IT pubs for 1105 Media, including Microsoft Certified Professional Magazine and Virtualization Review before landing his current gig as Visual Studio Magazine Editor in Chief. Besides his publishing life, he's a professional photographer, whose work can be found by Googling domingophoto.

comments powered by Disqus

Featured

Subscribe on YouTube