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

Metro Theme Change ApplicationButton Background

5 Answers 174 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Arun Kumar
Top achievements
Rank 2
Arun Kumar asked on 20 Nov 2011, 03:25 PM
Hi,

I am using Q3 2011 telerikmetroblue theme. How do I change the applicationbutton background style ?

5 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 23 Nov 2011, 01:16 PM
Hello Arun, 

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.

0
Arun Kumar
Top achievements
Rank 2
answered on 26 Nov 2011, 08:05 AM
Hi Stefan,

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 ?
0
Accepted
Ivan Petrov
Telerik team
answered on 30 Nov 2011, 11:49 AM
Hi Arun Kumar,

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.

Best wishes,
Ivan Petrov
the Telerik team

Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

0
Chris Kirkman
Top achievements
Rank 1
answered on 06 Sep 2012, 08:36 PM
I'm sorry, but there has to be an easier way to achieve this same goal than to deviate from the out of the box theme.  If I do this, than every time we upgrade I lose the work I've done to make the theme my own.  I simply want the telerik UI to be removed from the application button on the ribbon bar.

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;


0
Ivan Petrov
Telerik team
answered on 10 Sep 2012, 01:45 PM
Hello Chris,

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
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
RibbonBar
Asked by
Arun Kumar
Top achievements
Rank 2
Answers by
Stefan
Telerik team
Arun Kumar
Top achievements
Rank 2
Ivan Petrov
Telerik team
Chris Kirkman
Top achievements
Rank 1
Share this question
or