views:

114

answers:

3

Hi,

I was wondering if there was a simple way of doing this (setting a property or something of the ListView) rather than going through the Drag events.

All I want is similar functionality to Windows Explorer, where users can drag the ListViewItems within the ListView and when dropped they remain where the user left them. All I want to know is if there is functionality like this built in to the list view? If not then I will have to do it with the drag events, but I don't want to be doing any unnecessary work if I don't have to!

Thanks,

Update
The answers I've had have all appeared to be using example projects which contain drag drop functionality, I appreciate the answers, although I already understand how to do this. The question is aimed at whether or not there is any in-built functionality of the ListView that I can take advantage of for internal dragging of ListViewItems.

A: 
Grammarian
+1  A: 

To answer your question: There is no built in functionality for dragging and dropping items within a ListView control. Even the MSDN documentation instructs you to implement your own code-behind for the various events in order to achieve this functionality (see the ListViewInsertionMark Class)

Allon Guralnek