TintColor of RibbonTab

Ribbon for WPF Forum

Posted 13 years ago by slimke
Version: 10.2.0532
Avatar
Hi,

when i try to set the tintcolor property of a ribbon tab control the changes only take place when i switch between different tabs.

Is it possible to force the new color to be set directly?? (without switching tabs)

Thank you,
SLimke


10.2.532.0

Comments (3)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I did some investigation on this and unfortunately not. The Tab.TintColor is intended for use by the contextual tab groups and isn't meant to really be changed on the fly. What happens is that when the selected tab changes in the Ribbon, the Ribbon updates its readonly SelectedContextualTabGroupColor property, which is what renders the tab's content (within the Ribbon's template) using the different color. Why were you looking to change it dynamically?


Actipro Software Support

Posted 13 years ago by Sebastian Limke
Avatar
Thank you for the answer and the time you spend for it!

I have several "documents" in my application who are all organized in one ContextualGroup. When one of these documents is opened in the editing mode i want to change the color of the RibbonTab. I already override the OnRender methode of my Ribbon Control Tag and set the new TintColor to get a different color compared to the rest of the ContextualTabGroup members.

The reason for a different color is that I want to give the user a visual help to see which document is opened in the editing mode!

It there perhaps a different way of doing this?
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Sebastien,

There are several things that will trigger a call to the method that updates the Ribbon.SelectedContextualTabGroupColor property: changing of the Ribbon.Tabs or Ribbon.ContextualTabGroups collections, changing any Tab's Visbility property, setting ContextualTabGroup.IsActive, or changing the tabs in a CTG.

As a workaround, you could possibly do one of those now to trigger it, such as adding a Visibility=Collapsed Tab to the Ribbon and then removing it right away.

If you'd like us to look into making it more automated, can you please make a new simple sample project that shows the issue and email it us so we can debug it and use it to verify that any code we add fixes the problem? Please don't include any .exe files in the ZIP and rename the .zip file extension so it doesn't get spam blocked.


Actipro Software Support

The latest build of this product (v24.1.2) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.