WPF

K

kazik

hi,

In your opinion, what is the best way to create list with buttons
inside? And I want to do drag and drop inside the list with using
these buttons.
for example I have list with buttons:
b1 b2 b3
b4 b5 b6

and I want to drag f.e. b6 and drop between b1 and b2.

Could you recommend me some solution?

kazik
 
A

andy

Bearing in mind that I'm no WPF expert, but…

I gather from the folks I know who are that the StackPanel is the most
commonly used container for grouping other controls like that.

It doesn't support drag-and-drop directly AFAIK, but I believe that you
can use an empty placeholder control to make room for the item being
dragged in order to provide user feedback, placing it in the position
where the dragged control would be in order to have the StackPanel redo
the layout with the space in it.  I think WPF even has animation support
you can use for when the controls in the StackPanel are rearranged
during drag-and-drop.

Pete

I develop in WPF.
I reckon you're best using a listbox.
You can apply a template to the data to give buttons.

http://www.codeproject.com/KB/WPF/WpfDragAndDropSmorgasbord.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top