I am new to WPF and I am trying to create a simple toggle button in Dynamo.The sample Script I refereed is HelloDynamo (https://github.com/teocomi/HelloDynamo) .
I managed to get the node displayed in Dynamo, but currently the toggle doesn’t work , it always display false. I suspect there is a binding issue in WPF.
Thanks for sharing this, I was using the same method as Teocomi to create custom nodes, but something must went wrong on the wpf part which cause the error.
I solve the issue now, apparently custom Node assemble has to be separated from all the other assembles. I was put it together with some zero touch nodes which enables pop-out windows in dynamo, that somehow causes the problem.
Though I had both in the same solution, the DLL file mattered the most.
This was achieved by 2 steps:
By changing the assembly name of the solution, managed to churn out a DLL with custom nodes, and a separate DLL with zero touch nodes. (csproj file / rightclick project > hit properties option > under applications tab > change assembly name)
edit pkg.json file to add separate node_library parameter with name of other assemble / DLL.
Whilst this may be quite a manual process, next up will be to add a kind of source control setting between 2 branches and managing the .gitignore file to not submit the csproj file which contains the DLL naming toll.
Just wondering if it was the same process on yourside?
Currently, I just separated Zero Touch to a different Assembly, so zero touch and custom nodes are in the same solution. pkg.json only exist in the custom Node assembly.