tags:

views:

39

answers:

1

I am trying to figure out Drag And Drop using the features in the FluidKit.

I downloaded the Demo app and both the drag and drop have this line of code in it:

private static DataFormat SupportedFormat = DataFormats.GetDataFormat("FluidKit");

What is this doing? I don't see anywhere that the format that is being gotten is set. How does it know what it being gotten?

Any help would be nice.

+2  A: 

The DataFormat is just describing the type of object that is being dropped on your control. For instance, if you drag a couple of items from a ListView onto some other ListView you could check to be sure the data format you're receiving is "System.Windows.Forms.ListViewItem[]". If you receive a DataFormat that your control can't handle, then you can just choose to cancel the drop event, or prompt the user, etc.

Jacob Ewald