WPF: Viewbox and TranslatePoint
Posted
by Samir Sabri
on Stack Overflow
See other posts from Stack Overflow
or by Samir Sabri
Published on 2010-03-23T15:39:42Z
Indexed on
2010/03/23
15:43 UTC
Read the original article
Hit count: 1153
Hello,
- I have a Viewbox with a Canvas Child,
- I have the Stretch property of Viewbox to Fill,
- I have changed the width and height of the Viewbox,
I need to get the location of children in Canvas with respect to Viewbox parent I tried :
Point p = viewboxInstance.TranslatePoint(new Point(Canvas.GetLeft(child), Canvas.GetTop(child)), viewboxInstanceParent);
it gets wrong coordinates! Is there a solution or work around ?
Thanks
© Stack Overflow or respective owner