Get exact position (location) of node

Hello,

How can I get an exact location of any node with respect to silverlight control (root element)?

Please check the image below

Here I want to get the location of node A as show in figure.

My requirement is to show balloon kind of information message in some specific condition when user clicks on expand button.

I have tried node.Position and node.Location but they seems to provide the different location of the node then I expect

I have moving the node to visible area (center) using following code

private void myGraph_LayoutCompleted(object sender, DiagramEventArgs e)

{

myGraph.Panel.CenterPart(node);

}

Thanks

Hardik

Node.Position and Node.Location (which might be the same values, depending on the values of Node.LocationSpot and Node.LocationElementName) are both in model coordinates.

You can convert model coordinates to DiagramPanel coordinates by calling DiagramPanel.TransformModelToView.

You can call TransformToAncestor or TransformToVisual to convert the DiagramPanel coordinates to whatever element you like. Those two “Transform…” methods are on Visual in WPF or on UIElement in Silverlight, if I remember correctly. Wait – Silverlight doesn’t have TransformToAncestor.

Hi Walter,
It is working as per my requirements.
Thanks a lot
Hardik