This project is read-only.

How to clean a graph layout?

May 18, 2011 at 3:55 PM


I need to implement a reset function to clean a visualized graph layout. I tried to set _graphToVisualize = null, the graph layout doesn't update. I tried to create a _graphToVisualize with no vertex, and my application just crashed. Anybody has an idea how I should do?





Jul 11, 2011 at 6:08 PM

My suggestion would be to remove the vertices and edges from the underlying graph.

For example:


List<TEdge> elist = Graph.Edges.ToList();
List<TVertex> vlist = Graph.Vertices.ToList();
foreach (var e in elist)
foreach (var v in vlist)