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.

directedtreelayout

Thread ID:

Created:

Updated:

Platform:

Replies:

99511 May 24,2011 03:54 PM May 26,2011 06:38 AM WPF 1
loading
Tags: Diagram
Mary Fontana
Asked On May 24, 2011 03:54 PM

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; //

tree.PrepareActivity(tree);
tree.StartNodeArrangement();
tree.RefreshLayout();

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

Thanks,
mary


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

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.

Regards,
Ramya



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.

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.

;