I have an app where a user can manipulate around with elements chosen from a list, this is done by clicking the list element and the element is added to a canvas.
Du
Silverlight on WP7 does not support drag and drop – at least not fully. It supports drag but not drop.
Anyways you can try something with the following example,
WP7 Drag & Drop Example
There exists no samples or anything to accomplish this. I have contacted people at msdn, and Microsoft, without any success. I am trying to build a sample but so far no success.
Edit
So what I did to solve this issue: first the problem graphically
In words dragging an element from listbox to a Canvas. SO what I did I added handlers to the listbox like this, in the view:
MyLB.AddHandler(UIElement.ManipulationStartedEvent, new EventHandler<ManipulationStartedEventArgs>(MyLB_ManiStarted), true);
MyLB.AddHandler(UIElement.ManipulationDeltaEvent, new EventHandler<ManipulationDeltaEventArgs>(MyLB_ManiDelta), true);
MyLB.AddHandler(UIElement.ManipulationCompletedEvent, new EventHandler<ManipulationCompletedEventArgs>(MyLB_ManiCompleted), true);
Furthermore I add an extra canvas, here after referred to as Canvas2, that stretches behind the ListBox and Canvas. The only difference between the two canvas' are the size, else they have the same itemscontrol but with different observablecollections binded to the canvas'.
Canvas.SetIndex(UIElement, zIndex)
But I do not use the drop feature or the related events since it did not seem to help because of the missing dragable element. But this works :)