Graph# in a UserControl

Feb 9, 2012 at 3:29 PM

Hi all!

I have a problem wirh Graph' in a UserControl.

Is it not possible to set a LayoutAlgorithmType like "Tree" in an User Control? 

Everytime when I run my project, are the verticles arranged one above the other. The LayoutAlgorithmType was not applied.

Does anyone know something about it?

Apr 24, 2012 at 1:51 AM

I have a similar problem. Setting LayoutAlgorithmType to CompoundFDP works pretty well; setting it to any other thing, like "Tree" ou "KK", throws a "Object reference not set to an instance of an object" Exception.

Oct 11, 2012 at 8:24 PM

Its not because its a UserControl, as I've got that working, I can pick any LayoutAlgorithmType (obviously some don't work though (as in they don't produce a nice layout))

Do you have a  YourGraphLayout : GraphLayout<YourVertex, YourEdge, YourGraph> class? and that's what's added to the UserControl?

I needed a LayoutMode="Automatic" property set before it would do anything though, and I couldn't get the switching of layouts on the fly to work.