Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Allow IDataObjectAsyncCapability #13431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JeremyKuhne
Copy link
Member

@JeremyKuhne JeremyKuhne commented May 8, 2025

Chromium based apps don't support file drop without using IDataObjectAsyncCapability. This includes the new Outlook.

To support this, we'll look for this interface in our current code paths and utilize it. This makes the async operation sync, which works, but isn't ideal. Chromium will pop a dialog that will leave WinForms modal as well until it is responded to.

If this behavior creates an issue, it can be disabled with the AppContext switch: "Windows.DragDrop.DisableSyncOverAsync"

In order to truly support async we're also introducing a new interface to allow calling back off of the UI thread. This will be shipped as experimental for .NET 10 as there is a small risk we'll want to change the API based on real-world feedback. See #13422.

Microsoft Reviewers: Open in CodeFlow

Chromium based apps don't support file drop without using IDataObjectAsyncCapability. This includes the new Outlook.

To support this we'll look for this interface in our current code paths and utilize it. This makes the async operation sync, which works, but isn't ideal. Chromium will pop a dialog that will leave WinForms modal as well until it is responded to.

If this behavior creates an issue it can be disabled with the appcontext switch: "Windows.DragDrop.DisableSyncOverAsync"

In order to truly support async we're also introducing a new interface to allow calling back off of the UI thread. This will be shipped as experimental for .NET 10 as there is a small risk we'll want to change the API based on real-world feedback. See dotnet#13422.
@JeremyKuhne JeremyKuhne requested a review from a team as a code owner May 8, 2025 19:08
@JeremyKuhne JeremyKuhne added 🚫 * NO-MERGE * The PR is not ready for merge yet (see discussion for detailed reasons) area-drag/drop Issues related to drag & drop and removed needs-area-label labels May 8, 2025
Copy link

codecov bot commented May 8, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 62.74328%. Comparing base (ce261dd) to head (f945077).
Report is 16 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #13431         +/-   ##
===================================================
+ Coverage   62.72993%   62.74328%   +0.01334%     
===================================================
  Files           1562        1562                 
  Lines         159997      159998          +1     
  Branches       14918       14918                 
===================================================
+ Hits          100366      100388         +22     
+ Misses         58856       58833         -23     
- Partials         775         777          +2     
Flag Coverage Δ
Debug 62.74328% <50.00000%> (+0.01334%) ⬆️
integration 11.36240% <50.00000%> (+0.02081%) ⬆️
production 40.94369% <50.00000%> (+0.02241%) ⬆️
test 95.70296% <ø> (ø)
unit 38.34148% <0.00000%> (+0.02139%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-drag/drop Issues related to drag & drop 🚫 * NO-MERGE * The PR is not ready for merge yet (see discussion for detailed reasons)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant