This is a migrated thread and some comments may be shown as answers.

Drag and Drop inside StackPanel

1 Answer 212 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
al
Top achievements
Rank 1
al asked on 25 Mar 2009, 07:44 AM
Hi everyone!

Is it posible to make drag and drop inside a stack pannel. What i m trying to de here is that, i want to arrange the items inside the stack panel. I have created a user control and i added it inside the stack panel.

1 Answer, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 25 Mar 2009, 08:26 AM
Hi Al,

I answered to your ticket, but I am posting my reply here as well, you can continue either thread:

It is possible to drag items within a StackPanel, in fact I created an example which shows how you can rearrange items in a ListBox (which uses a StackPanel) and drag them to and from a WrapPanel.

You can find the example here:

http://www.telerik.com/community/forums/silverlight/drag-and-drop/drag-and-drop-with-radwrappanel.aspx

And the example with the ListBox on its own here:

http://www.telerik.com/community/forums/silverlight/drag-and-drop/drag-drop-within-a-listbox.aspx

If you like to have richer user experience with the dragging cues available to the users, please consider using an ItemsControl instead of a stack. This way you will be able to also bind it and it has a ControlTemplate which can be modified to suit different needs (as with the DragDrop in this case). Visually the ItemsControl and the StackPanel will look identical. If you want you can convert the ListBox from the example to an ItemsControl by changing its name and modifying the ControlTemplate a bit.

I will be happy to help you with any questions you have,

Sincerely yours,
Miroslav
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
DragAndDrop
Asked by
al
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Share this question
or