RadButton image size

13 posts, 0 answers
  1. Bob
    Bob avatar
    72 posts
    Member since:
    May 2008

    Posted 14 May 2008 Link to this post

    I have one image that I use in several places...so in the resources for my project it's sized to 128x128.  In a RadButton that I use, I need the image to be 24x24.  How can I accomplish this without having numerous copies of my image at different sizes?
  2. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 15 May 2008 Link to this post

    Hello Bob,

    Thank you for the question.

    You could set the Image size in RadButton by using the ImagePrimitive properties:

    1. Click on the smart tag of your RadButton and choose "Edit UI elements"
    2. In the Control element structure navigate to ImagePrimitive.
    3. Change MinSize and MaxSize's Height and Width properties to 24
    4. Change ImageLayout to Strech
    Now you should have an image resized to the desired size in your RadButton.

    I hope this helps. If you need additional assistance, do not hesitate to contact me again.

     
    Kind regards,
    Martin Vasilev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Bob
    Bob avatar
    72 posts
    Member since:
    May 2008

    Posted 15 May 2008 Link to this post

    Perfect - thank you!
  5. Shirya
    Shirya avatar
    40 posts
    Member since:
    Sep 2008

    Posted 02 Jul 2009 Link to this post

    Hello,
    I try to do the same with a radDropDownButton, but it does not work.
    How can i make it work?
    Thank you

    --Nevermind, i was changing the radArrowButtonElement Properties
  6. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 07 Jul 2009 Link to this post

    Hi Shirya,

    Thank you for writing.

    The principle is the same for every RadControl, just navigate to the ImagePrimitive for the desired element and make the same settings as described in my previous message.

    Write me back if you have other questions.

    Greetings,
    Martin Vasilev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. lena
    lena avatar
    1 posts
    Member since:
    Jul 2011

    Posted 25 Aug 2011 Link to this post

    Hi
    I cannot find "Edit UI elements" anywhere on my RadButton. Can you help please?
    Thanks
    Lena
  8. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 29 Aug 2011 Link to this post

    Hello Lena,

    You can find the "Edit UI elements" item in the context menu, which opens at design time through the RadButton's smart tag. Please take a look at the attached image to this message.

    Hope this helps. Let me know if you have any other questions.

    Kind regards,
    Martin Vasilev
    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 >>

  9. Rob
    Rob avatar
    10 posts
    Member since:
    Oct 2004

    Posted 17 Nov 2011 Link to this post

    Hi Martin,
    This used to work perfectly up until Q3 2011, when the photo was back to large size. I discovered that if, under Image Primitive, you change Layout Autosize to False, it would go back to the right size but... the image is now aligned left and no longer centered.
    I have attached a screen shot from Q2 2011, then Q3 2011.
    What I want is to have it back centered at per Q2 2011.
    Any idea? the original image size is 128 x 128
    Update: (Please ignore the 1st screenshot as it had the wrong section taken for Q2 2011)
    So really from the screenshot, I want to use Q3 2011 to have the same result as Q2 2011.
  10. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 22 Nov 2011 Link to this post

    Hello Peter Woodward,

    Thank you for writing.

    I would suggest using ImageScalling property and set it to SizeToFit value. This should work for the latest version of RadControls for Winforms. You can find this property in Element Hierarchy Editor, under ImagePrimitive element.

    Hope this helps. Let me know  if you have any additional questions.

    Greetings,
    Martin Vasilev
    the Telerik team

    Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

  11. Jo A. Kim
    Jo A. Kim avatar
    3 posts
    Member since:
    Mar 2012

    Posted 24 Sep 2012 Link to this post

    Hi Martin
    I also can not find the "Edit UI elements" contextmenu anywhere on the Radbutton.
    Can You please help.
    Best regards
    Jo A. Kim
  12. Anton
    Admin
    Anton avatar
    167 posts

    Posted 27 Sep 2012 Link to this post

    Hi Jo A. Kim,

    Thank you for writing.

    Please read Martin's post from Aug 29, 2011 where he explains how to access the desired elements collection. There is also a screen shot provided.

    Here I would like to summarize how to resize the Image in RadButton by using the ImagePrimitive properties with our latest version:
    1. Click on the smart tag of your RadButton and choose "Edit UI elements"
    2. In the Control element structure navigate to ImagePrimitive.
    3. Change MinSize and MaxSize's Height and Width properties to 24
    4. Change ImageLayout to Strech
    5. Change ImageScalling property  to SizeToFit value

    I hope this information helps. If you have further questions, feel free to write back.

    Greetings,
    Anton
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
  13. Jo A. Kim
    Jo A. Kim avatar
    3 posts
    Member since:
    Mar 2012

    Posted 27 Sep 2012 Link to this post

    Hi Anton,
    I wrote "I also can not find the "Edit UI elements" contextmenu anywhere on the Radbutton."
    It means: There is no "Edit UI Elements" on the smart tag!!!!

    Best Regards
    Jo A. Kim

  14. Anton
    Admin
    Anton avatar
    167 posts

    Posted 01 Oct 2012 Link to this post

    Hi Jo A. Kim,

    Thank you for writing.

    This forum concerns Telerik WinForms controls, while it seems that you are using the Telerik ASP.NET AJAX controls. Please post your questons in the appropriate forums to get appropriate answer to your questions: http://www.telerik.com/community/forums/aspnet-ajax.aspx.

    I hope this information helps.

    Kind regards,
    Anton
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready