How do I set layout algorithm properties on the GraphControl

Nov 20, 2009 at 4:11 PM

I have a very basic question that I'm almost too embarrassed to ask... Having used the sample application to experiment with the various algorithms and parameters, I need to set up my GraphControl to match my chosen settings. I want to use the EfficientSugiyama algorithm and set the Layer and Vertex gaps, and also choose Orthogonal edge routing, but I can't for the life of me work out how to do this in XAML.

Can someone post a sample bit of XAML that sets these kinds of parameters?




Nov 23, 2009 at 3:12 PM

I GraemeF do not worry about "stupid questions" we are here to learn and help other developers.

Try with this XAML code-snippet:

            <Sample:MyGraphLayout x:Name="layout"
                                  LayoutAlgorithmType="EfficientSugiyama "

To be able to access the EfficientSugiyamaLayoutParameters you have to add at the top of your code the reference to the correct namespace. In this case

Hoe this help
Let us know





Nov 24, 2009 at 2:48 PM

That worked a treat! Thanks very much for your help. :)