Metro Theme Change ApplicationButton Background

6 posts, 1 answers
  1. Arun Kumar
    Arun Kumar avatar
    60 posts
    Member since:
    Nov 2009

    Posted 20 Nov 2011 Link to this post

    Hi,

    I am using Q3 2011 telerikmetroblue theme. How do I change the applicationbutton background style ?
  2. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 23 Nov 2011 Link to this post

    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.

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Arun Kumar
    Arun Kumar avatar
    60 posts
    Member since:
    Nov 2009

    Posted 26 Nov 2011 Link to this post

    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 ?
  5. Answer
    Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 30 Nov 2011 Link to this post

    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.

  6. Chris Kirkman
    Chris Kirkman avatar
    37 posts
    Member since:
    Jul 2012

    Posted 06 Sep 2012 Link to this post

    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;


  7. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 10 Sep 2012 Link to this post

    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 >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready