Open WPF window when doube-clicking on a component

Hi all,

I am developing a plug-in for Grasshopper and I’m struggling to understand how a WPF window could be opened by double-clicking on a component. Until now, my strategy has been to override the component attribute and specifically RespondToMouseDoubleClick. Double-clicking on the component launches an .exe app. This works but I want the interface to be connected to Grasshopper, i.e. receive input and change the component output based on the user interaction with the interface, and I can’t find a way to do that, except through the use of global variable. I know Octopus does exactly that but I don’t find information about the way it was coded online.

Does anyone have been working on similar problems?



I’ve never used WPF, all of Grasshopper 1 is winforms. However I imagine it works roughly in the same way. You don’t start an external exe, the WPF window is a class in the same assembly as your component and you make sure that you have events or bindings or methods you can invoke to communicate back and forth.

1 Like

Thank you so much!