I'm using a TreeView and mvvm. I want the selection of a node to fire a command, and I also want to add a context menu to the tree items.
I added a ContainerBinding to wire up the selection command. -- this works fine.
I added a ContextMenu to the treeview -- this works fine (by itself)
However, after adding both of them -- when you right click on a not-selected item, and select one of the menu items, the underlying node gets selected immediately after. The end result is 2 commands get fired. (instead of just the menu item command)
So my question is: is there a way to have context menu item click NOT select the node (and fire the selection command)?
Thanks,
Justin
I added a ContainerBinding to wire up the selection command. -- this works fine.
I added a ContextMenu to the treeview -- this works fine (by itself)
However, after adding both of them -- when you right click on a not-selected item, and select one of the menu items, the underlying node gets selected immediately after. The end result is 2 commands get fired. (instead of just the menu item command)
So my question is: is there a way to have context menu item click NOT select the node (and fire the selection command)?
Thanks,
Justin