This project is read-only.

Can't add an edge to BidirectionalGraph

May 16, 2012 at 12:31 PM
Edited May 16, 2012 at 12:33 PM

I've written the same code as in tutorial http://www.youtube.com/watch?v=VTbuvkaPGxE. But i got an exception when tried to add Edge:

g.AddEdge(new Edge<object>(vertices[0], vertices[4]));
Message='The invocation of the constructor on type 'graphBuilder.MainWindow' that matches the specified binding constraints threw an exception.' Line number '3' and line position '9'.
  Source=PresentationFramework
  LineNumber=3
  LinePosition=9
(full text - http://pastebin.com/yvSg20ex)
I've got the same error even if i remove GraphLayout from XAML. Used dlls from Graph# sample archive.

May 20, 2012 at 6:06 PM
Kirow wrote:

I've written the same code as in tutorial http://www.youtube.com/watch?v=VTbuvkaPGxE. But i got an exception when tried to add Edge:

g.AddEdge(new Edge<object>(vertices[0], vertices[4]));
Message='The invocation of the constructor on type 'graphBuilder.MainWindow' that matches the specified binding constraints threw an exception.' Line number '3' and line position '9'.
  Source=PresentationFramework
  LineNumber=3
  LinePosition=9
(full text - http://pastebin.com/yvSg20ex)
I've got the same error even if i remove GraphLayout from XAML. Used dlls from Graph# sample archive.

shame on me...i've made a very stupid mistake...added wrong vertices (indexes from cycle instead of strings). 

im so sorry :'(