Lire en anglais Modifier

Partager via


What's new in Windows Forms

Each .NET release introduces a new version of Windows Forms (WinForms). This article gives you a summery of what's new in each release.

.NET 10 Preview

This section describes the main changes to WinForms for each .NET 10 Preview.

.NET 9

WinForms in .NET 9 introduces several modern improvements. The asynchronous forms functionality provides APIs to help run UI-related operations asynchronously, making it easier to integrate with contemporary asynchronous programming patterns. The removal of BinaryFormatter eliminates a long-standing security risk by preventing unsafe deserialization practices. Additionally, experimental dark mode support has been added, allowing applications to adapt their color schemes to better suit dark environments.

.NET 8

In .NET 8, Windows Forms has again enhanced DPI support, notably through Visual Studio DPI improvements. This enhancement allows the Windows Designer to run in a DPI-unaware mode independently from Visual Studio, ensuring that your app’s design remains sharp while Visual Studio itself stays at its native DPI setting. Another key focus area was data binding improvements and button commands.

.NET 7

In .NET 7, significant improvements have been made to High DPI rendering. These enhancements ensure that nested controls, such as buttons within panels on tab pages, scale correctly according to the current monitor's DPI settings. This feature, which is opt-in for .NET 7, will be enabled by default in .NET 8.

.NET 6

The focus of .NET 5 for WinForms included updated templates for C# that use global directives, file-scoped namespaces, and nullable reference types. A new application bootstrap was introduced, which simplifies the configuration of Windows Forms applications by using the ApplicationConfiguration.Initialize method.

.NET 5

The focus of .NET 5 for WinForms was to introduce enhanced features, new controls, and improved existing controls.

Remarque : L’auteur a créé cet article avec l’aide de l’IA. En savoir plus