Skip to content

Solution (#11774): DragLeave constructs DragEventArgs with coordinates relative to t - #11781

Closed
TFGSUMIT wants to merge 1 commit into
dotnet:mainfrom
TFGSUMIT:fix/issue-11774
Closed

Solution (#11774): DragLeave constructs DragEventArgs with coordinates relative to t#11781
TFGSUMIT wants to merge 1 commit into
dotnet:mainfrom
TFGSUMIT:fix/issue-11774

Conversation

@TFGSUMIT

@TFGSUMIT TFGSUMIT commented Jul 14, 2026

Copy link
Copy Markdown

Title: Fix DragLeave event coordinates issue

Description:
This pull request fixes an issue where the DragLeave event constructs DragEventArgs with coordinates relative to the new target instead of the event target. The issue is fixed by introducing a new method TransformPointToTarget that transforms the target point to the coordinate system of the event target. This method is used in the RaiseDragEvent method to ensure that the coordinates in the DragEventArgs are correct.

Changes:

  • Introduced TransformPointToTarget method in DragDrop class
  • Updated RaiseDragEvent method to use TransformPointToTarget method
  • Updated DragEventArgs class to use transformed point

Testing instructions:

  1. Run the application with the DragLeave event handler attached.
  2. Verify that the coordinates in the DragEventArgs are correct in the DragLeave event handler.
  3. Verify that the coordinates are relative to the event target, not the new target.
Microsoft Reviewers: Open in CodeFlow

@TFGSUMIT
TFGSUMIT requested a review from a team July 14, 2026 10:13
@TFGSUMIT
TFGSUMIT requested a review from a team as a code owner July 14, 2026 10:13
@amarinov-msft amarinov-msft added the PR metadata: Label to tag PRs, to facilitate with triage label Jul 29, 2026
@h3xds1nz

h3xds1nz commented Aug 1, 2026

Copy link
Copy Markdown
Member

Auto generated AI slop PR without an actual solution. Plus it looks like the tokens ran out.

Aaand there's #11800; closing.

@h3xds1nz h3xds1nz closed this Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR metadata: Label to tag PRs, to facilitate with triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants