Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement drag and drop in c# windows metro app?

I'm developing a metro app for windows store in Visual Studio 2012 using C# and XAML

I want to allow a user to drag a button from a selection and drop it in a specified area.

like image 895
Hopeless Avatar asked Mar 22 '23 22:03

Hopeless


1 Answers

See the following:

http://social.msdn.microsoft.com/Forums/windowsapps/en-US/53a42865-6e96-4439-85dd-5e90e0ec8512/drag-and-drop-in-metro-apps

Use a grid template and set CanDragItems="True" CanReorderItems="True" and AllowDrop="True".

A comprehensive guide can be found here:

http://blog.jerrynixon.com/2013/06/walkthrough-reordering-items-in.html

like image 78
Orch Avatar answered Apr 06 '23 17:04

Orch