-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Description
Removal of deprecated controls
While preparing the support for Windows Forms applications in .NET Core, we've decided to remove a set of controls that are no longer supported and have had replacements since .NET Framework 2.0. These controls will no longer exist in the .NET Core code base and Windows Forms developers should refer to below for the suitable replacements.
The following types are no longer available:
StatusBarStatusBarDrawItemEventArgsStatusBarDrawItemEventHandlerStatusBarPanelStatusBarPanelAutoSizeStatusBarPanelBorderStyleStatusBarPanelClickEventArgsStatusBarPanelClickEventHandlerStatusBarPanelStyle
Version introduced
.NET 5.0 Preview 1
Old behavior
The above controls and types were available.
New behavior
The controls and types are no longer available.
Reason for change
Since after .NET Framework 2, these set of controls have had replacements with updated design and support. This list of controls has been removed from designer toolboxes for some time in favor of their replacements and we have observed customers using these newer controls. In examining what areas of Windows Forms we will bring forward to .NET Core, it was decided that we should not carry forward deprecated APIs like this set in order to maintain support for areas like high DPI, accessibility, and reliability.
Recommended action
Move to the replacement APIs for these controls and their scenarios:
| Old Control (API) | Recommended Replacement | Other associated APIs removed |
|---|---|---|
| StatusBar | StatusStrip | |
| StatusBarPanel | ToolStripStatusLabel |
Category
- Windows Forms
Affected APIs
- https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.statusbar?view=netcore-3.1
- https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.statusbarpanel?view=netcore-3.1
- https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.statusbardrawitemeventargs?view=netcore-3.1
- https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.statusbardrawitemeventhandler?view=netcore-3.1
- https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.statusbarpanelautosize?view=netcore-3.1
- https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.statusbarpanelborderstyle?view=netcore-3.1
- https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.statusbarpanelclickeventargs?view=netcore-3.1
- https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.statusbarpanelclickeventhandler?view=netcore-3.1
- https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.statusbarpanelstyle?view=netcore-3.1
Issue metadata
- Issue type: breaking-change