Thursday’s NETDUG meeting was a blast. There were a lot of great questions and I hope everyone walked away with a better understanding on how to get started with WPF. As promised I am posting my sample code and the web links I mentioned during the presentation.

Download the Presentation Source. This contains all the examples that I covered during the presentation.

Download the WPF ReorderableListBox. This is the custom WPF ListBox control that allows you to drag and drop items within the same ListBox to reorder or rearrange their order/position. The code is very unpolished right now and is not documented yet, but I wanted to go ahead and throw it out here so you could start playing with it. I plan on cleaning it up, documenting it, giving props to the blogs that helped, and writing a more detailed post on the ReorderableListBox control in the future, but for now play with it, modify it, and give me feedback. Maybe we should make it a CodePlex project.

Useful links:

If anyone has any questions that were not asked during the presentation or would like me to elaborate on a certain aspect of the presentation, please feel free to drop me a comment and I will get right back to you.

Brian Lagunas

View all posts

1 comment

  • Nice. Just a couple of things:

    1) If the list items have a margin between them the adorner behaves rather erratically – it jumps to the bottom of the list when over the drag cursor is over the margin.

    2) In the previews if you put the DecideDropTarget and e.handled calls inside the if block – then add this._draggedItem = null inside the if block in PreviewDrop you can then use then use the control for drops from external sources too.

Follow Me

Follow me on Twitter, subscribe to my YouTube channel, and watch me stream live on Twitch.