WPF - Translate a point relative to MainWindow to it's coordinates relative to a child control
Posted
by James Cadd
on Stack Overflow
See other posts from Stack Overflow
or by James Cadd
Published on 2010-04-07T17:45:58Z
Indexed on
2010/04/07
18:13 UTC
Read the original article
Hit count: 713
Is it possible to translate a point relative to MainWindow to be relative to one of its child controls? For example, say a control's upper left corner was located at 500, 500 relative to MainWindow what code would convert that number to (0, 0)? I'd like the solution to be agnostic of the layout mechanism (i.e. not require me to parent the control in a Canvas and use the Top and Bottom methods).
© Stack Overflow or respective owner