drop target list in XAML

Jun 24, 2009 at 11:32 AM

hi kev,

I want to use drag and drop to drag treeleaves from one treeview onto another, adding that leaf to the target tree. That requires to declare dragsources and droptargets in XAML in the itemtemplates, as you wrote that in another post.

The problem is I don't now how to declare a drop target list in XAML.

Any ideas?


Jun 24, 2009 at 2:54 PM

The drop target list is declared in C#: you just add the droptargets to the generic list of droptargets on each dragsource.

Alternatively, if you want every droptarget to be valid for your dragsource, you can set the "AllowAnyDropTarget"-property on the dragsource to true - if you use this, you don't have to use the droptarget-list :-)  If you get the latest source code drop, you'll get this new property.