microsoft / automatic-graph-layout

A set of tools for graph layout and viewing
Other
1.35k stars 302 forks source link

PLS help with WPF add node trouble #296

Open VRCHarbor opened 2 years ago

VRCHarbor commented 2 years ago

Hi! I have a problem with adding a new node in WPF project. I tried to find an example on your repository, but i cannot find solution for this case.

image when i try to add a new node and try to drag nodes - application throws "KeyNotFoundException" image

code source you can check here

levnach commented 2 years ago

I believe you need to use one of Microsoft.Msagl.WpfGraphControl.GraphViewer.AddNode() methods. Then the viewer will know about the added node.