Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Drag Drop support in Xamarin Forms

$
0
0

I am porting a rather rich UI from WinRT to Xamarin.Forms. I have searched the forums and have found that there is no real support for Drag and Drop.
In my app I have a grid (students in a class room), and a user can re-arrange seats by dragging any Grid Cell over an existing or empty cell and the letting go.
In WinRT I was able to use the ItemPointerMoved event to track the users touch point, and then the VisualTreeHelper to find controls under the pointer.
I can't find anything similar on Xamarin.

I am surprised that there is so little support in the Mobile world for a rich DragDrop api.
I was hoping to find something modelled after UWP, which provides a "CanDrag" property on the VisualElement and then fires DragStarting, DragEnter, DragOver, DropCompleted events. Support is almost automatic.

This is an elegant, powerful and simple to use architecture (not sure why it was not supported on WinRT)

There now seems to be similar support on Android and IOS (since IOS 11).

Here's hoping that it comes to Xamarin. Maybe via Xamarin Essentials.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>