Stop drop to other listboxes

Aug 3, 2011 at 4:04 AM

I'm using the silverlight drag drop manager to create a matching game using three listboxes stacked on top of each other. The idea is that the user can drag and drop items within the each of the listboxes but not between them. So I tried setting AllDropTargetsValid to false and manually add the drop tagets. The drop targets/drag sources are created via a template so I added each to lists as they are loaded then added them to the drag sources' droptargets list once they are all loaded. Unfortunately this doesn't seem to work - the dragging is all over the place and I can drop them anywhere and it causes all sort of errors. The standard Drop event handler and setting e.Handled as true to catch unwanted drops doesn't work because it never gets there. So I tried to stop an item being dragged on the y axis. And I can't work out how to do that either.

I really like the animations, the easy item swapping and the manager generally but I really need to work this out soon and I'm not keen on starting from scratch. Please help.

Any ideas?