Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Positioning of nodes (Read 1532 times)
monkeydll
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 41
Joined: Jun 27th, 2016
Positioning of nodes
Jun 27th, 2016 at 2:16pm
Print Post  
Hello.
I have a diagram and in that diagram are 2 ShapeNodes.
I am positioning them onto a diagram view with my view model. The problem is that those 2 nodes are one on another and I dont want that. They should be one by another.

Any help would be great.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: Positioning of nodes
Reply #1 - Jun 27th, 2016 at 2:23pm
Print Post  
Hi,

Unless you explicitly set DiagramNode.Bounds, the nodes will appear at their default position and size (= new Rect(0, 0, 75, 75)). You can either assign custom positions to the Bounds property, or call one of the automatic layout algorithms after populating the diagram, e.g. try this -

new LayeredLayout().Arrange(diagram);

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
monkeydll
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 41
Joined: Jun 27th, 2016
Re: Positioning of nodes
Reply #2 - Jun 27th, 2016 at 2:29pm
Print Post  
Thank you very much it is working perfect!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint