views:

22

answers:

0

Using the drag'n'drop features of the Silverlight 4 Toolkit, I have a drag'n'drop enabled Listbox where each ListboxItem can be dragged/reordered up and down.

Each ListboxItem contains several controls (TextBlocks, TextBoxes and Buttons) and my problem is that when I click the buttons within a ListboxItem, I will occasionally initiate a drag event instead of just a click event on that control.

One solution would be to handle the ItemDragStarting event and determine what was clicked on to start the event - and cancel the event if called by a Button.

I can however not figure out how to determine what I've clicked on. Sender of the event and e.DragSource is of type ListBoxDragDropTarget, whether I initiate the drag from a button or the ListboxItem itself.

Any help would be appreciated - solutions to my problem or alternative methods of doing what I need!