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. Image for the cookie policy date

Diagram and DirectedTreeLayout

Hi,

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:
System.ArgumentOutOfRangeException
   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()
        {
            this.InitializeComponent();

            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?

Thanks.

4 Replies

RT Ramya Thirugnanam Syncfusion Team 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.

http://www.syncfusion.com/support/forums/general/111062/Essential-Studio-2013-Volume-3-Final-Release-v113030-available-for-download-

 

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.
Regards,
Ramya



VL Vladimir September 11, 2013 07:59 PM UTC

Hi,

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

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
diagramObject.LayoutManager.Layout.UpdateLayout();
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.

regards,
Vladimir.


VL Vladimir September 16, 2013 05:22 PM UTC

Any updates on this?


RT Ramya Thirugnanam Syncfusion Team 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.
Regards,
Ramya


Loader.
Up arrow icon