Skip to content

Instantly share code, notes, and snippets.

View Crisfole's full-sized avatar

Christopher Pfohl Crisfole

  • Apsis Labs
  • Beverly, MA (remote)
View GitHub Profile
@Crisfole
Crisfole / gist:2763319
Created May 21, 2012 17:06
A useful drag and drop extension method
public static void SetupDragging(this ListView list)
{
bool insertAfter = false;
ListViewItem dragged = null;
ListViewItem targetItem = null;
list.DrawItem += (o, e) =>
{
e.DrawDefault = true;
if (e.Item != targetItem) return;