Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
240
Dimensions and location of scaled image in UltraPictureBox
posted

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!

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    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.

Children
No Data