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

Clearing and Recreating a Diagram

Thread ID:

Created:

Updated:

Platform:

Replies:

98509 Mar 4,2011 03:20 PM UTC Mar 4,2011 04:59 PM UTC ASP.NET Web Forms (Classic) 2
loading
Tags: DiagramWebControl
Phil Sullivan
Asked On March 4, 2011 03:20 PM UTC

I am creating a simple diagram with nodes and connections. The diagram control is added in XAML. In a handler I clear the connecions and Nodes through this method:

diagramModel.Nodes.Clear();
diagramModel.Connections.Clear();

When I try to recreate the diagram using the same code all of the nodes get added to the top left of the diagram and overlap each other. I am using the HeierarchialTree layout. Do I need to do something else to clear the diagram?


Phil Sullivan
Replied On March 4, 2011 04:04 PM UTC

This is regarding the WPF diagram, my apologies that I submitted it in ASP.NET forum.


Phil Sullivan
Replied On March 4, 2011 04:59 PM UTC

Stumbled accross the solution:

HierarchicalTreeLayout tree = new HierarchicalTreeLayout(diagramModel, diagramView);

tree.RefreshLayout();


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

;