![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br>
|
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | ||
|
Guest
Posts: n/a
|
Hello,
I'm looking for a way to find a bounding box around controls. Specifically, i would like to find the edge points of an image xaml control programattically (top right, bottom left). I tried using a GeneralTransform to transform my control to its ancestor then trying to transform a couple of different points, but that didn't work as i don't have access to the edge points to begin with; just margins. Is there some sort of easy way to figure out where those points are? Thank you, -- Ofer |
||
|
|
|
|
|
|
#2 | ||||||||||||||
|
Guest
Posts: n/a
|
I figured it out. There's a handy method called TranslatePoint that's
inherited from UIElement. It allows you to know what a pixel point in one control is relative to another. For me, i gave it point (0, 0) in my image control and told it to translate that to the window. "Ofer" wrote:
|
||||||||||||||
|
|||||||||||||||
|
|
|
|