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

How to show/hide icon on tab header

1 Answer 375 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Jacky
Top achievements
Rank 1
Jacky asked on 28 Apr 2016, 10:56 PM

Hello,

 

I have a RadTabControl which will dynamically add tabitems.

How to show/hide icon on tab header based on user selection in the tab content.

for example:

User filled two textbox, then the check icon will set to show.

if user clear one textbox,  then the check icon will set to hide.

Can you help me with this issue?

 

Thanks,

-Jacky

1 Answer, 1 is accepted

Sort by
0
Milena
Telerik team
answered on 03 May 2016, 07:16 AM
Hello Jacky,

You can take a look at our SDK example EditableHeaders and help article How to Make the Tab Headers Editable. You can use a similar approach for the tab headers and define custom ItemTempate with Image inside. Then on a command or event (according to your scenario) you can change the visibility of the icon. To achieve this you can add property in your ViewModel to control the icon visibility (if the property is of type bool you can take advantage of our BooleanToVisibilityConverter). 

I hope this information is helpful. Please don't hesitate to ask if you have any other questions.

Regards,
Milena
Telerik
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
Jacky
Top achievements
Rank 1
Answers by
Milena
Telerik team
Share this question
or