How to get the position of a control

Sep 16, 2009 at 1:09 PM

hi,

I have number of controls and want to get the position of control at runtime.  I have created one of the control as Thumb control with Drag feature. While drag the thumb control over the other controls I want to show the corresponding control name in a lable.

Please help me on how can I get the position at runtime and compare the positions?

Thanks in Advance.

Coordinator
Sep 18, 2009 at 9:46 PM

Hi pap83,

You can use the Visual.PointToScreen API.  This is a good starting point,

http://msdn.microsoft.com/en-us/library/system.windows.media.visual.pointtoscreen.aspx

Thanks,

Saied K