This repository has been archived by the owner on May 1, 2024. It is now read-only.
Unable to get positon when dropping an item (Xam. Forms) #12489
Labels
a/DragAndDrop
blocker
Issue blocks next stable release. Prioritize fixing and reviewing this issue.
e/2 🕑
2
t/enhancement ➕
Milestone
This issue has been moved from a ticket on Developer Community.
I have a simple app that allows me to drag and drop an image
MainPage.xaml
Code behind
When I drag the Image and release it, I check the X and Y pproperies but both are 0 irrespective of where the drop occurs in the view. There is no way either to find the X and Y positons in code (again, both are zero). If I set the view to be an AbsoluteLayout this also returns 0,0
Original Comments
Feedback Bot on 09/10/2020, 10:05 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Rachel Kang [MSFT] on 13/10/2020, 09:47 AM:
Hi there! Have you tried making sure that the properties you are retrieving depends on the parameters (i.e. the DropCompletedEventArgs e) of the relevant method (DragGestureRecognizer_DropCompleted)? As an example, you may find our documentation here helpful: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/gestures/drag-and-drop#retrieve-image-or-text-data
In the future, please consider asking these types of (non-bug) questions in our forums (https://forums.xamarin.com/) / Stack Overflow. Thanks so much for understanding, and hope this helps! 😃
Original Solutions
Rachel Kang [MSFT] solved on 13/10/2020, 09:47 AM, 0 votes:
Hi there! Have you tried making sure that the properties you are retrieving depends on the parameters (i.e. the DropCompletedEventArgs e) of the relevant method (DragGestureRecognizer_DropCompleted)? As an example, you may find our documentation here helpful: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/gestures/drag-and-drop#retrieve-image-or-text-data
In the future, please consider asking these types of (non-bug) questions in our forums (https://forums.xamarin.com/) / Stack Overflow. Thanks so much for understanding, and hope this helps! 😃
Paul Johnson on 13/10/2020, 10:29 AM:
Neither of the events return the X and Y position of the dropped object. I refereed to the docs before filing the bug
The text was updated successfully, but these errors were encountered: