Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
405
How do I specify a blank area to drop to in a StackPanel??
posted

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>