Skip to content

[Breaking change]: WPF for .NET 7 fixes a bug introduced in .NET Core 3.0 related to how the text editor controls set data objects for drag operations #43285

@adegeo

Description

@adegeo

Description

.NET 7 fixes a regression introduced in .NET Core 3.0 related to how drag operations set data when dragging text from a text editor control. This restores behavior to match .NET Framework's behavior.

When dragging text from a text editor, the text is set as DataFormats.Text or DataFormats.UnicodeText on the System.Windows.DataObject object, but with autoconversion turned on. This converts the data to the DataFormats.StringFormat format on the DataObject.

Version

Other (please put exact version in description textbox)

Previous behavior

The data type on System.Windows.DataObject when dragging text from a text editor control is DataFormats.Text or DataFormats.UnicodeText.

New behavior

The data type on System.Windows.DataObject when dragging text from a text editor control is DataFormats.StringFormat.

Type of breaking change

  • Binary incompatible: Existing binaries might encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
  • Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code might require source changes to compile successfully.
  • Behavioral change: Existing binaries might behave differently at run time.

Reason for change

Match the behavior of .NET Framework.

Recommended action

Upgrade older projects to the latest version of .NET to restore the correct behavior.

Feature area

Windows Presentation Foundation (WPF)

Affected APIs

No response


Associated WorkItem - 340206

Metadata

Metadata

Assignees

Labels

📌 seQUESTeredIdentifies that an issue has been imported into Quest.breaking-changeIndicates a .NET Core breaking changein-prThis issue will be closed (fixed) by an active pull request.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions