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.zipCode 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.