locked
How to center an image proportionally in a picturebox on an RDLC Form? RRS feed

  • Question

  • I have a RDLC report form with 3 images aligned horizontally. The images in my report need to fit in the picturebox proportionally, but also need to be centered. The problem is not related to the image position according to the report..it's about the PictureBox contents, when they are proportional, it's aligned top left in the PictureBox.

    I've looked around and haven't found a way to do this. From what I understand, SizeMode set to center will cut off the image edges instead of fitting proportionally.

    Any ideas?


    Thanks! ~Gone2TheDogs

    Tuesday, January 28, 2014 4:38 PM

Answers

  • Thanks for the reply Iron.

    I modified the padding during runtime to fix the issue. After an extensive web search, this seemed like only way to get what I needed.


    Thanks! ~Gone2TheDogs

    • Proposed as answer by IronRazerz Wednesday, January 29, 2014 8:40 PM
    • Marked as answer by Leo (Apple) Yang Tuesday, February 4, 2014 2:00 PM
    Wednesday, January 29, 2014 1:34 PM

All replies

  • Hi,

     Did you try setting the PictureBoxSizeMode to Zoom. That will keep the ratio of the image`s size but, it shrinks or expands the image to the size that fits in the picturebox. If that is not the effect you want then maybe a screenshot or picture of how you want it to be re-sized and fit into the picturebox will help me or someone else here understand your needs.  :)

    Tuesday, January 28, 2014 9:52 PM
  • Thanks for the reply Iron.

    I modified the padding during runtime to fix the issue. After an extensive web search, this seemed like only way to get what I needed.


    Thanks! ~Gone2TheDogs

    • Proposed as answer by IronRazerz Wednesday, January 29, 2014 8:40 PM
    • Marked as answer by Leo (Apple) Yang Tuesday, February 4, 2014 2:00 PM
    Wednesday, January 29, 2014 1:34 PM