Silverlight 4 Drag and Drop Treeview

Posted by Rich on Stack Overflow See other posts from Stack Overflow or by Rich
Published on 2010-05-18T19:45:03Z Indexed on 2010/05/18 19:50 UTC
Read the original article Hit count: 496

Does anyone have an example for any of the following scenarios.

Given, these are all dynamically populated trees. Not using a Heirarchal data template, but by iterating through object collections manually and appending children at the appropriate level.

  1. Treeview1 has 3 levels, but items can only be reordered within their level. So, lets say we have Drives, Folders and Files. Drives can be rearranged in an order, but not put into a Folder. When navigated down one level in a drive, the individual folders can be reordered, but not dragged between drives.. and same with files, only can be reordered, but not moved to a different folder or drive

  2. I have 2 treeviews, Treeview1 is the same as #1 above and Treeview2 is like a picklist of available items. A user can drag an item from Treeview2 to Treeview1, but it can only be placed at Treeview1's File Level. The dragged item cannot be a child of a file, or placed at the folder level, nor placed at the drive level. Also, how to handle the Above, On Top, or Below an item.

I have yet to come across these examples.

© Stack Overflow or respective owner

Related posts about silverlight-4.0

Related posts about drag-and-drop