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

Start Button background color

1 Answer 161 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Ching-Yen
Top achievements
Rank 1
Ching-Yen asked on 25 Mar 2008, 05:51 AM
Hi,

I only manage to change the icon for the start button, but not it's background color. anyone could advice me on this, please?

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Accepted
Nikolay
Telerik team
answered on 28 Mar 2008, 08:40 AM
Hi Ching-Yen,

You can change the background color of the StartButton using one of the two approaches below:
  1. Using Visual Style Builder. To adjust the colors in a theme, navigate to RootRadElement >> RadRibbonBarElement >> RadDropDownButtonElement >> ActionButtonElement >> FillPrimitive or simply click the StartButton while in Design View. Once there, you can set the BackColor, BackColor2, BackColor3 and BackColor4 properties for each of the state tabs.
  2. Programmatically. You should access the FillPrimitive of the StartButton and set the colors directly:
    private void Form1_Load(object sender, EventArgs e)  
    {  
        FillPrimitive fill = radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Children[1].Children[1].Children[0] as FillPrimitive;  
     
        fill.BackColor = Color.White;  
        fill.BackColor2 = Color.Yellow;  
        fill.BackColor3 = Color.Blue;  
        fill.BackColor3 = Color.Green;  

    Please note that this code will override the behavior governed by the theme, so you will lose the effects related to the mouse events.

If you have additional questions, do not hesitate to contact me.

Sincerely yours,

Nikolay
the Telerik team


Instantly find answers to your questions at the new Telerik Support Center
Tags
RibbonBar
Asked by
Ching-Yen
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or