Users Pricing

forum

Home Forums How to get XY coordinates of a control in WPF? – MindStick

How to get XY coordinates of a control in WPF?

Anonymous User 7812 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.

1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md