I am using Q3 2011 telerikmetroblue theme. How do I change the applicationbutton background style ?
5 Answers, 1 is accepted
Thank you for writing.
By default this theme uses ImageShape for the application button. You can change this by modifying the AppMenuButtonImageShapeNormal repository of the DropDownButtonActionPartFill element (see attached image. You can either change the image or you can remove the entire repository and add your own.
I hope that you find this information useful. If you have any other questions, do not hesitate to contact us.
Greetings,
Stefan
the Telerik team
Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.
I tried with your solution but its not working. I had changed the image as per your instruction. It shows in the RadApplicationMenu but not in the RibbonBar. RibbonBar still shows the default image. Any other settings has to be done ?
Thank you for your reply.
The RadRibbonBar has its own style applied to it for the application button in some themes and the TelerikMetro is one of them. Refer to the attached image to see where to find the image shape applied to the application button. You should note that there are several states with different image shapes. You will have to modify or remove them all.
I hope this will help. Should you need further assistance, I would be glad to provide it.
Ivan Petrov
the Telerik team
Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.
Figured it out. Use the following if your ribbon bar is called m_rb.
//
// Set text on main ribbon bar
//
m_rb.RibbonBarElement.ApplicationButtonElement.KeyTip =
"F";
m_rb.RibbonBarElement.ApplicationButtonElement.Text =
"File";
m_rb.RibbonBarElement.ApplicationButtonElement.ForeColor =
Color.White;
m_rb.RibbonBarElement.ApplicationButtonElement.DisplayStyle =
DisplayStyle.ImageAndText;
m_rb.RibbonBarElement.ApplicationButtonElement.TextImageRelation =
TextImageRelation.ImageBeforeText;
m_rb.RibbonBarElement.ApplicationButtonElement.Image = Properties.
Resources.Do_16;
m_rb.RibbonBarElement.ApplicationButtonElement.ActionButton.ButtonFillElement.BackgroundShape =
null;
m_rb.RibbonBarElement.ApplicationButtonElement.ActionButton.ButtonFillElement.BackColor =
Color.Gray;
Thank you for writing.
With code you can achieve everything you can with a theme, it is just a matter of choice. Using the following line in your code, as you have found out, would remove the Telerik logo image for the application button:
radRibbonBar1.RibbonBarElement.ApplicationButtonElement.ActionButton.ButtonFillElement.BackgroundShape =
null
;
Feel free to write back should any further questions arise.
Greetings,
Ivan Petrov
the Telerik team