Skip to content
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

DropTargetAdorners.Highlight has wrong location #449

Closed
RedX2501 opened this issue Jul 8, 2022 · 2 comments
Closed

DropTargetAdorners.Highlight has wrong location #449

RedX2501 opened this issue Jul 8, 2022 · 2 comments
Labels
Milestone

Comments

@RedX2501
Copy link

RedX2501 commented Jul 8, 2022

Describe the bug
When you have non-visible elements the Highlight border is misaligned.

To Reproduce
Steps to reproduce the behavior:

Open project, drag element onto target element.

DragDropBugReport.zip

This project uses the latest version with .net 6 but I have the problem with .net framework 4.7.2.

Expected behavior
The highlight border should be around the gray element but is offset.

The computation of the size to highlight is correct but the offset is not.

Desktop (please complete the following information):

  • OS: Win 10

  • Version: DragDrop 3.1.1

Additional context
Add any other context about the problem here.

@RedX2501 RedX2501 added the Bug label Jul 8, 2022
@RedX2501
Copy link
Author

RedX2501 commented Jul 8, 2022

I do realize that a workaround exists by moving the dd:IsDropTarget to the border.

I do still think this is a problem since there is a code to calculate the accurate size of the target but the offset is not considered.

@punker76 punker76 added this to the 3.2.0 milestone Sep 7, 2022
@punker76
Copy link
Owner

punker76 commented Sep 7, 2022

@RedX2501 The problem here was that the target UserControl doesn't set a Background brush (like Transparent) to use the entire bounds. So the result is then the wrong position for the inner bounds. Workaround is to set the Background, but I also fixed that now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants