question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

More trimming friendly DragDrop

See original GitHub issue

Currently DragDrop process starts with DragDropEffects DoDragDrop(object data, DragDropEffects allowedEffects) which inside perform dispatcherization of the supported interfaces and objects. Sometimes this may means that we rely on Built-in COM support for cast of the interfaces.

Built-in COM support maybe disabled in modern .NET and do not supported in NativeAOT flavor of CoreCLR. I propose provide API which put responsibility of AOT supported casting on the consumer side by introducing typed version of the method.

public class Control
{
+ [BuiltInComDragonsHere]
  public DragDropEffects DoDragDrop(object data, DragDropEffects allowedEffects)
+ public DragDropEffects DoDragDrop(System.Runtime.InteropServices.ComTypes.IDataObject data, DragDropEffects allowedEffects)
+ public DragDropEffects DoDragDrop(System.Windows.Forms.IDataObject data, DragDropEffects allowedEffects)
}
public class ToolStripItem
{
+ [BuiltInComDragonsHere]
  public DragDropEffects DoDragDrop(object data, DragDropEffects allowedEffects)
+ public DragDropEffects DoDragDrop(System.Runtime.InteropServices.ComTypes.IDataObject data, DragDropEffects allowedEffects)
+ public DragDropEffects DoDragDrop(System.Windows.Forms.IDataObject data, DragDropEffects allowedEffects)
}

This would be considered source breaking change.

/cc @weltkante since you maybe interested in giving feedback on this.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
JeremyKuhnecommented, May 3, 2022

@kant2002 sorry, I’m not clear on how that helps. @AaronRobinsonMSFT are there resources on built-in COM and trimming? All I really know at this point is that we should be moving away from ComImport where possible, but I don’t even really know why. 😃

1reaction
RussKiecommented, Apr 6, 2022

The team will discuss in one of the upcoming triages.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to implement drag and drop in React with React DnD
The most common use cases for drag and drop in React include uploading files, moving items between multiple lists, and rearranging images ...
Read more >
Tips for minimizing the email clipping using the drag-drop ...
Open the email in your Gmail inbox. In the top-right of the email, click the 3 vertical dots to open the More menu....
Read more >
How can I make a jQuery UI 'draggable()' div ...
After wasting many hours, I came across this! jquery-ui-touch-punch. It translates tap events as click events. Remember to load the script ...
Read more >
Drag and Drop one pager PDF from Apple Ma…
When I drag and drop from Apple Mail a one-pager PDF (that is displayed as an image in the email) to the Finder...
Read more >
Learn how to trim a video in minutes
In this tutorial video, you'll learn how to trim videos using Animoto's user-friendly video trimmer. Discover step-by-step instructions to precisely cut ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found