views:

378

answers:

1

Hi everybody!

I am making a WPF program that contains a TreeView. I am having a problem right now. I am using an attached command behavior to try to open a TreeView children tree view item.

Basically, the treeView item contains an ID and when you double click it. It will bring another window up showing the details that are associated with this ID.

Now, the problem is. When i double click a treeView item, it doesn't do anything. But when i double click the outside of the treeview item, my command actually gets hit.

From what i have noticed. When you double click the parent node, it expands or collapses the children nodes.

Is there anyway by anychance, where you can either over ride or disable this command? Thanks in advance!!!

A: 

Well,

I am using NHibernate and I wrapped all my items in a VmCollection of a type object with ID and etc. Each object has it's own ID. So, I am passing in the object in XAML and checking for the ID, when the id matches. I open up a new window with all of the same information that was in the previous object.

This was handled in the Mouse Double Click event that is the List View. And since a TreeView is just a ListView with a Hierarchy. It should have all the same properties as the list view.

Kevin