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 Dispatcher.BeginInvoke Render Issue

Thread ID:





97692 Dec 27,2010 08:03 PM UTC Dec 28,2010 01:47 PM UTC ASP.NET Web Forms (Classic) 2
Tags: DiagramWebControl
Asked On December 27, 2010 08:03 PM UTC


Referring to the Organization Chart Demo, when I use "createNodes()" in windows loaded event with many nodes, the UI takes a while to complete.

So I tried an alternative way by using Dispatcher.BeginInvoke in the windows loaded event and the diagram do not render properly.

private delegate void LoadNodesDelegate();
Dispatcher.BeginInvoke(DispatcherPriority.Background, new LoadNodesDelegate(createNodes));

Is there any way to fix this?


Sundar M [Syncfusion]
Replied On December 28, 2010 09:56 AM UTC

Hi Shimaz,

Regarding the Diagram is not rendered properly, when the nodes are created in Dispatcher’s Background the Tree layout will not be updated automatically, so please update the tree layout after Nodes are created as shown in the code snippet. For more details please refer the sample from the following link :

Sample link : https://s3.amazonaws.com/files2.syncfusion.com/Support/Diagram%20WPF%20&%20SL/Sample/ForumUpdate/CreateNodes.zip

Code Snippet :

// update the DiagramView's layout
DirectedTreeLayout tree = new DirectedTreeLayout(diagramModel, diagramView);
// Refresh the DirectedTreeLayout

Here diagramView is an instance of DiagramView.

Please let us know if you have any queries.

Sundar M.

Replied On December 28, 2010 01:47 PM UTC

Thank you, that works perfectly.


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

This page will automatically be redirected to the 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