diff --git a/GongSolutions.Wpf.DragDrop/DropInfo.cs b/GongSolutions.Wpf.DragDrop/DropInfo.cs index 4eaa8084..fec8bcdf 100644 --- a/GongSolutions.Wpf.DragDrop/DropInfo.cs +++ b/GongSolutions.Wpf.DragDrop/DropInfo.cs @@ -155,9 +155,7 @@ public DropInfo(object sender, DragEventArgs e, DragInfo dragInfo) this.InsertPosition |= RelativeInsertPosition.TargetItemCenter; } //System.Diagnostics.Debug.WriteLine("==> DropInfo: InsPos={0}, InsIndex={1}, X={2}, Item={3}", this.InsertPosition, this.InsertIndex, currentXPos, item); - } else { - this.VisualTargetItem = this.VisualTarget; - } + } } else { @@ -165,6 +163,8 @@ public DropInfo(object sender, DragEventArgs e, DragInfo dragInfo) this.InsertIndex = itemsControl.Items.Count; //System.Diagnostics.Debug.WriteLine("==> DropInfo: {0}, item=NULL, {1}", this.InsertPosition, this.InsertIndex); } + } else { + this.VisualTargetItem = this.VisualTarget; } }