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
440
UltraExplorerBar set ImageSizeLarge individual for each item
posted

Hi team,

I know that I can operate UltraExplorerBar.ImageSizeLarge .Width and .Heigth properties to change width and heigth for all items images.

But I faced with a situation when I need to use 2 images for 2 items belonging to the same group, 1st 32X32 and 2nd 32X24 pix. So second image looks stretched.

How can I change image sizes of every item within a group individually? I cannot change original images.

Thanks!

Parents
  • 18204
    Verified Answer
    Offline posted

    Hello Itg,

    Thank you for posting in our forums!

    There is no built-in way to specify an individual item's size.  Instead, we recommend modifying the images in memory so you can add a transparent padding to the image.

    I found the following CodeProject article that explains how you can achieve this:

    https://www.codeproject.com/Articles/2941/Resizing-a-Photographic-image-with-GDI-for-NET

    I have also put this in a sample to demonstrate.  In the sample, I have two images, 32x32.png and 32x24.png.  I load each of them into items in the UltraExplorerBar and also create a third 32x32 image that uses 32x24.png with padding.  This is done in memory so you do not need to modify the original images.

    5481.WinExplorerBar_DifferentImageSizes.zip

    Please let me know if you have any further questions or concerns with this and I will be glad to help.

Reply Children
No Data