Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Buttons, RadioButton, CheckBox, etc > ImageScalinSize property on buttons

Not answered ImageScalinSize property on buttons

Feed from this thread
  • Posted on Aug 22, 2011 (permalink)

    Hi, I have a button and I have setted up an image that is bigger than the button.
    Is there a posibility from ImageScalingSize property to display the image at the same size like the button is?

    Also I have attached an image
    Thanks
    Attached files

    Reply

  • Stefan Stefan admin's avatar

    Posted on Aug 24, 2011 (permalink)

    Hello,

    Thank you for writing.

    The desired functionality is achievable. Set the BackgroundImage property of RadButton (instead of the Image property) and then set the BackgroundImageLayout property to Zoom or Stretch. One more thing that you have to do is hide the button FillPrimitive in order to make the BackgroundImage visible. Here is a sample implementation:
    radButton1.ButtonElement.ButtonFillElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
    radButton1.BackgroundImage = Image.FromFile(@"C:\Program Files (x86)\Telerik\RadControls for WinForms Q2 2011\Examples\QuickStart\Resources\01.png");
    radButton1.BackgroundImageLayout = ImageLayout.Zoom;//or Stretch

    I hope that you find this information helpful. Should you have any other questions, do not hesitate to contact us.
     
    Greetings,
    Stefan
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Buttons, RadioButton, CheckBox, etc > ImageScalinSize property on buttons
Related resources for "ImageScalinSize property on buttons"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]