This is a migrated thread and some comments may be shown as answers.

Ribbon Bar Start Button Image

3 Answers 268 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 1
Jim asked on 10 Jun 2009, 12:02 AM
Can someone show me the best way to develop the image for the ribbon bar start button?

3 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 10 Jun 2009, 11:45 AM
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.
0
Angel
Top achievements
Rank 1
answered on 23 Jul 2012, 11:23 PM

in the mouseEnter event, how can i change the icon image ?
0
Stefan
Telerik team
answered on 26 Jul 2012, 02:50 PM
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.
Tags
RibbonBar
Asked by
Jim
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Angel
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or