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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Diagram Dispatcher.BeginInvoke Render Issue 8.4.0.10

Thread ID:

Created:

Updated:

Platform:

Replies:

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

Hi,

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?

Thanks


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 : http://files2.syncfusion.com/Support/Diagram%20WPF%20&%20SL/Sample/ForumUpdate/CreateNodes.zip

Code Snippet :

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


Here diagramView is an instance of DiagramView.

Please let us know if you have any queries.

Regards,
Sundar M.


shimaz
Replied On December 28, 2010 01:47 PM UTC

Thank you, that works perfectly.


CONFIRMATION

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.

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

;