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: 1131

Filed under:
|

Hello,

  1. I have a Viewbox with a Canvas Child,
  2. I have the Stretch property of Viewbox to Fill,
  3. I have changed the width and height of the Viewbox,
  4. 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

Related posts about wpf

Related posts about viewbox