I want to have a stackpanel where I can drop items to that has a big blank space with "Drop here" in it. When I use a stackpanel, I cannot drop to it since there are no items in it. I want to add items to the stackpanel as I drop. The best I can do is as follows, but the problem is I must drop onto the textbox for it to pick it up, and then it adds my dropped items after that textbox. What am I doing wrong?
<StackPanel Height="400" Name="DropHere" x:FieldModifier="public" Grid.Column="1">
<TextBox Text="Drop Here" Grid.Column="1"/>
<ig:DragDropManager.DropTarget>
<ig:DropTarget IsDropTarget="True" DropChannels="ChannelColumns"/>
</ig:DragDropManager.DropTarget>
</StackPanel>
Hi,
You can try to wrap your StackPanel with Grid and attach the DropTaget to it. The grid will cover the whole empty area so you can drop within easily. Then add you elements to your stack panel.
StackPanel panel = (StackPanel)grid.Children[0];
Regards.
Plamen.
Im sorry I dont follow what exactly you meant, attach what to the grid? Drop targets cannot be attached... the stackpanel I have tried dropping to a grid with no luck, do you have a snippet by chance?