How to add image to Ribbon?

13 posts, 1 answers
  1. Ian
    Ian avatar
    22 posts
    Member since:
    Nov 2010

    Posted 24 Nov 2010 Link to this post

    Hi,

    How can I add image on the right blank side of the ribbon. I Attached a screen shot for clarity. Thank you.

    Best regards,

    Ian
  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 24 Nov 2010 Link to this post

    Hello,

    Well, I'm sure one can get to the Fill Element, add a hosted item and change the picture position, but I think it would be much simpler just to add a picture box on top of the RadRibbonBar and anchor it to the Top, Right. Would that work for you?

    Let me know if you need more information.
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 26 Nov 2010 Link to this post

    Hello,

    Did this help? If so, may I ask that you mark as answer so others can find the solution too. If you need more help, just let me know.
    Regards,
    Richard
  5. Ian
    Ian avatar
    22 posts
    Member since:
    Nov 2010

    Posted 26 Nov 2010 Link to this post

    Hi Richard,

    I'm sorry for my late reply. Regarding your answer...
    "Well, I'm sure one can get to the Fill Element, add a hosted item and change the picture position"
    --Can you please explain this further. I'm new to Telerik controls.
    " but I think it would be much simpler just to add a picture box on top of the RadRibbonBar and anchor it to the Top, Right"
    --I think this is easy but appropriate for prototype projects. And also, I'm looking for a better way to do this (Like how we add image to buttons, or other work around other than the above solution)

    Thank you very much for your answers. 

    Best regards,

    Ian
  6. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 26 Nov 2010 Link to this post

    Hi Ian,

    No problem. The Telerik controls are made up of elments. So for example, a control may have a border element, a textbox element, a fill primitive element and so on. And these elements may be nested deep inside each other. It's this array of various elements that you may need to find the right one to add the image to. I will have a look at adding the image to the correct element, though addig a picture box and anchoring it seems to be a very quick solution.

    I'll get back to you when I know where to add the image.
    Best regards,
    Richard

  7. Ian
    Ian avatar
    22 posts
    Member since:
    Nov 2010

    Posted 26 Nov 2010 Link to this post

    Hi Richard,

    Thanks for your answer. Regarding adding picture box and anchoring them... there are ribbon tabs that can be filled by Groups leaving no unused space. With this, the image should resize/hide appropriately. I think this will still need some coding. I hope there are neater solutions. Thank you.

    Best regards,

    Ian
  8. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 26 Nov 2010 Link to this post

    Hello Ian,

    I'm afraid I don't know of a solution that will cover that for you at the moment. I will do my best to find one for you as soon as possible.
    Richard
  9. Ian
    Ian avatar
    22 posts
    Member since:
    Nov 2010

    Posted 26 Nov 2010 Link to this post

    Hello Richard,

    Thank you very much.

    Ian.
  10. Ian
    Ian avatar
    22 posts
    Member since:
    Nov 2010

    Posted 09 Dec 2010 Link to this post

    Hi Richard,

    I tried your 1st suggestion. I created a class and inherited FillPrimitive. Overriden the PaintElement to draw the image. Then I add this class to RibbonTab's children. I don't know if there are still better ways to do it but this works for me. Thanks again.

    Kind regards,

    Ian
  11. Gaurav
    Gaurav avatar
    5 posts
    Member since:
    Jul 2012

    Posted 13 May 2013 Link to this post

    Hi,

     I have a RadRibbonTab in which i want to show 3 RadButtons in Group1 and 1 image which i want to show of right side in each tab without any radribbongroup (in worst case i can show it in a group but on right side.).While specifing new Image group i dont want to specify margin between two radribbongroups.Using Grid in Tab not working.Please tell me the whole solution with xaml code  as soon as possible



    Regards,
    Gaurav Sharma
    Winshuttle
    Software Developer
  12. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 16 May 2013 Link to this post

    Hi Gaurav,

    This forum concerns RadControls for WinForms, while your question seems to be related to RadControls for Silverlight/WPF. Please address your question in the appropriate forums: http://www.telerik.com/community/forums/wpf/ribbon-bar.aspx.

    Kind regards,
    Stefan
    the Telerik team
    Get started with RadControls for WinForms with numerous videos and detailed documentation.
  13. Markus
    Markus avatar
    11 posts
    Member since:
    May 2013

    Posted 17 Nov 2013 Link to this post

    Hi, could anyone please give some example code for Ian's solution?
  14. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 21 Nov 2013 Link to this post

    Hello Markus,

    I am not sure how Lan's implementation is performed, however, the only solution I can offeris to set an image to the content panel, and right align this image. In this case it will always be positioned on the right side, but the ribbon groups will overlap it if they reach to it:
    radRibbonBar1.RibbonBarElement.TabStripElement.ContentArea.Image = Resources.folder_open;
    radRibbonBar1.RibbonBarElement.TabStripElement.ContentArea.ImageAlignment = ContentAlignment.MiddleRight;

    I hope that this will work for you.

    Regards,
    Stefan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready