forum

Home / DeveloperSection / Forums / How to get XY coordinates of a control in WPF?

How to get XY coordinates of a control in WPF?

Anonymous User710723-Sep-2013

Point relativePoint = myVisual.TransformToAncestor(rootVisual)

                              .Transform(new Point(0, 0));

this code block is very useful but, I use MVVM therefore the code block is useless for me ?

I wanna to get X & Y without using rootVisual.

Thanks & Best Regards.

Updated on 23-Sep-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By