Monday 15 September 2014

c# - How to get the current size of an image within a picturebox -


I have an image box in which I have an image - I am in the "zoom" size mode (as Has been seen below):

  this.pictureBox1.SizeMode = PictureBoxSizeMode.Zoom;   

Now I am trying to get the current size of the image (when it has been extended) - not the actual size of the image. For example, if I do this:

  var size = Picturebox 1. Image. Size   

This gives the actual dimension of the image - not the scale How can you get the size of the image size?

I think what you want photo box 1. Client size

No comments:

Post a Comment