NodeNetwork
NodeNetwork copied to clipboard
Is it possible to check the mouse click event?
Hi all.
I have read the documentation from here. I think this library is really attractive.
But I have a question, is it possible to check the mouse click event? For example, whether can know the selected node by left-click or double-click.
Thank you :)
I was trying to do something that using a click event likely would have made easier. The solution I ended up using was to hook in to the SelectedNodes
list and listen for changes. Then I would check if the count of the list was equal to one. It's not the greatest solution, and doesn't work for detecting double-clicks, but it works for myself.
Having exactly the same issue. When everything is doing in a MVVM way it works fine - but when we want to listen to events there is no event to listen to!😂
@StellarWitch7 Dumb question - how do you hook into the SelectedNode
and listen for changes? Thanks!
Having exactly the same issue. When everything is doing in a MVVM way it works fine - but when we want to listen to events there is no event to listen to!😂
@StellarWitch7 Dumb question - how do you hook into the
SelectedNode
and listen for changes? Thanks!
I'm fairly certain I do it here: https://github.com/StellarWitch7/The-Evergreen-Project/blob/main/Evergreen.App%2FMainWindow.xaml.cs I dropped the project a long while ago, so I don't quite understand what it is I wrote up, but maybe you'll be able to figure it out ^^
It should give you the last selected node or null if there's none.