Ribbon Bar Start Button Image

4 posts, 0 answers
  1. Jim
    Jim avatar
    27 posts
    Member since:
    Jun 2008

    Posted 09 Jun 2009 Link to this post

    Can someone show me the best way to develop the image for the ribbon bar start button?
  2. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 10 Jun 2009 Link to this post

    Hi Jim,

    Thanks for writing. You can easily set any type of Image to the RibbonBar Application Button by using the following property:

    this.radRibbonBar1.StartButtonImage = <YourImage>; 

    However, in order to maintain the UI consistent, it is recommended to use images with size smaller than 40x40 pixels so that they do not cross the bounds of the button.

    I hope this helps. Do not hesitate to write back in case of further questions.

    Greetings,
    Deyan
    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Angel
    Angel avatar
    5 posts
    Member since:
    Jul 2012

    Posted 23 Jul 2012 Link to this post


    in the mouseEnter event, how can i change the icon image ?
  5. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 26 Jul 2012 Link to this post

    Hello Angel,

    Thank you for writing.

    You can use the MouseEnter/MouseLeave events of the desired element to achieve that:
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
     
            radRibbonBar1.StartButtonImage = Image.FromFile(@"C:\img1.png");
             
            radRibbonBar1.RibbonBarElement.ApplicationButtonElement.ActionButton.MouseLeave += new EventHandler(ActionButton_MouseLeave);
            radRibbonBar1.RibbonBarElement.ApplicationButtonElement.ActionButton.MouseEnter += new EventHandler(ActionButton_MouseEnter);
        }
     
        void ActionButton_MouseEnter(object sender, EventArgs e)
        {
            radRibbonBar1.StartButtonImage = Image.FromFile(@"C:\img2.png");
        }
     
        void ActionButton_MouseLeave(object sender, EventArgs e)
        {
            radRibbonBar1.StartButtonImage = Image.FromFile(@"C:\img1.png");
        }
    }


    Best wishes,
    Stefan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top