开发者

Silverlight 4 Drag and Drop Treeview

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 place开发者_如何学Pythond at the drive level. Also, how to handle the Above, On Top, or Below an item.

I have yet to come across these examples.


You should make 1 ListBoxDragDropTarget with a list box in it. The listbox has 3 item. Each item contains Listbox DragDropTarget with a list box in it. And every sub level contains an listbox again for all the files. With a little effort you can create your own listboxitem which has a button to open or close it like a treeview. And tada,, you can rearrange the items but no the levels.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜