Skip to content

Commit a18845e

Browse files
authored
Merge pull request #2088 from dotnet/main
Publish for P4
2 parents e937b85 + 971b35e commit a18845e

File tree

2 files changed

+80
-6
lines changed

2 files changed

+80
-6
lines changed

dotnet-desktop-guide/winforms/whats-new/net100.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@ title: What's new in WinForms for .NET 10 Preview
33
description: Learn about what's new in Windows Forms for .NET 10 Preview. New versions of Windows Forms are released yearly with .NET.
44
ms.topic: whats-new
55
ms.service: dotnet-desktop
6-
ms.date: 04/09/2025
6+
ms.date: 05/12/2025
77
#customer intent: As a developer, I want to know what's changed so that I can remain up-to-date.
88
---
99

1010
# What's new in Windows Forms for .NET 10 Preview
1111

1212
This article provides a high-level overview about what's new with Windows Forms (WinForms) in .NET 10 Preview. For detailed information, see the [release announcements](#release-announcements).
1313

14-
.NET 10 Preview 3 was released in April 2025.
14+
.NET 10 Preview 4 was released in May 2025.
1515

1616
## Release announcements
1717

18+
- [.NET 10 Preview 4](https://aka.ms/dotnet/10/preview4)
1819
- [.NET 10 Preview 3](https://aka.ms/dotnet/10/preview3)
1920
- [.NET 10 Preview 2](https://aka.ms/dotnet/10/preview2)
2021
- [.NET 10 Preview 1](https://aka.ms/dotnet/10/preview1)
@@ -29,6 +30,22 @@ Windows Forms is shipping new code for the clipboard API. The clipboard is redes
2930

3031
Several <xref:System.Drawing.Design.UITypeEditor> types have been ported from .NET Framework, including `ToolStripCollectionEditor` and several editors related to the <xref:System.Windows.Forms.DataGridView> control. These editors are now discoverable by the <xref:System.Windows.Forms.PropertyGrid> and the Windows Forms Designer Actions panel.
3132

33+
SnapLines were fixed for custom designers.
34+
35+
## Bug fixes
36+
37+
If the <xref:System.Windows.Forms.DataGridView> was in edit mode while the hosting dialog was closed, it would throw `InvalidOperationException`. The bug causing this has been fixed.
38+
3239
## Accessability
3340

3441
Improved NVDA screen reader support.
42+
43+
## Analyzer improvements
44+
45+
Existing analyzers have been fine-tuned to reduce false positives.
46+
47+
New analyzers have been added:
48+
49+
- [Warning WFDEV004 - `Form.OnClosing`, `Form.OnClosed` and the corresponding events are obsolete.](../wfdev-diagnostics/wfdev004.md)
50+
- [Warning WFDEV005 - `GetData` methods are obsolete. Use `TryGetData<T>` methods instead.](../wfdev-diagnostics/wfdev005.md)
51+
- [Warning WFDEV006 - Some controls are obsolete. They're provided for binary compatibility with .NET Framework.](../wfdev-diagnostics/wfdev006.md)

dotnet-desktop-guide/wpf/whats-new/net100.md

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: What's new in WPF for .NET 10 Preview
33
description: Learn about what's new in Windows Presentation Foundation (WPF) for .NET 10 Preview. New versions of WPF are released yearly with .NET.
44
ms.topic: whats-new
5-
ms.date: 04/09/2025
5+
ms.date: 05/12/2025
66
ms.service: dotnet-desktop
77
#customer intent: As a developer, I want to know what's changed so that I can remain up-to-date.
88
---
@@ -11,10 +11,11 @@ ms.service: dotnet-desktop
1111

1212
This article provides a high-level overview about what's new with Windows Presentation Foundation (WPF) in .NET 10 Preview. For detailed information, see the [release announcements](#release-announcements).
1313

14-
.NET 10 Preview 3 was released in April 2025.
14+
.NET 10 Preview 4 was released in May 2025.
1515

1616
## Release announcements
1717

18+
- [.NET 10 Preview 4](https://aka.ms/dotnet/10/preview4)
1819
- [.NET 10 Preview 3](https://aka.ms/dotnet/10/preview3)
1920
- [.NET 10 Preview 2](https://aka.ms/dotnet/10/preview2)
2021
- [.NET 10 Preview 1](https://aka.ms/dotnet/10/preview1)
@@ -25,14 +26,36 @@ Performance was improved by replacing internal data structures with base .NET ty
2526

2627
Enhanced performance by optimizing cache operations, array handling, and migrating font collection loader to managed code.
2728

29+
Performance was optimized across font rendering, dynamic resources, input composition, trace logging, regex usage, and XAML parsing.
30+
2831
## Fluent style changes
2932

3033
Various bug fixes have been addressed in .NET 10, to improve the Fluent UI style support in WPF. Fluent UI style support is still in progress.
3134

32-
- Fluent styles added more controls, such as <xref:System.Windows.Controls.Label>, <xref:System.Windows.Documents.Hyperlink>, <xref:System.Windows.Navigation.NavigationWindow>, <xref:System.Windows.Controls.GroupBox>, and <xref:System.Windows.Controls.GridSplitter>.
35+
- Fluent styles added more controls, such as:
36+
37+
- <xref:System.Windows.Controls.Label>
38+
- <xref:System.Windows.Documents.Hyperlink>
39+
- <xref:System.Windows.Navigation.NavigationWindow>
40+
- <xref:System.Windows.Controls.GroupBox>
41+
- <xref:System.Windows.Controls.GridSplitter>
42+
- <xref:System.Windows.Controls.TextBox>
43+
- <xref:System.Windows.Controls.DatePicker>
44+
- <xref:System.Windows.Controls.RichTextBox>
45+
3346
- Fixed the animation for <xref:System.Windows.Controls.Expander>.
3447
- Fixed crashes related to `HighContrast`.
3548
- Added missing <xref:System.Windows.Controls.ContentPresenter.RecognizesAccessKey> for controls.
49+
- Right-to-left layout issues have been fixed for <xref:System.Windows.Controls.MenuItem>, <xref:System.Windows.Controls.Expander>, <xref:System.Windows.Controls.TreeViewItem>.
50+
51+
> [!WARNING]
52+
> .NET 10 Preview 4 introduced a bug related to fluent styles. For more information, see [.NET 10 Preview 4 release notes](https://aka.ms/dotnet/10/preview4).
53+
54+
## Clipboard changes
55+
56+
WPF and Windows Forms now use the same clipboard API. Both desktop technologies unify how they interact with the clipboard.
57+
58+
.NET 9 obsoleted `BinaryFormatter`, which is used in some clipboard operations. These clipboard operations required you to opt in to compatibility package, or work around the operation. To ease the pain of moving away from `BinaryFormatter`, .NET 10 is obsoleting certain clipboard methods to indicate that they shouldn't be used. More methods are being added to help JSON serialization with clipboard data, circumventing the need for `BinaryFormatter`.
3659

3760
## Bug fixes
3861

@@ -52,7 +75,41 @@ Moving out of .NET Framework left behind unused Code Access Security (CAS) relat
5275
- Remove unused CAS and XBAP code from `OleCmdHelper/ISecureCommand`.
5376
- Remove unused CAS code from `FontSourceCollection/FontSource`.
5477

55-
Conducted extensive code cleanups, including syntax standardization and argument clarity, to improve code readability and maintainability.
78+
Conducted extensive code cleanups, including syntax standardization and argument clarity, to improve code readability and maintainability. Debugging patterns were modernized and legacy constructs like `ArrayList` were phased out for maintainability.
79+
80+
## New APIs
81+
82+
Community contributor **bstordrup** enhanced the `MessageBox` with more button and result options. For more information, see [#9613](https://github.com/dotnet/wpf/issues/9613).
83+
84+
```diff
85+
namespace System.Windows
86+
{
87+
public enum MessageBoxButton
88+
{
89+
OK = 0,
90+
OKCancel = 1,
91+
+ AbortRetryIgnore = 2,
92+
YesNoCancel = 3,
93+
YesNo = 4,
94+
+ RetryCancel = 5,
95+
+ CancelTryContinue = 6,
96+
}
97+
98+
public enum MessageBoxResult
99+
{
100+
None = 0,
101+
OK = 1,
102+
Cancel = 2,
103+
+ Abort = 3,
104+
+ Retry = 4,
105+
+ Ignore = 5,
106+
Yes = 6,
107+
No = 7,
108+
+ TryAgain = 10,
109+
+ Continue = 11,
110+
}
111+
}
112+
```
56113

57114
## Miscellaneous changes
58115

0 commit comments

Comments
 (0)