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 User 7648 23-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.

wpf
Updated on 23-Sep-2013

I am a content writter !


Message
Can you answer this question?

Answer

1 Answers

Liked By