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

Highlight tab

1 Answer 230 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Andriy
Top achievements
Rank 1
Andriy asked on 06 Sep 2016, 11:06 AM

Hi,

I have few tabs in TabControls. Application has ability to switch themes in runtime.

I need highlight some tabs due to some actions (e.g. new message received in the system and messages tab will be highlighted) in runtime. This might be blinking tab header but it should be in the current theme colors, for example if I set blue color for tab header - in some cases it will be ok, but if selected theme who has blue tabs by default - highlighted tab will be not visible. 

How this can be implemented using viewmodel property binding or something like this. Do you have any examples or article?

Thank you

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 08 Sep 2016, 02:24 PM
Hi Andriy,

I attached a sample project demonstarting your requirement. Some notes about it -- please add reference to NoXAML assemblies to be able to run it (from Binaries.NoXAML folder under your controls local installation path) as the test project is made with the use of our implicit styles theming mechanism. When it comes to custom styles where you don't practically change the control template (as in this case) and you want to support theme change runtime, we highly recommend the implicit styles theming mechanism. You mind find more details about it in our documentation here.
About the project -- I added a custom attached boolean property to the RadTabItem and it triggers an animation that changes the background color of the TabItem. The boolean property won't turn on for the first tab item if it is selected. If you just switch to the next tab, the first one won't get highlighted as well. However on timer tick which is set to 3 sec when we update a sample collection of list items the attached boolean property turns on and the "highlight" tab animation kicks in.

Feel free to modify the attached project per your own needs.


Regards,
Evgenia
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
TabControl
Asked by
Andriy
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or