Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Text in Shape nodes and Layered layout positioning of nodes (Read 1247 times)
monkeydll
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 41
Joined: Jun 27th, 2016
Text in Shape nodes and Layered layout positioning of nodes
Aug 5th, 2016 at 2:03pm
Print Post  
Hello.

How can I start auto positioning nodes on a location that I want using LayeredLayout. Default is in left top corner, but I want somewhere else.
And How can I get my text aligned inside of my nodes, because when I use node.TextAlignment = TextAlignment.Center the text is inside the node but on top.
This is only happening when I use the layered layout for auto arranging nodes.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Text in Shape nodes and Layered layout positioning of nodes
Reply #1 - Aug 5th, 2016 at 2:53pm
Print Post  
Hi,

You could set your topmost node as LayeredLayout.Root, move it to a fixed position and then run the layout with LayeredLayout.KeepRootPosition enabled. Another option is to temporarily change Diagram.Bounds location to the coordinates that should be leftmost and topmost for the layout.

You can center text vertically by setting the node's TextVerticalAlignment property.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint