Skip to content

Commit

Permalink
This prevents nested drop targets, which I want
Browse files Browse the repository at this point in the history
  • Loading branch information
matelich committed Oct 9, 2014
1 parent 3d87dfc commit eacc7d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GongSolutions.Wpf.DragDrop/DropInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public DropInfo(object sender, DragEventArgs e, DragInfo dragInfo)

this.VisualTarget = sender as UIElement;
// if drop target isn't a ItemsControl
if (!(this.VisualTarget is ItemsControl)) {
/*if (!(this.VisualTarget is ItemsControl)) {
// try to find next ItemsControl
var itemsControl = VisualTreeExtensions.GetVisualAncestor<ItemsControl>(this.VisualTarget);
if (itemsControl != null) {
Expand All @@ -51,7 +51,7 @@ public DropInfo(object sender, DragEventArgs e, DragInfo dragInfo)
this.VisualTarget = itemsControl;
}
}
}
}*/
// visual target can be null, so give us a point...
this.DropPosition = this.VisualTarget != null ? e.GetPosition(this.VisualTarget) : new Point();

Expand Down

0 comments on commit eacc7d8

Please sign in to comment.