Reputation: 1717
I want to know if there's some kind of gesture for Windows Phone that allow me to tap on a Button and then drag to another and tap it, of course without XNA framework because this is not a game and I don't want use it.
For example, I have two buttons "A" and "B", if tap on A then I drag my finger (still on the screen) on B then B should be selected with A.
I hope everybody understand my problem, Of course I'm doing all this with C# and XAML for Windows Phone 8.
Thanks for the answers. Cheers.
Upvotes: 2
Views: 4155
Reputation: 2190
I also prefer using the already implemented gestures that Microsoft provides with the windpwsphone toolkit. It's probably the best implementation of standard gestures you can get. And as @Arun already showed, there are already drag and drop implementations done.
But if this is not sufficient for you, you can always create your own gestures based on the raw event, that ever UIElement has. See: http://msdn.microsoft.com/en-us/library/ms604577%28v=vs.95%29.aspx
Upvotes: 0
Reputation: 1452
You can use the DragStarted
and DragCompleted
events from Microsoft.Phone.Controls.GestureListener
available in Phone Toolkit. Sample code: http://www.scottlogic.co.uk/blog/colin/2012/06/a-gesture-driven-windows-phone-todo-application-part-two-drag-re-ordering/
Upvotes: 5