I'm trying to set a WrapPanel as DropTarget using the following approach:
// Setup Drop TargetDropTarget dropTarget = new DropTarget();dropTarget.IsDropTarget = true;dropTarget.DropChannels.Add("ChannelA");DragDropManager.SetDropTarget(tabsContentPanel, dropTarget);
where "tabsContentPanel" is a WrapPanel.
This approach works on a ListBox and also on XamTree items contained in the WrapPanel. But when I set it on the WrapPanel, it doesn't allow dropping to the blank area of the WrapPanel.
Need help in setting the unoccupied area of a WrapPanel as a DropTarget!
Hi,
Make sure that you have Background set on the wrappanel (or at least Background="Transparent"), otherwise mouse events won't be fired. You can read more about this here.
I hope that this will help you.
Hi Nikolay,
Yes, I remember reading about that and, consequently, I set the Background="White". That didn't seem to make any difference.
Thank you for your prompt response. Please let me know anymore ideas you may have.