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

  • New 'Visual Studio Hub' 1-Stop-Shop for GitHub Copilot Resources, More

    Unsurprisingly, GitHub Copilot resources are front-and-center in Microsoft's new Visual Studio Hub, a one-stop-shop for all things concerning your favorite IDE.

  • Mastering Blazor Authentication and Authorization

    At the Visual Studio Live! @ Microsoft HQ developer conference set for August, Rockford Lhotka will explain the ins and outs of authentication across Blazor Server, WebAssembly, and .NET MAUI Hybrid apps, and show how to use identity and claims to customize application behavior through fine-grained authorization.

  • Linear Support Vector Regression from Scratch Using C# with Evolutionary Training

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the linear support vector regression (linear SVR) technique, where the goal is to predict a single numeric value. A linear SVR model uses an unusual error/loss function and cannot be trained using standard simple techniques, and so evolutionary optimization training is used.

  • Low-Code Report Says AI Will Enhance, Not Replace DIY Dev Tools

    Along with replacing software developers and possibly killing humanity, advanced AI is seen by many as a death knell for the do-it-yourself, low-code/no-code tooling industry, but a new report belies that notion.

  • Vibe Coding with Latest Visual Studio Preview

    Microsoft's latest Visual Studio preview facilitates "vibe coding," where developers mainly use GitHub Copilot AI to do all the programming in accordance with spoken or typed instructions.

Subscribe on YouTube