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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Thread ID:





99511 May 24,2011 07:54 PM UTC May 26,2011 10:38 AM UTC WPF 1
Tags: Diagram
Mary Fontana
Asked On May 24, 2011 07:54 PM UTC

I am displaying nodes with directed tree layout.
I am allowing option to display the nodes top-to-bottom and left-to-right.

DirectedTreeLayout tree = new DirectedTreeLayout(diagramModel, diagramView);

//treeOrientation = TreeOrientation.TopBottom or
// TreeOrientation.LeftRight
diagramModel.Orientation = treeOrientation; //


(diagramView.Page as DiagramPage).InvalidateMeasure();
(diagramView.Page as DiagramPage).InvalidateArrange();

When display top-to-bottom the top node is always at the middle of the diagramview. and the bottom nodes are always at the very bottom of bounds for the diagram view. I would like the top node to start at the top, but horizontal center.
Or if top node is not at very top, the entire tree centered in the view.

Similarly, when displaying from left to right I want the top node and bottom nodes to be centered horizontally in the view.


Ramya Thirugnanam [Syncfusion]
Replied On May 26, 2011 10:38 AM UTC

Hi Mary,

With regards to displaying nodes with directed tree layout, Directed-Tree layout will position the nodes based on the layout root. The Bounds property of the Diagram View class enables to specify the rectangular area where the tree layout is to be displayed. The root of the tree layout is placed at the center of the bounds value.

For further details please refer the dashboard sample ,

Location: WPF dashboard-> Diagram -> Automatic Layout->Organization Chart Demo

Please let us know if you have any further queries and we will be happy to help you out.



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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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