Druzil
Druzil

Reputation: 127

How to get the target of a Drag Drop operation on a TreeViewDragDropTarget in Silverlight?

I've looked at the Drop and ItemDroppedOn Target event handlers but it appears that you can only access the source. The sender is the TreeViewDragDropTarget when I actually want to see the item in the TreeView that is being dropped on.

Upvotes: 2

Views: 1232

Answers (1)

Druzil
Druzil

Reputation: 127

private void drag_Drop(object sender, Microsoft.Windows.DragEventArgs e)
{
    ((System.Windows.FrameworkElement)(e.OriginalSource)).DataContext

Is what I was looking for

Upvotes: 3

Related Questions