Theming contextual ribbonbars

5 posts, 0 answers
  1. Jason
    Jason avatar
    47 posts
    Member since:
    Jan 2013

    Posted 12 Mar 2014 Link to this post

    I'm working on developing our own theme, based on the WPF windows 8 theme. I have an issue with contextual ribbon bars. My guess is that these can't be themed in the Visual Builder. However, I can't work out how to theme them in code either.

    This is what we currently have


    What I would like to do is 
    1 - Theme the ribbontabbutton; the background colour, border and text. I can change the unselected background colour of the tab, but this only has an affect until the first time the ribbon is selected. Once switching away, the colour reverts to white. I also can't work out how to change the selected colour at all, which is what I really want to do

    2 - Remove the colouring on the main panel area that contains the groups etc. I just want it to be white.

    3 - Would be nice to change the unselected colour of the contextual ribbontabbutton as well (want it a shade of the orange, but that's not so important

    Any help would be greatly appreciated.

    Thanks
    Jason
  2. Jason
    Jason avatar
    47 posts
    Member since:
    Jan 2013

    Posted 13 Mar 2014 in reply to Jason Link to this post

    Have just realised, the image was not attached to the post, so here it is
  3. UI for WinForms is Visual Studio 2017 Ready
  4. George
    Admin
    George avatar
    500 posts

    Posted 17 Mar 2014 Link to this post

    Hello Jason,

    Thank you for contacting us.

    In order to change the background of the tabs you need to navigate to (in Visual Style Builder) RadRibbonBar -> StripViewItemContainer -> RibbonTab. Now, to change the normal coloring of the tabs you need to change the BackColor in the normal state - "RibbonTab". To change the color when the tab is selected you need to change the BackColor in the "RibbonTab.Selected" state. You should know that the styles are reapplied when a state changes. For example, if you have set color only to the "Selected" state it will not reset under any circumstances since there is no other style which would override its settings.

    Changing the background of the BackColor of the groups container can be done in the RadRibbonBar -> StripViewItemContainer.

    You can also read more about Visual Style Builder here.

    Let us know if you have any further questions.

    Regards,
    George
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
  5. Jason
    Jason avatar
    47 posts
    Member since:
    Jan 2013

    Posted 17 Mar 2014 in reply to George Link to this post

    Thanks, but we're talking at cross purposes here.

    I have done all you've said, quite extensively, for the RibbonBar in general. I'm part way through creating a complete custom theme for our products.

    However, my issue is with Contextually Sensitive tabs. These don't have a way of theming in Visual Builder, as far as I can see. So I assume they will need theming in code, either through event handle or somehow overriding the theme style sheet in code for those bars in particular. Any tips regarding this area would be great
  6. George
    Admin
    George avatar
    500 posts

    Posted 20 Mar 2014 Link to this post

    Hi Jason,

    Thank you for contacting us.

    We have not allowed our users to style the ContextualTabGroups since we have set default colors according to Microsofts guidelines. Moreover the ContextualTabGroups BackColor is per context and cannot be defined in VisualStyleBuilder

    At runtime you can change the color of each ContextualTabGroup by setting its BaseColor property.

    Let me know if you have further questions.

    Regards,
    George
    Telerik

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
Back to Top
UI for WinForms is Visual Studio 2017 Ready