How To find the location of any treeviewitem in silverlight
- by user312772
Hi I am new in silverlight 3.
I want to find the location of any treeview Item .
Although I applied this code
GeneralTransform gt = ProjectTree.TransformToVisual(Application.Current.RootVisual as UIElement);
Point offset = gt.Transform(new Point(0, 0));
double controlTop = offset.Y;
double controlLeft = offset.X;
Here Project tree is the root element of the treeview.
This code is working
But when I applied this for any child TreeViewelement of Treeview
then an exception occurs "Value does not fall within the expected range."
How to find the location of this child treeview element object