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

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube