Skip to content

Commit c778ac8

Browse files
adegeogewarren
andauthored
Add breaking changes for WPF (#43309)
* Add breaking changes for WPF * Fix * Apply suggestions from code review Co-authored-by: Genevieve Warren <[email protected]> * adjust 3.0 * add breaking change by version * Fix link * update table * backlink from 3 to 7 --------- Co-authored-by: Genevieve Warren <[email protected]>
1 parent cf91c8d commit c778ac8

File tree

7 files changed

+128
-7
lines changed

7 files changed

+128
-7
lines changed

.openpublishing.redirection.core.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,6 @@
338338
"redirect_url": "/dotnet/core/compatibility/sdk/5.0/sdk-and-target-framework-change",
339339
"redirect_document_id": true
340340
},
341-
{
342-
"source_path_from_root": "/docs/core/compatibility/wpf.md",
343-
"redirect_url": "/dotnet/core/compatibility/sdk/5.0/automatically-infer-winexe-output-type"
344-
},
345341
{
346342
"source_path_from_root": "/docs/core/deploying/applications.md",
347343
"redirect_url": "/dotnet/core/deploying/index"

docs/core/compatibility/3.0.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Breaking changes in .NET Core 3.0
33
description: Lists the breaking changes in version 3.0 of .NET Core, ASP.NET Core, and EF Core.
4-
ms.date: 08/25/2020
4+
ms.date: 11/05/2024
55
ms.custom: linux-related-content
66
---
77
# Breaking changes in .NET Core 3.0
@@ -380,6 +380,14 @@ If you're migrating to version 3.0 of .NET Core, ASP.NET Core, or EF Core, the b
380380

381381
***
382382

383+
## WPF
384+
385+
- [Altered drag-and-drop behavior on text editors](#altered-drag-and-drop-behavior-on-text-editors)
386+
387+
[!INCLUDE[Default value of HttpRequestMessage.Version changed to 1.1](~/includes/core-changes/wpf/3.0/drag-and-drop.md)]
388+
389+
***
390+
383391
## See also
384392

385393
- [What's new in .NET Core 3.0](../whats-new/dotnet-core-3-0.md)

docs/core/compatibility/7.0.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@ If you're migrating an app to .NET 7, the breaking changes listed here might aff
156156
| [Obsoletions and warnings](windows-forms/7.0/obsolete-apis.md) | ✔️ ||
157157
| [Some APIs throw ArgumentNullException](windows-forms/7.0/apis-throw-argumentnullexception.md) || ✔️ |
158158

159+
## WPF
160+
161+
| Title | Binary compatible | Source compatible | Backwards compatible |
162+
| - | :-: | :-: | :-: |
163+
| [Restored drag-and-drop operations behavior on text editors](wpf/7.0/drag-and-drop.md) | ✔️ | ✔️ ||
164+
159165
## XML and XSLT
160166

161167
| Title | Binary compatible | Source compatible |

docs/core/compatibility/toc.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,10 @@ items:
512512
href: windows-forms/7.0/apis-throw-argumentnullexception.md
513513
- name: Obsoletions and warnings
514514
href: windows-forms/7.0/obsolete-apis.md
515+
- name: WPF
516+
items:
517+
- name: Revert behavior with text drag-and-drop operations
518+
href: wpf/7.0/drag-and-drop.md
515519
- name: .NET 6
516520
items:
517521
- name: Overview
@@ -2034,20 +2038,26 @@ items:
20342038
href: sdk/5.0/sdk-and-target-framework-change.md
20352039
- name: Removed status bar controls
20362040
href: windows-forms/5.0/winforms-deprecated-controls.md
2037-
- name: .NET Core 3.0-3.1
2038-
href: winforms.md
2041+
- name: .NET Core 3.0-3.1
2042+
href: winforms.md
20392043
- name: WPF
20402044
items:
20412045
- name: .NET 9
20422046
items:
20432047
- name: "'GetXmlNamespaceMaps' type change"
20442048
href: wpf/9.0/xml-namespace-maps.md
2049+
- name: .NET 7
2050+
items:
2051+
- name: "Revert behavior with text drag-and-drop operations"
2052+
href: wpf/7.0/drag-and-drop.md
20452053
- name: .NET 5
20462054
items:
20472055
- name: OutputType set to WinExe
20482056
href: sdk/5.0/automatically-infer-winexe-output-type.md
20492057
- name: WPF apps use Microsoft.NET.Sdk
20502058
href: sdk/5.0/sdk-and-target-framework-change.md
2059+
- name: .NET Core 3.0
2060+
href: wpf.md
20512061
- name: XML and XSLT
20522062
items:
20532063
- name: .NET 7

docs/core/compatibility/wpf.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: Windows Presentation Foundation for .NET Core 3.0
3+
description: Lists the breaking changes in Windows Presentation Foundation for .NET Core 3.0
4+
ms.date: 11/05/2024
5+
---
6+
# Breaking changes in Windows Presentation Foundation for .NET Core 3.0
7+
8+
Windows Forms support was added to .NET Core in version 3.0. This article lists breaking changes for Windows Forms by the .NET version in which they were introduced. If you're upgrading a Windows Forms app from .NET Framework or from a previous version of .NET Core (3.0 or later), this article applies to you.
9+
10+
The following breaking changes are documented on this page:
11+
12+
| Breaking change | Version introduced |
13+
| - | :-: |
14+
| [Altered drag-and-drop behavior on text editors](#altered-drag-and-drop-behavior-on-text-editors) | 3.0 |
15+
16+
## .NET Core 3.0
17+
18+
[!INCLUDE[Default value of HttpRequestMessage.Version changed to 1.1](~/includes/core-changes/wpf/3.0/drag-and-drop.md)]
19+
20+
***
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: "Breaking change: 'Revert behavior with text drag-and-drop operations'"
3+
description: Learn about a breaking change in Windows Presentation Foundation (WPF) and .NET 7. Drag-and-drop behavior was reverted to .NET Framework behavior when dragging text from a text editor control.
4+
ms.date: 11/4/2024
5+
ai-usage: ai-assisted
6+
---
7+
8+
# Drag-and-drop operations in text editors
9+
10+
.NET 7 addresses a regression introduced in .NET Core 3.0 concerning drag operations in text editor controls. This update restores the behavior to match that of .NET Framework, ensuring consistency in how data is set during drag operations.
11+
12+
## Version introduced
13+
14+
.NET 7
15+
16+
## Previous behavior
17+
18+
In .NET Core 3.0 through .NET 6, the data type on <xref:System.Windows.DataObject?displayProperty=fullName> when dragging text from a text editor control was <xref:System.Windows.DataFormats.Text?displayProperty=nameWithType> or <xref:System.Windows.DataFormats.UnicodeText?displayProperty=nameWithType>.
19+
20+
## New behavior
21+
22+
Starting in .NET 7, the data type on <xref:System.Windows.DataObject?displayProperty=fullName> when dragging text from a text editor control is <xref:System.Windows.DataFormats.StringFormat?displayProperty=nameWithType>.
23+
24+
## Type of breaking change
25+
26+
This change is a [behavioral change](../../categories.md#behavioral-change).
27+
28+
## Reason for change
29+
30+
The change was made to revert an unintentional change in .NET 3.0 and match the behavior of .NET Framework.
31+
32+
## Recommended action
33+
34+
Upgrade older projects to the latest version of .NET to restore the behavior.
35+
36+
## Affected APIs
37+
38+
- <xref:System.Windows.DataObject?displayProperty=fullName>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: "Breaking change: 'Text drag-and-drop operations'"
3+
description: Learn about a breaking change in Windows Presentation Foundation (WPF) in .NET Core 3.0. Drag-and-drop behavior changed when dragging text from a text editor control.
4+
ms.date: 11/4/2024
5+
ms.topic: include
6+
ai-usage: ai-assisted
7+
---
8+
9+
### Altered drag-and-drop behavior on text editors
10+
11+
.NET Core 3.0 introduced a change in how text editor controls create a <xref:System.Windows.DataObject?displayProperty=fullName> when dragging text to another control. The change disabled autoconversion, causing the operation to keep the data as <xref:System.Windows.DataFormats.Text?displayProperty=nameWithType> or <xref:System.Windows.DataFormats.UnicodeText?displayProperty=nameWithType> instead of converting it to <xref:System.Windows.DataFormats.StringFormat?displayProperty=nameWithType>.
12+
13+
#### Version introduced
14+
15+
.NET Core 3.0
16+
17+
#### Category
18+
19+
Windows Presentation Foundation
20+
21+
#### Previous behavior
22+
23+
The data type on <xref:System.Windows.DataObject?displayProperty=fullName> when dragging text from a text editor control was <xref:System.Windows.DataFormats.StringFormat?displayProperty=nameWithType>.
24+
25+
#### New behavior
26+
27+
The data type on <xref:System.Windows.DataObject?displayProperty=fullName> when dragging text from a text editor control is <xref:System.Windows.DataFormats.Text?displayProperty=nameWithType> or <xref:System.Windows.DataFormats.UnicodeText?displayProperty=nameWithType>.
28+
29+
#### Type of breaking change
30+
31+
This change is a [behavioral change](../../../../docs/core/compatibility/categories.md).
32+
33+
#### Reason for change
34+
35+
The change was unintentional.
36+
37+
#### Recommended action
38+
39+
This change was [reverted in .NET 7](../../../../docs/core/compatibility/wpf/7.0/drag-and-drop.md). Upgrade to .NET 7 or later.
40+
41+
#### Affected APIs
42+
43+
- <xref:System.Windows.DataObject?displayProperty=fullName>

0 commit comments

Comments
 (0)