We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Diagram and DirectedTreeLayout

Thread ID:





111109 Sep 8,2013 06:40 PM UTC Sep 17,2013 09:41 AM UTC WinRT 4
Tags: SfDiagram
Asked On September 8, 2013 06:40 PM UTC


I've created a simple app.
It creates a simple diagram. I've noticed that if a Diagram has no nodes and connectors and DirectedTreeLayout is applied then DirectedTreeLayout throws an exception right after the Load event.

Here is the callstack:
   at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at Syncfusion.UI.Xaml.Diagram.Layout.DirectedTreeLayout.UpdateLayout()
   at Syncfusion.UI.Xaml.Diagram.SfDiagram.DiagramLoadedEvent(Object sender, RoutedEventArgs e)

Here is the View constructor:
public MainPage()

            MainDiagram.Constraints = GraphConstraints.Relationship | GraphConstraints.Events | GraphConstraints.Zoomable;
            MainDiagram.DefaultConnectorType = ConnectorType.Line;

            MainDiagram.Nodes = new ObservableCollection<Node>();
            MainDiagram.Connectors = new ObservableCollection<Connector>();

            MainDiagram.LayoutManager = new LayoutManager()
                Layout = new DirectedTreeLayout()

            ((DirectedTreeLayout) MainDiagram.LayoutManager.Layout).HorizontalSpacing = 30;
            ((DirectedTreeLayout) MainDiagram.LayoutManager.Layout).VerticalSpacing = 70;
            ((DirectedTreeLayout) MainDiagram.LayoutManager.Layout).SpaceBetweenSubTrees = 30;
            ((DirectedTreeLayout) MainDiagram.LayoutManager.Layout).Orientation = TreeOrientation.LeftToRight;

Any advice?


Ramya Thirugnanam [Syncfusion]
Replied On September 10, 2013 09:33 AM UTC

Hi Vladimir,

We are glad to announce that our Essential Studio Volume 3 2013 is rolled out and is available for download under the following link. The issue in SfDiagram with Directed-Tree Layout throws the “ArgumentOutOfRangeException” while using empty collection of Nodes and Connectors has been fixed in our latest release.



Please upgrade to the latest version of SfDiagram and get back to us if you require any further assistance.

Please let us know if you need any further assistance.

Replied On September 11, 2013 07:59 PM UTC


Thanks for the reply.
Well I've just tested the version

It does not crash anymore but...
If I add one node without connectors and child nodes, Layout is not applied automatically.
More over, if I call right after node creation
it crashes again with the same error message as before.

If I create more then one node and connect them with connectors, layout automatically applied and everything looks good.


Replied On September 16, 2013 05:22 PM UTC

Any updates on this?

Ramya Thirugnanam [Syncfusion]
Replied On September 17, 2013 09:41 AM UTC

Hi Vladimir,

Sorry about the inconvenience caused.

The reported issue “ArgumentOutOfRangeException with Directed-Tree Layout while using one node (RootNode) without connectors and child nodes" is confirmed as a defect and we have logged an issue report to fix this. This fix will be available in our upcoming WinRT service pack release which is tentatively scheduled on end of this month.

Please let us know if you need any further assistance.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon