Hi, I'm trying to figure out how to do this. Is there a method or a property that returns the X and Y coordinates of an item?
Thanks!
EDIT:
I need the coordinates relative to the parent of the RadTreeView and relative to the RadTreeView itself.
Thanks.
1 Answer, 1 is accepted
0
Tihomir Petkov
Telerik team
answered on 12 Feb 2010, 02:49 PM
Hello Lauren,
You can get the corrdinates relative to the parent by using this:
GeneralTransform generalTransform = childElement.TransformToVisual( parentElement );
Point childToParentCoordinates = generalTransform.Transform( new Point( 0, 0 ) );
Alternatively, you can get the absolute coordinates like so:
GeneralTransform generalTransform = childElement.TransformToVisual( null );
Point childToParentCoordinates = generalTransform.Transform( new Point( 0, 0 ) );
Greetings,
Tihomir Petkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.