Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1485
Double-click on nodes only?
posted

Hi,

I currently have a MouseDoubleClick "event handler" (actually using EventToCommand from Cinch, similar to what MVVM Light offers), but this triggers no matter where I double-click on the tree.  I would like to be able to restrict double-clicks to when the user clicks on an actual node.

I tried setting a style on XamDataTreeNodeControl, but that doesn't do anything.  My tree is defined using NodeLayouts which do not have a MouseDoubleClick event.  I was hoping that using PreviewMouseDoubleClick to filter using the sender would work, but the type of sender is XamDataTree even when I double-click on a node (the WPF treeview actually distinguishes between the two, and I was hoping for the same behavior).

Any idea?  I get the feeling I'm missing something really obvious...

Thanks,
Michel

Parents
No Data
Reply
  • 34510
    Offline posted

    Hi Michel,

    To achieve the results your describing the best way would be to create a style for the XamDataTreeNodeControl that hooks up to the MouseDoubleClick event handler. I'm providing a very simple sample which demonstrates how you would do this. You can reference this to compare how you setup your style with mine.

    If you have any questions about the sample or anything else feel free to ask.

    Sample_XamTree_NodeEvents.zip
Children