1
votes

I implemented a drag and drop of an image from a Grid to another Grid using built-in MouseDragElementBehavior class. Then I needed to use a bit more complex layout for the source items so used ListBox and ItemTemplate instead.

The problem is now when dragging an item from the ListBox it is only visible when above the ListBox. How do I make it always visible and following mouse cursor anywhere while being dragged?

1
There is no "built-in" MouseDragElementBehavior it isn't even found in the Silverlight SDK, it is actually in the Blend SDK.AnthonyWJones
It's in the Microsoft.Expression.Interactions assembly. Sorry I didn't know which SDK it was in.David

1 Answers

0
votes

I suggest that instead of writing your own implementation using the Blend SDK, that you use the Silverlight Toolkit ListBoxDragDropTarget control.

The reason the item disappears in your element is that the MouseDragElementBehaviour is simplistically applying a render transform to affect the movement. However the ListView places its item panel inside a ScrollViewer which clips its content to its viewport.