WPF Questions

G

Guest

I'm not sure which is the right forum to post this question - so this is as
general as can be. There question is about treeview in WPF:

I'm trying to implement drag and drop in TreeViews, poking all sorts of
options for their display.
The code I'm based upon is Josh Smith's ListViewDragDropManager, and just
converted it to manage treeviews, with almost all of the same code. The
logics are all exactly the same, and the display is also from another project
I saw recently.

What I came across is just very weird:
when I expand a TreeViewItem, then collapse it, the TreeViewItem thinks it's
still expanded.
all of the DragOver events come from the incorrect treeviewitem, which is
ofcourse very bad.

The best way to understand what I'm saying is to look at this test project,
and do the following:
1. drag the first item around a little, see that you get all the normal
behavior.
2. expand the first item.
3. collapse the first item.
4. try the drag operations again. notice how when you pass over items from
the second row,
the mouse thinks it's over the first row treeviewitem.

solution is here(zip) :
http://www22.brinkster.com/betzera/ohev/dev301/treeview dragger.zip

10x,
Dani
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top