Skip to content

Avoid serialization for in-process DataObject use #10776

Open
@JeremyKuhne

Description

@JeremyKuhne

Historically putting data on the Clipboard and retrieving it would go through the native OLE IDataObject interface, which would have the side effect of always making all interaction be autoConvert == true.

The new implementation does not need to go through the serialization that would happen here but does need to follow the behavior above. We initially handled this by forcing some scenarios through the proxy, but that causes serialization. In WinForms this was handled via a derived DataObject class, which we've just updated to just mimic the behavior from before.
 
dotnet/winforms#13287

DataObject is sealed in WPF, so this behavior was done with:

    private readonly bool _doNotUnwrap;

This should be changed to _forceAutoConvert to follow the behavior change that WinForms does.

Then we'll be able to enable customer OLE scenarios that are only in process and don't set copy to true without needing to take the BinaryFormatter compat package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-clipboardIssues related to DataObject and shared clipboard

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions