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
1290
How to set image to fit ImageSizeLarge property?
posted

I have dynamically created a ButtonTool, and added it onto my ribbon control, assigning an image to it as such:

btn.SharedProps.AppearancesLarge.Appearance.Image = Image.FromFile(imagePath)

What property should I set such that my image scales down to the button size?

 

Parents
No Data
Reply
  • 27093
    Verified Answer
    posted

    Hello,

    If you set it from AppearanceSmall it is automativally scaled:

    Here is how I have set it:

     

    buttonTool.SharedProps.AppearancesSmall.Appearance.Image =

    new Bitmap(@"C:\Users\PMonov\Desktop\Win Cases\Ribbon\Ribbon\cat.jpg");

     

    Hope this helps.

    Sincerely,

    Petar Monov

    Developer Support Engineer,

    Infragistics, Inc

     

Children
No Data