I have an UltraPictureBox control with ScaleImage set to always and dock filled. I've put this pictureBox inside a user control. As the user control is re-sized, the image in the picture box is scaling correctly, but I would like to know the dimensions and location of the image rectangle in the pictureBox. Is this possible?
Thanks!
Hi,
I don't believe that the control exposes this information in any easily-accessible way. If you know the original size of the image, you could re-calculate the size that the image should be, but this would be pretty tricky. In fact, the control does not even calculate this size. It just uses GDI+ to render the image into the full area of the control and specifies the correct options to make it scale.