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
close icon

Hierarchical Tree Layout issue

We are using version 9.2 of Essential Diagram within a WPF USer Control hosted on a tab. We have a hierarchical data structure that we use to bind to the ItemsSource of the diagram.

When the control first loads, and the ItemsSource is set, the layout is not being displayed correctly. Nodes are overlapping each other, as well as connectors.

If we switch the orientation and invalidate the layout, the hierarchical layout is correct. However, if we just invalidate the layout, the diagram does not recalculate the hierarchical view.

Once the control is loaded, if we bind a different ItemsSource object, it correctly displays the hierarchical tree layout.

Any ideas why the control is failing to correctly display a hierarchical tree layout when the ItemsSource is set for the first time?


2 Replies

JF James Foster June 9, 2011 06:30 PM UTC

I have attached a screenshot of the incorrect layout that is rendered (top), and what the correct layout should be (bottom). We are able to get the correct layout by toggling to a horizontal and then back to a vertical layout in the UI.

This is an issue we saw with an earlier release of the diagram, and for which we received a patched version with a fix. We hence have it working in a 9.1 version, but it's broken again in the 9.2 version.



DiagramIssue_f9558eaa.zip


RT Ramya Thirugnanam Syncfusion Team June 15, 2011 01:58 PM UTC

Hi James,

We are unable to reproduce the issue with the Layout of the Diagram. Please verify the Spacing property values are set to larger value to avoid the overlapping of Nodes. For refreshing the Layout please refer to the following Code Snippet.
Code Snippet:
HierarchicalTreeLayout layout = new HierarchicalTreeLayout(diagramModel,diagramview);
layout.RefreshLayout();


Please refer the sample from attachment. If you feel that the issue still exists, then please provide us the sample to reproduce the issue or modify the provided sample to reproduce the issue.

Please let us know if you have any further queries and we will be happy to help you out.

Regards,
Ramya




HirearchicalTreeLayout_ed7c9766.zip

Loader.
Live Chat Icon For mobile
Up arrow icon